/* ========================================
   Helix Fabric v2 — Detection Challenge
   ======================================== */

:root {
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-card: #1a2236;
  --bg-card-hover: #1f2a42;
  --text-primary: #f0f2f5;
  --text-secondary: #94a3b8;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.15);
  --accent-glow: rgba(0, 212, 255, 0.3);
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --border: #2a3550;
  --radius: 8px;
  --radius-lg: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Header ---- */

header {
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, #0e1525 0%, var(--bg-primary) 100%);
}

.header-title {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.header-title .version {
  color: var(--accent);
  font-weight: 600;
}

.header-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.header-author {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.header-author a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.header-author a:hover {
  border-bottom-color: var(--accent);
}

/* ---- Sections ---- */

.section {
  padding: 64px 0;
}

.section:nth-child(even) {
  background-color: var(--bg-secondary);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
  color: var(--text-primary);
}

.section-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 32px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* ---- Stats Grid (Section 1) ---- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  margin-top: 12px;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.highlight-card {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.stat-question {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ---- Progress Bar ---- */

.progress-bar-container {
  max-width: 500px;
  margin: 0 auto 40px;
  text-align: center;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-text {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ---- Profile Cards Grid ---- */

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .profiles-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Individual Profile Card ---- */

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
}

.profile-card:hover {
  background: var(--bg-card-hover);
}

.profile-card.answered-real {
  border-color: var(--success);
  box-shadow: 0 0 0 1px var(--success);
}

.profile-card.answered-synthetic {
  border-color: var(--warning);
  box-shadow: 0 0 0 1px var(--warning);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.profile-identity h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.profile-identity .title-company {
  font-size: 0.88rem;
  color: var(--accent);
  margin-top: 2px;
}

.profile-bio {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 16px;
}

.profile-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.meta-tag {
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.profile-actions {
  display: flex;
  gap: 10px;
}

.btn-classify {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s;
  text-transform: uppercase;
}

.btn-classify:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn-classify.selected-real {
  background: rgba(34, 197, 94, 0.15);
  border-color: var(--success);
  color: var(--success);
}

.btn-classify.selected-synthetic {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--warning);
  color: var(--warning);
}

.btn-classify:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ---- Results Section ---- */

.hidden {
  display: none !important;
}

.score-display {
  text-align: center;
  margin-bottom: 40px;
}

.score-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.score-label {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.score-verdict {
  margin-top: 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.results-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.result-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border-left: 4px solid var(--border);
}

.result-card.correct {
  border-left-color: var(--success);
}

.result-card.incorrect {
  border-left-color: var(--error);
}

.result-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.result-card-truth {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.result-card-answer {
  font-size: 0.82rem;
  margin-top: 4px;
}

.result-card-answer.right {
  color: var(--success);
}

.result-card-answer.wrong {
  color: var(--error);
}

/* ---- Detection Signatures ---- */

.detection-signatures {
  margin-bottom: 48px;
}

.detection-signatures h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.signature-list {
  display: grid;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.signature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.signature-tag {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.signature-item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Helix Scores ---- */

.helix-scores {
  max-width: 700px;
  margin: 0 auto;
}

.helix-scores h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.helix-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.helix-score-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.helix-score-bar-wrap {
  flex: 1;
  margin: 0 20px;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.helix-score-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.helix-score-value {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 42px;
  text-align: right;
}

/* ---- Defense Section ---- */

.defense-highlight {
  text-align: center;
  margin-bottom: 32px;
}

.defense-stat {
  font-size: 1.2rem;
  color: var(--text-primary);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: inline-block;
  max-width: 700px;
}

.defense-links {
  text-align: center;
  margin-bottom: 40px;
}

.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg-primary);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}

.cta-button:hover {
  background: #00bfe6;
  transform: translateY(-1px);
}

/* ---- Expandable Methodology ---- */

.expandable {
  max-width: 800px;
  margin: 0 auto 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.expandable-toggle {
  width: 100%;
  padding: 18px 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.expandable-toggle:hover {
  background: var(--bg-card-hover);
}

.toggle-icon {
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.3s;
}

.toggle-icon.open {
  transform: rotate(45deg);
}

.expandable-content {
  padding: 24px;
  background: var(--bg-secondary);
}

.expandable-content h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--accent);
}

.signal-list {
  padding-left: 20px;
}

.signal-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.signal-list li strong {
  color: var(--text-primary);
}

/* ---- CTA Section ---- */

.cta-section {
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Footer ---- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.footer-line {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.footer-note {
  margin-top: 12px;
  font-style: italic;
  color: #64748b;
  font-size: 0.82rem;
}

/* ---- Reveal Animations ---- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .header-title {
    font-size: 1.6rem;
  }

  .header-subtitle {
    font-size: 0.9rem;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .stat-number {
    font-size: 2.2rem;
  }

  .score-number {
    font-size: 3rem;
  }

  .defense-stat {
    font-size: 1rem;
    padding: 20px 24px;
  }
}
