:root {
  --bg-color: #0b0b0f;
  --bg-secondary: #121318;
  --bg-dark: #0b0b0f;
  --panel-bg: rgba(18, 19, 24, 0.7);
  --panel-border: rgba(255, 255, 255, 0.06);
  --panel-border-hover: rgba(255, 255, 255, 0.12);
  --glass-bg: rgba(18, 19, 24, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --text-silver: #f3f4f6;
  
  --accent: #8b5cf6;
  --accent-secondary: #a78bfa;
  --accent-teal: #06B6D4;
  --accent-teal-glow: rgba(6, 182, 212, 0.5);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.5);
  
  --gold: #f59e0b;
  --gold-bg: rgba(245, 158, 11, 0.05);
  --gold-border: rgba(245, 158, 11, 0.2);
  
  --success: #10b981;
  --success-dim: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.2);
  
  --warning: #f59e0b;
  --warning-dim: rgba(245, 158, 11, 0.1);
  --warning-border: rgba(245, 158, 11, 0.2);
  
  --danger: #ef4444;
  --danger-dim: rgba(239, 68, 68, 0.1);
  --danger-border: rgba(239, 68, 68, 0.2);
  
  --glass-blur: blur(24px);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-top: 0;
  position: relative;
  z-index: 2;
}

.top-bar {
  padding: 1.25rem 2rem;
  background: rgba(6, 182, 212, 0.05);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  gap: 2rem;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-icon {
  color: var(--text-main);
}
.brand h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-main);
}
.brand-highlight {
  color: var(--accent);
}

.search-box {
  flex: 1;
  display: flex;
  gap: 1rem;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 0.25rem 0.25rem 0.25rem 1.25rem;
  transition: all var(--transition-normal);
}
.search-box:focus-within {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
}
.search-icon {
  color: var(--text-dim);
}

input[type="text"]::placeholder {
  color: var(--text-dim);
}

input[type="text"] {
  flex: 1;
  padding: 0.75rem 0;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.05rem;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: transparent;
  color: var(--text-muted);
}
.btn-primary:hover:not(:disabled) {
  color: var(--text-main);
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-teal);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--accent-teal);
  background: rgba(6, 182, 212, 0.05);
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
}
.feedback-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.dashboard {
  padding: 0 2.5rem 2.5rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.panel-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  animation: fadeIn 0.5s ease;
}

.panel-subtitle {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.panel-description {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

    /* Verdict Section */
    .verdict-banner {
      background: var(--panel-bg);
      backdrop-filter: var(--glass-blur);
      border: 1px solid var(--panel-border);
      border-radius: var(--radius-xl);
      padding: 2.5rem 2.5rem;
      text-align: left;
      margin-bottom: 0;
      transition: all 0.4s ease;
      position: relative;
      overflow: hidden;
    }

    .verdict-banner::after {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.02) 50%, transparent 60%);
      pointer-events: none;
    }

/* Verdict Banner */
.verdict-banner {
  background: linear-gradient(180deg, var(--gold-bg) 0%, var(--panel-bg) 100%);
  border-color: var(--gold-border);
}
.verdict-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.confidence-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold);
}
.verdict-claim {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.verdict-value {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold);
}
.verdict-icon {
  flex-shrink: 0;
}
.verdict-one-line {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.7;
}

/* Breakdown Grid */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.breakdown-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.card-success { border-color: var(--success-border); }
.card-danger { border-color: var(--danger-border); }
.card-warning { border-color: var(--warning-border); }

.card-success h4 { color: var(--success); }
.card-danger h4 { color: var(--danger); }
.card-warning h4 { color: var(--warning); }

