/* Uspector Custom Styles - Modern SSL/TLS Security Theme */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-light: #38bdf8;
  --secondary: #ffffff;
  --card-bg: #ffffff;
  --page-bg: #f8fafc;
  --border-color: #e2e8f0;
}

html.dark {
  color-scheme: dark;
  --primary: #38bdf8;
  --primary-dark: #0284c7;
  --primary-light: #7dd3fc;
  --secondary: #1e2430;
  --card-bg: #1e2430;
  --page-bg: #161a23;
  --border-color: #2e3748;
}

body {
  font-family: var(--font-sans);
  background-color: var(--page-bg);
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

html.dark body {
  color: #e2e8f0;
}

html.dark article strong {
  color: #f1f5f9;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* Navbar active item indicator */
.nav-link {
  transition: all 0.2s ease;
  position: relative;
}

.nav-link.active {
  color: #0284c7 !important;
  font-weight: 600;
}

html.dark .nav-link.active {
  color: #38bdf8 !important;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 1.25rem;
  right: 1.25rem;
  height: 2px;
  background-color: #0284c7;
  border-radius: 9999px;
}

html.dark .nav-link.active::after {
  background-color: #38bdf8;
}

/* Chain of Trust Visualization */
.trust-node {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trust-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

.trust-connector {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Grade Badges */
.grade-badge-a {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.grade-badge-b {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.grade-badge-c {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.grade-badge-f {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* Pulse animation for running scan */
@keyframes scanning-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(2, 132, 199, 0);
  }
}

.scanning-pulse {
  animation: scanning-glow 2s infinite ease-in-out;
}

/* Feature card hover */
.feature-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: #bae6fd;
  box-shadow: 0 20px 25px -5px rgba(2, 132, 199, 0.08), 0 8px 10px -6px rgba(2, 132, 199, 0.04);
}

html.dark .feature-card:hover {
  border-color: #0369a1;
  box-shadow: 0 20px 25px -5px rgba(2, 132, 199, 0.16), 0 8px 10px -6px rgba(2, 132, 199, 0.1);
}

/* Accordion transition */
.accordion-content {
  transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html.dark ::-webkit-scrollbar-track {
  background: #161a23;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #3b4459;
}
html.dark ::-webkit-scrollbar-thumb:hover {
  background: #525f7a;
}

/* Dark Charcoal Theme for Dynamic Diagnostic Results (SSL, DNS, PHP, Web Security) */
html.dark :is(#results-section, #dns-results, #php-results, #web-results) {
  background-color: #161a23;
  color: #e2e8f0;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .bg-white {
  background-color: #1e2430;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.bg-slate-50, .bg-slate-50\/70, .bg-slate-50\/50) {
  background-color: #191e28;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .bg-slate-100 {
  background-color: #252c3b;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.hover\:bg-slate-50\/50:hover, .hover\:bg-slate-50\/60:hover) {
  background-color: rgba(37, 44, 59, 0.7);
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .hover\:bg-slate-100:hover {
  background-color: #2e3748;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .hover\:bg-slate-200:hover {
  background-color: #364156;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.border-slate-50, .border-slate-100, .border-slate-200, .border-slate-300) {
  border-color: #2e3748;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: #2b3344;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .text-slate-900 {
  color: #f1f5f9;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .text-slate-800 {
  color: #e2e8f0;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .text-slate-700 {
  color: #cbd5e1;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .text-slate-600 {
  color: #b4c0d0;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .text-slate-500 {
  color: #94a3b8;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) .text-slate-400 {
  color: #8896ab;
}

/* Status & category tints inside dynamic results */
html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.bg-sky-50, .bg-sky-100) {
  background-color: rgba(14, 165, 233, 0.14);
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) .border-sky-200 {
  border-color: rgba(56, 189, 248, 0.35);
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.text-sky-600, .text-sky-700, .text-sky-800) {
  color: #7dd3fc;
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) .hover\:text-sky-700:hover {
  color: #bae6fd;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.bg-emerald-50, .bg-emerald-100) {
  background-color: rgba(16, 185, 129, 0.14);
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) .border-emerald-200 {
  border-color: rgba(52, 211, 153, 0.35);
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.text-emerald-600, .text-emerald-700, .text-emerald-800, .text-emerald-900) {
  color: #6ee7b7;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.bg-amber-50, .bg-amber-50\/40, .bg-amber-50\/50, .bg-amber-100, .bg-yellow-100) {
  background-color: rgba(245, 158, 11, 0.14);
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.border-amber-200, .border-amber-300) {
  border-color: rgba(251, 191, 36, 0.35);
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.text-amber-500, .text-amber-600, .text-amber-700, .text-amber-800, .text-amber-900, .text-yellow-800) {
  color: #fcd34d;
}

html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.bg-rose-50, .bg-rose-50\/30, .bg-rose-100) {
  background-color: rgba(244, 63, 94, 0.14);
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) .border-rose-200 {
  border-color: rgba(251, 113, 133, 0.35);
}
html.dark :is(#results-section, #dns-results, #php-results, #web-results) :is(.text-rose-600, .text-rose-700, .text-rose-800) {
  color: #fda4af;
}

/* Print styles */
@media print {
  .no-print, header, footer, form, .btn-action {
    display: none !important;
  }
  html.dark,
  body,
  html.dark body {
    background: white !important;
    color: black !important;
  }
  html.dark :is(#results-section, #dns-results, #php-results, #web-results),
  html.dark :is(#results-section, #dns-results, #php-results, #web-results) * {
    background: white !important;
    color: black !important;
    border-color: #cbd5e1 !important;
  }
  .report-container {
    box-shadow: none !important;
    border: none !important;
  }
}
