/* Traffic Torch – SEO/UX Tool Results Styles
   Mobile-first, glassmorphism, day/night ready */

body { transition: background-color 0.3s ease; }

.health-score polygon { fill: rgba(16, 185, 129, 0.3); }
.radar { width: 180px; height: 180px; margin: 1.5rem auto; display: block; }
.health-score h2 { margin-bottom: 0.5rem; }

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .container, .max-w-5xl, .max-w-3xl, .max-w-4xl {
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .p-12, .p-10, .p-8 {
    padding: 1.5rem !important;
  }
  .text-5xl {
    font-size: 2rem !important;
    line-height: 1.1 !important;
  }
  .text-9xl {
    font-size: 6rem !important;
    line-height: 1 !important;
  }
}

@media (max-width: 480px) {
  .p-12, .p-10 { padding: 1.25rem !important; }
  .text-5xl { font-size: 1.875rem !important; }
  .text-9xl { font-size: 5.5rem !important; }
}

/* Spinner */
.spinner {
  border: 8px solid rgba(255,255,255,0.1);
  border-top: 8px solid #f97316;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1.2s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* What How Why Padding */
.p-8 {
  padding: 0.5rem !important;
}

/* Score Circles - Perfect Centering */
.score-circle {
  margin: 0 auto 1.5rem auto;
}
.score-circle svg {
  width: 120px;
  height: 120px;
  display: block;
  margin: 0 auto;
}
.score-circle .bg {
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 10;
  fill: none;
}
.score-circle .progress {
  stroke-width: 10;
  stroke-linecap: round;
  fill: none;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dasharray 1s ease, stroke 0.6s ease;
}
.score-circle .number {
  font-size: 48px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
  transition: fill 0.6s ease;
}

/* Large Overall Circle */
.score-circle.large svg {
  width: 200px;
  height: 200px;
}
.score-circle.large .number {
  font-size: 80px;
}
@media (max-width: 768px) {
  .score-circle.large svg {
    width: 150px;
    height: 150px;
  }
  .score-circle.large .number {
    font-size: 60px;
  }
}

/* Grade Colors */
.stroke-red-400 { stroke: #f87171 !important; }
.stroke-orange-400 { stroke: #fb923c !important; }
.stroke-green-400 { stroke: #34d399 !important; }
.text-red-400 { fill: #f87171 !important; }
.text-orange-400 { fill: #fb923c !important; }
.text-green-400 { fill: #34d399 !important; }

/* Larger overall card sizing */
#overall-score {
  padding: 2.5rem 1.5rem;
}
#overall-score .score-circle.large svg {
  width: 240px;
  height: 240px;
}
#overall-score .score-circle.large .number {
  font-size: 96px;
}
@media (max-width: 768px) {
  #overall-score .score-circle.large svg {
    width: 200px;
    height: 200px;
  }
  #overall-score .score-circle.large .number {
    font-size: 80px;
  }
  #overall-score {
    padding: 2rem 1rem;
  }
}

/* Title & grade styling */
#page-title-display {
  max-width: 90%;
  margin: 0 auto;
}
#overall-grade {
  transition: color 0.6s ease;
}

/* Module Cards - Clean Glass + Grade Border */
.score-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 3rem;
  padding: 0rem;
  text-align: center;
  border: 4px solid transparent;
  transition: border-color 0.6s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
}
.dark .score-card {
  background: rgba(229, 231, 235, 0.12);
}
.score-card:hover {
  transform: translateY(-8px);
}
.score-card.red { border-color: #f87171; }
.score-card.orange { border-color: #fb923c; }
.score-card.green { border-color: #34d399; }

/* Perfect centering for large overall score */
#overall-score .score-circle.large {
  display: flex;
  align-items: center;
  justify-content: center;
}
#overall-score .score-circle.large svg {
  width: 200px;
  height: 200px;
}
@media (max-width: 768px) {
  #overall-score .score-circle.large svg {
    width: 150px;
    height: 150px;
  }
}

/* Subtle neon halo (kept but opacity 0 as original) */
.score-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #000000);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  filter: blur(16px);
  transition: none;
}
.score-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