.breakdown-card h4 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.breakdown-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Accordion (Hidden Stories) */
.counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--text-main);
  font-size: 0.75rem;
}
.accordion-item {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}
.accordion-header {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.accordion-content {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.accordion-item.active .accordion-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  max-height: 2000px;
}
.accordion-item.active .chevron-icon {
  transform: rotate(180deg);
}
.chevron-icon {
  transition: transform 0.3s ease;
  color: var(--text-dim);
}
.why-it-matters {
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.why-it-matters-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}
.why-it-matters p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Sources Table */
.table-container {
  overflow-x: auto;
}
.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}
.premium-table th {
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--panel-border);
}
.premium-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.premium-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.confidence-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.confidence-bar-bg {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
  max-width: 60px;
}
.confidence-bar-fill {
  height: 100%;
  border-radius: 999px;
}
.conf-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 45px;
}

    .loader {
      display: none;
      width: 24px;
      height: 24px;
      border: 3px solid rgba(255,255,255,0.3);
      border-radius: 50%;
      border-top-color: #fff;
      animation: spin 1s ease-in-out infinite;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .empty-state {
      text-align: center;
      padding: 6rem 2rem;
      color: var(--text-muted);
    }

    #lowEvidenceWarning {
      background: var(--warning-dim);
      border: 1px solid rgba(234, 179, 8, 0.2);
      border-left: 3px solid var(--warning);
      border-radius: var(--radius-sm);
      padding: 1rem 1.25rem;
      margin-bottom: 1.5rem;
      font-size: 0.95rem;
      color: var(--text-main);
      line-height: 1.6;
    }

    .error-panel-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
        border-radius: 50%;
        background: rgba(239, 68, 68, 0.15);
        border: 2px solid var(--danger);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        color: var(--danger);
        font-weight: 700;
        margin-top: 0.2rem;
    }

    #errorPanel {
      display: none;
      align-items: flex-start;
      gap: 1.25rem;
      margin: 2rem 2.5rem;
      padding: 1.5rem 1.75rem;
      background: var(--danger-dim);
      border: 1px solid rgba(239, 68, 68, 0.2);
      border-left: 3px solid var(--danger);
      border-radius: var(--radius-lg);
      backdrop-filter: var(--glass-blur);
      animation: fadeIn 0.3s ease;
    }

    .error-panel-body {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
    }

    .error-panel-title {
        font-size: 1.15rem;
        font-weight: 700;
        color: var(--danger);
    }

    .error-panel-msg {
        font-size: 0.95rem;
        color: var(--text-main);
        line-height: 1.6;
    }

    .error-panel-detail {
        font-size: 0.8rem;
        color: var(--text-muted);
        font-family: monospace;
        margin-top: 0.25rem;
    }

    .error-panel-retry {
        margin-top: 1rem;
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        align-self: flex-start;
    }

    .terms-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-teal);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 235, 199, 0.1);
  }

    .terms-banner-icon {
      font-size: 1.3rem;
      flex-shrink: 0;
      margin-top: 0.1rem;
    }

    .terms-banner-close {
      background: none;
      border: 1px solid rgba(255,255,255,0.1);
      color: var(--text-muted);
      cursor: pointer;
      padding: 0.25rem 0.6rem;
      border-radius: 6px;
      font-size: 0.85rem;
      flex-shrink: 0;
      margin-left: auto;
      transition: all 0.2s ease;
    }

    .terms-banner-close:hover {
      background: rgba(255,255,255,0.1);
      color: var(--text-main);
    }


    .pipeline-tracker {
      background: var(--panel-bg);
      backdrop-filter: var(--glass-blur);
      border: 1px solid var(--panel-border);
      border-radius: var(--radius-lg);
      padding: 1.25rem 2rem;
      margin: 1rem 2.5rem 0 2.5rem;
      animation: fadeIn 0.5s ease;
    }

    .pipeline-label {
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--text-dim);
      display: block;
      margin-bottom: 1rem;
    }

    .pipeline-steps {
      display: flex;
      gap: 1.5rem;
      flex-wrap: wrap;
      align-items: center;
    }

    .pipeline-step {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.9rem;
      color: var(--text-dim);
      transition: color var(--transition-normal);
    }

    .pipeline-step.active {
      color: var(--text-main);
    }

    .pipeline-step.completed {
      color: var(--success);
    }

    .pipeline-step.completed .step-indicator {
      color: var(--success);
    }

    .pipeline-step.active .step-indicator {
      color: var(--accent);
      animation: pulse 1.5s ease-in-out infinite;
    }

    .step-indicator {
      font-size: 1rem;
      width: 1.2rem;
      text-align: center;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }

    .skeleton-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.5rem;
      margin-top: 1.5rem;
    }

    .skeleton-card {
      background: var(--panel-bg);
      border: 1px solid var(--panel-border);
      border-radius: var(--radius-lg);
      position: relative;
      overflow: hidden;
    }

    .skeleton-card::after {
      content: "";
      position: absolute;
      top: 0; left: -100%; right: 0; bottom: 0;
      width: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
      animation: shimmer 2s ease-in-out infinite;
    }

    .skeleton-lg { height: 160px; }
    .skeleton-md { height: 140px; }

    @keyframes shimmer {
      0% { transform: translateX(-100%); }
      100% { transform: translateX(200%); }
    }

    .main-content::-webkit-scrollbar {
      width: 6px;
    }

    .main-content::-webkit-scrollbar-track {
      background: transparent;
    }

    .main-content::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 3px;
    }

    .main-content::-webkit-scrollbar-thumb:hover {
      background: rgba(255, 255, 255, 0.2);
    }
    @media (max-width: 768px) {
      .top-bar {
        flex-wrap: wrap;
        padding: 1rem;
      }
      .brand { order: 0; }
      #loadingStatus { order: 1; margin-left: auto; }
      .search-box { width: 100%; order: 2; }
      #contactLink { order: 3; width: 100%; justify-content: center; }

      .dashboard { padding: 1rem; gap: 1.25rem; }
      .panel { padding: 1.25rem; }
      .verdict-banner { padding: 1.5rem; }
      .verdict-value { font-size: 1.6rem; }
      .verdict-one-line { font-size: 0.95rem; }

      .skeleton-grid { grid-template-columns: 1fr; }

      #relevantSourcesTable thead,
      #backgroundSourcesTable thead {
        display: none;
      }
      #relevantSourcesTable tbody tr,
      #backgroundSourcesTable tbody tr {
        display: flex;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--panel-border);
        border-radius: var(--radius-md);
        padding: 1rem;
        margin-bottom: 0.75rem;
      }
      #relevantSourcesTable tbody tr:hover,
      #backgroundSourcesTable tbody tr:hover {
        background: rgba(255, 255, 255, 0.04);
      }
      #relevantSourcesTable td,
      #backgroundSourcesTable td {
        padding: 0.3rem 0;
        border-bottom: none;
        font-size: 0.9rem;
      }
      #relevantSourcesTable td:nth-child(2)::before,
      #backgroundSourcesTable td:nth-child(2)::before {
        content: "Stance: "; font-weight: 600; color: var(--text-dim); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.05em;
      }
      #relevantSourcesTable td:nth-child(3)::before,
      #backgroundSourcesTable td:nth-child(3)::before {
        content: "Confidence: "; font-weight: 600; color: var(--text-dim); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.05em;
      }
      #relevantSourcesTable td:nth-child(4)::before,
      #backgroundSourcesTable td:nth-child(4)::before {
        content: "Key Emphasis: "; font-weight: 600; color: var(--text-dim); text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.05em;
      }
      #relevantSourcesTable td:nth-child(5),
      #backgroundSourcesTable td:nth-child(5) {
        max-width: 100%; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--panel-border);
      }

      .breakdown-grid { grid-template-columns: 1fr; }
      .bloc-grid { grid-template-columns: 1fr; }
      .hidden-story-sources { flex-direction: column !important; gap: 1rem !important; }

      .pipeline-tracker { margin: 0.5rem 1rem 0 1rem; padding: 1rem; }
      .pipeline-steps { gap: 0.75rem; }
      .pipeline-step { font-size: 0.8rem; }
      #errorPanel { margin: 1rem !important; padding: 1rem !important; }
      .terms-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-teal);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 235, 199, 0.1);
  }
    }

    @media (max-width: 480px) {
      input[type="text"] { font-size: 1rem; padding: 0.75rem 1rem; }
      .btn { padding: 0.75rem 1.25rem; font-size: 0.9rem; }
      #contactLink { display: none !important; }

      .dashboard { padding: 0.75rem; }
      .panel { padding: 1rem; border-radius: var(--radius-md); }

      #relevantSourcesTable td:nth-child(2),
      #backgroundSourcesTable td:nth-child(2),
      #relevantSourcesTable td:nth-child(4),
      #backgroundSourcesTable td:nth-child(4) { display: none; }

      #relevantSourcesTable tr.expanded td:nth-child(2),
      #backgroundSourcesTable tr.expanded td:nth-child(2),
      #relevantSourcesTable tr.expanded td:nth-child(4),
      #backgroundSourcesTable tr.expanded td:nth-child(4) { display: block; }

      .source-card-toggle {
        display: block; width: 100%; background: none; border: none; border-top: 1px solid var(--panel-border);
        color: var(--text-dim); font-size: 0.75rem; font-family: 'Outfit', sans-serif; letter-spacing: 0.05em;
        padding: 0.5rem 0 0 0; margin-top: 0.5rem; cursor: pointer; text-align: center; transition: color 0.2s ease;
      }
      .source-card-toggle:hover { color: var(--text-muted); }
      .source-card-toggle-cell { width: 100%; }
    }

    @media (min-width: 481px) {
      .source-card-toggle { display: none !important; }
    }

    .source-card-toggle-cell { padding: 0; width: 0; border: none; }

