/* ============================================================
   SOHOCHEQ — Results Section CSS
   Dark theme, pink #fd366e accents, no Tailwind dependency
   ============================================================ */

/* ── VARIABLES ── */
:root {
  --pink: #fd366e;
  --pink-glow: rgba(253, 54, 110, 0.4);
  --pink-soft: rgba(253, 54, 110, 0.1);
  --dark: #111113;
  --dark2: #1a1a1d;
  --dark3: #222226;
  --border: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.4);
  --text-dim: rgba(255, 255, 255, 0.22);
  --green: #4ade80;
  --blue: #60a5fa;
  --orange: #fb923c;
  --purple: #a78bfa;
}

/* ── RESET OLD TAILWIND BACKGROUNDS ── */
#results-section,
#results-section * {
  box-sizing: border-box;
}

/* ── RESULTS WRAPPER ── */
#results-section {
  background: var(--dark);
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  width: 100%;
  padding: 0;
}

/* ── LOADING OVERLAY ── */
#loading {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
#loading.hidden {
  display: none !important;
}
.loading-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#progress-steps {
  text-align: left;
  margin-bottom: 16px;
}
#progress-steps p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
#analysis-timer {
  font-size: 12px;
  color: var(--text-dim);
}

/* ── WEBSITE SCORECARD ── */

/* ── STAT DIALS GRID ── */
.dial-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 680px;
  margin: 0 auto 24px;
  padding: 0 28px;
}
.dial-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 12px;
  text-align: center;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.dial-card:hover {
  border-color: rgba(253, 54, 110, 0.3);
  box-shadow: 0 0 20px rgba(253, 54, 110, 0.08);
}
.dial-value {
  font-family: "Syne", sans-serif;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1;
}
.dial-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
#performance-score {
  color: var(--green) !important;
  text-shadow: 0 0 16px rgba(74, 222, 128, 0.4);
  background: none !important;
}
#mobile-score {
  color: var(--blue) !important;
  text-shadow: 0 0 16px rgba(96, 165, 250, 0.4);
  background: none !important;
}
#social-health-score {
  color: var(--purple) !important;
  text-shadow: 0 0 16px rgba(167, 139, 250, 0.4);
  background: none !important;
}
#content-score {
  color: var(--orange) !important;
  text-shadow: 0 0 16px rgba(251, 146, 60, 0.4);
  background: none !important;
}
#visibility-score {
  color: var(--pink) !important;
  text-shadow: 0 0 16px var(--pink-glow);
  background: none !important;
}

/* ── RECOMMENDATIONS ── */
#recommendations-list {
  max-width: 680px;
  margin: 0 auto 24px;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.recommendation-item {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: border-color 0.15s;
}
.recommendation-item:hover {
  border-color: rgba(253, 54, 110, 0.25);
}
.rec-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--pink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.rec-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.rec-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── SOCIAL TAB ── */
#social-tab {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 28px 32px;
}
#social-platforms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.social-platform-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.social-platform-card:hover {
  border-color: rgba(253, 54, 110, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.social-platform-card .platform-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.platform-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.platform-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.platform-handle {
  font-size: 11px;
  color: var(--text-muted);
}
.platform-score {
  font-family: "Syne", sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--pink);
  text-shadow: 0 0 16px var(--pink-glow);
  margin-bottom: 8px;
}
.platform-stat {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.platform-stat span {
  color: var(--text);
  font-weight: 600;
}

/* ── AI SOCIAL ADVICE ── */
#ai-social-advice {
  max-width: 680px;
  margin: 0 auto 24px;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-tip {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--pink);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.ai-tip strong {
  color: var(--text);
}

/* ── INFLUENCER SCOREBOARD ── */
#influencer-scoreboard {
  max-width: 680px;
  margin: 0 auto 24px;
  padding: 0 28px;
}
.scoreboard-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 10px;
}

/* ── SECTION HEADERS ── */
.results-section-title {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.results-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── PREMIUM ACTIONS ── */
#premium-actions {
  max-width: 680px;
  margin: 0 auto 32px;
  padding: 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
#premium-actions button,
#premium-actions a {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: "Montserrat", sans-serif;
}
#premium-actions .btn-primary {
  background: var(--pink);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px var(--pink-glow);
}
#premium-actions .btn-primary:hover {
  opacity: 0.88;
}
#premium-actions .btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
#premium-actions .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

/* ── FOOTER ── */
#site-footer {
  background: var(--dark2);
  border-top: 1px solid var(--border);
  padding: 24px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
}

/* ── TABS (score section) ── */
.tab-buttons {
  display: flex;
  gap: 6px;
  max-width: 680px;
  margin: 0 auto 20px;
  padding: 0 28px;
}
.tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: "Montserrat", sans-serif;
}
.tab-btn.active {
  background: var(--pink);
  color: #fff;
  border-color: var(--pink);
  box-shadow: 0 4px 12px var(--pink-glow);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ── DIAL FACE (website-score-charts.js) ── */
.dial-face {
  background: var(--dark2) !important;
  border-color: var(--border) !important;
}
.dial-face .text-2xl,
.dial-face .text-xl {
  color: #fff !important;
}
.dial-label-text {
  color: var(--text-muted) !important;
}

/* ── ANIMATIONS ── */
@keyframes resultsFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Scorecard Container (Glassmorphism) --- */
.score-showcase {
  position: relative;
  width: 300px; /* Adjust size as needed */
  height: 300px;
  margin: 50px auto;
  display: flex;
  justify-content: center;
  align-items: center;

  /* Frosted glass effect */
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  overflow: hidden;
}

/* --- Animated Glow Rings --- */
.score-glow-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.5); /* Primary violet */
  animation: ring-pulse 3s infinite ease-out;
  opacity: 0;
}

.delay-1 {
  animation-delay: 1s;
}
.delay-2 {
  animation-delay: 2s;
}

@keyframes ring-pulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* --- SVG Arc Container --- */
.score-arc-container {
  position: relative;
  width: 90%;
  height: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.score-arc-svg {
  width: 100%;
  height: 100%;
}

/* --- Animated Progress Arc --- */
.score-arc-progress {
  stroke-dasharray: 534; /* Circumference (2 * pi * 85) */
  stroke-dashoffset: 534; /* Hidden initially */
  animation: score-fill 2s ease-out forwards;
  animation-delay: 0.5s;
}

@keyframes score-fill {
  to {
    /* Change this value to adjust progress: 
           0 = full circle, 534 = empty */
    stroke-dashoffset: 100;
  }
}

/* --- Center Text Styling --- */
.score-arc-content {
  position: absolute;
  text-align: center;
  color: white;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
}

.score-arc-number {
  font-weight: 900;
  /* Styles already applied in HTML for text */
}

/* --- Subtle Inner Background --- */
body {
  background-color: #111; /* Dark background to make glow pop */
}

#recommendations-list .recommendation-item {
  animation: resultsFadeIn 0.4s ease both;
}
.social-platform-card {
  animation: resultsFadeIn 0.4s ease both;
}

/* ── HIDE OLD NAV/HEADER from old HTML ── */
nav.old-nav,
header.old-header,
#theme-toggle,
.switch-glow-wrapper,
.state-switch-container {
  display: none !important;
}

/* ── UTILITY ── */
.hidden {
  display: none !important;
}

/**********Scoreboard Mobile**********/
@media (max-width: 480px) {
  .score-showcase {
    width: 200px !important;
    height: 200px !important;
    margin: 24px auto !important;
  }
}

@media (max-width: 820px) {
  .score-showcase {
    width: 200px !important;
    height: 200px !important;
    margin: 24px auto !important;
  }
}