/* Grade borders */
.score-card.border-red-500 { border: 3px solid #ef4444 !important; }
.score-card.border-orange-500 { border: 3px solid #f97316 !important; }
.score-card.border-green-500 { border: 3px solid #22c55e !important; }

/* Labels & details */
.score-card .label,
.score-card > div:last-child {
  color: #34d399 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
.score-card button {
  color: white !important;
}
.score-card .details {
  color: #d1d5db !important;
}

/* Thin black outline on score numbers & progress for contrast */
.score-card .number {
  paint-order: stroke fill;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
  text-shadow: none !important;
}
.score-card .progress {
  paint-order: stroke fill;
  stroke: #000000;
  stroke-width: 12px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.score-card .bg {
  stroke: #ffffff;
  stroke-width: 12px;
}

/* Module grade display */
.module-grade {
  transition: opacity 0.6s ease, color 0.6s ease;
}
.module-grade.text-red-500 { color: #ef4444; }
.module-grade.text-orange-500 { color: #f97316; }
.module-grade.text-green-500 { color: #22c55e; }
.dark .module-grade.text-red-500,
.dark .module-grade.text-orange-500,
.dark .module-grade.text-green-500 {
  filter: brightness(1.2);
}

/* Dark mode grade adjustments */
.dark .score-card.red { border-color: #ef4444 !important; }
.dark .score-card.orange { border-color: #f97316 !important; }
.dark .score-card.green { border-color: #22c55e !important; }

/* Progress ring & number colors */
.stroke-red-400 { stroke: #f87171 !important; }
.stroke-orange-400 { stroke: #fb923c !important; }
.stroke-green-400 { stroke: #34d399 !important; }
.text-red-400 { fill: #f87171 !important; }
.text-orange-400 { fill: #fb923c !important; }
.text-green-400 { fill: #34d399 !important; }

/* More details button */
.more-details {
  background: #4f46e5;
  color: white;
}
.more-details:hover {
  background: #4338ca;
}

/* Module info reveal */
.module-info {
  transition: opacity 0.5s ease;
  opacity: 0;
}
.module-info:not(.hidden) {
  opacity: 1;
}

/* Stand-out links */
.how-tested-link,
.learn-more-link {
  font-size: 1.1rem;
  transition: all 0.3s ease;
}
.how-tested-link:hover,
.learn-more-link:hover {
  transform: translateX(4px);
  text-decoration: underline;
}
.dark .how-tested-link,
.dark .learn-more-link {
  color: #a78bfa;
}

/* Mobile Preview Frame */
#phone-frame {
  width: min(100%, 375px);
  height: auto;
  aspect-ratio: 9 / 19.5;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(to bottom, #111, #000);
  transition: all 0.6s ease;
  position: relative;
  overflow: hidden;
}
.iphone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 30px;
  background: #000;
  border-radius: 0 0 20px 20px;
}
.android-frame {
  background: linear-gradient(to bottom, #222, #000);
}
.android-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: #111;
}
#preview-iframe {
  border: none;
  background: #fff;
}
#phone-frame {
  transition: width 0.6s ease, height 0.6s ease, transform 0.6s ease;
  max-width: 100%;
  box-sizing: border-box;
}

/* Copy Code Badge */
#score-badge a:hover {
  color: #fb923c !important;
}
#score-badge a:hover > span {
  opacity: 1 !important;
}

/* 360 Health Radar */
#radar-container canvas#health-radar {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}
.chartjs-render-monitor {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Plugin Solutions Accordion */
.plugin-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}
.plugin-card:hover {
  border-color: rgba(249, 115, 22, 0.4);
  transform: translateY(-4px);
}
.accordion-header {
  background: rgba(0, 0, 0, 0.2);
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}
.accordion-header:hover {
  background: rgba(249, 115, 22, 0.15);
}
.accordion-content {
  padding: 0 1.5rem 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.accordion-content.open {
  max-height: 1200px;
  padding: 1.5rem;
}

.gradient-text {
  background: linear-gradient(to right, #f97316, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}