/* --- Login Screen --- */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #030712;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.login-card {
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15),
              0 0 60px rgba(59, 130, 246, 0.08),
              0 4px 24px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.login-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #f3f4f6;
  margin-bottom: 0.5rem;
}

.login-title-accent {
  color: #3b82f6;
}

.login-subtitle {
  color: #9ca3af;
  font-size: 0.95rem;
  margin: 0 0 2rem 0;
  font-weight: 500;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  color: #f3f4f6;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input::placeholder {
  color: #6b7280;
}

.login-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.login-btn {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  margin-top: 0.5rem;
}

.login-btn:hover {
  background: #2563eb;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  animation: loginFadeIn 0.3s ease;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .login-card {
    padding: 2.5rem 1.5rem;
  }
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}


/* Processing Aesthetic */
.verdict-processing-state {
    border-color: transparent !important;
    background: transparent !important;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    font-size: 1.6rem;
    font-weight: 500;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.1em;
    color: var(--accent-teal);
    text-align: center;
    text-shadow: 0 0 15px var(--accent-teal-glow);
}

.verdict-processing-state .verdict-header { display: none; }


/* --- Login Screen Inspiration Styles --- */
.login-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Glass Panel Component */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); /* Safari support */
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-left: 1px solid var(--glass-highlight);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.7), 
        0 0 60px rgba(6, 182, 212, 0.05) inset;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header & Logo */
.panel-header {
    text-align: center;
    margin-bottom: 40px;
}

.lens-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--accent-teal), transparent);
    position: relative;
    animation: rotateSlow 8s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px var(--accent-teal-glow);
}

.lens-core {
    width: 48px;
    height: 48px;
    background-color: var(--bg-dark);
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

@keyframes rotateSlow {
    100% { transform: rotate(360deg); }
}

.panel-header h1 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.subtitle {
    font-size: 13px;
    color: var(--accent-teal);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 8px;
    font-weight: 500;
}

/* Auth Navigation Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.35);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--panel-border);
    margin-top: 1.5rem;
}

.auth-tab {
    flex: 1;
    padding: 9px 16px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-dim);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
}

.auth-tab.active {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-teal);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

/* Form Inputs */
.input-wrapper {
    margin-bottom: 24px;
}

label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.input-field-container {
    position: relative;
}

.login-wrapper input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: var(--text-silver);
    font-size: 15px;
    letter-spacing: 0.1em;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.input-wrapper:focus-within label {
    color: var(--accent-teal);
}

input::placeholder {
    color: rgba(226, 232, 240, 0.3);
}

/* Glow Border Animation on Focus */
.glow-border {
    display: none;
}

.login-wrapper input:focus {
    background: rgba(255, 255, 255, 0.05);
}

input:focus + .glow-border {
    width: calc(100% - 32px);
}

.input-field-container:focus-within ~ label,
input:focus-within ~ label {
    /* Need JS to perfectly target previous sibling label in some layouts, 
       but we can use structural selectors or just let JS handle the label glow */
}

/* Button */
.auth-btn {
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--accent-teal), #0284c7);
    color: var(--bg-dark);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    z-index: 1;
    transition: left 0.6s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.auth-btn:hover .btn-glow {
    left: 100%;
}

/* Active/Success states handled by JS */
.auth-btn.success {
    background: linear-gradient(135deg, var(--accent-amber), #d97706);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

/* Footer Badge */
.panel-footer {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-amber);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.status-badge:hover {
    opacity: 1;
    text-shadow: 0 0 10px var(--accent-amber-glow);
}

.warning-icon {
    width: 16px;
    height: 16px;
}

.login-error-modern {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    line-height: 1.4;
    animation: loginFadeIn 0.3s ease;
}

#resendCodeBtn {
    transition: color 0.2s ease, opacity 0.2s ease;
}

#resendCodeBtn:hover {
    color: #38bdf8 !important;
    text-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

#resendCodeBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

/* Guest Claim Wrapper & Tooltip */
#guestClaimWrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#guestClaimWrapper.claim-used {
    cursor: not-allowed;
}

#guestClaimWrapper.claim-used #verifyBtn {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

#guestClaimWrapper.claim-used::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(18, 19, 24, 0.95);
    color: var(--text-main);
    border: 1px solid var(--panel-border-hover);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
    z-index: 100;
}

#guestClaimWrapper.claim-used:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

