/* UHV-II Answer Key Portal - Paywall & Teaser Styles */
:root {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-muted: #1e293b;
  --bg-card: #151e32;
  --border-color: #243049;
  --border-subtle: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-light: rgba(59, 130, 246, 0.15);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --success-border: #065f46;
  --success-text: #34d399;

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --warning-border: #92400e;

  --danger: #ef4444;

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.5);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;

  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  user-select: none; /* Anti-copy measure */
  -webkit-user-select: none;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-badge {
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: #fff;
  font-weight: 900;
  font-size: 1.15rem;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.brand-title h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-tag {
  font-size: 0.68rem;
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-title p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-cta-unlock {
  padding: 0.5rem 1.15rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transition: all 0.15s ease;
  animation: subtle-pulse 2s infinite ease-in-out;
}

.btn-cta-unlock:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.5);
}

@keyframes subtle-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

/* Paywall Hero Banner */
.paywall-hero {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(16, 185, 129, 0.15));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 1.5rem 0 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.paywall-info {
  flex: 1;
  min-width: 300px;
}

.paywall-badge-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.badge-limited {
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-verified {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.paywall-info h2 {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.paywall-info p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  max-width: 580px;
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.feature-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Paywall Payment Card */
.paywall-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 340px;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
}

.price-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.price-currency {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--success);
}

.price-val {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
}

.price-period {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.price-strike {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 1rem;
  margin-left: 0.25rem;
}

.qr-frame {
  background: #ffffff;
  padding: 0.65rem;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 0.5rem 0 0.85rem 0;
  box-shadow: var(--shadow-sm);
}

.qr-frame img {
  display: block;
  width: 140px;
  height: 140px;
}

.upi-id-box {
  background: var(--bg-muted);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  font-size: 0.825rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.btn-copy-upi {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-whatsapp-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.65rem;
  border-radius: var(--radius-md);
  background: #25d366;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  margin-bottom: 0.6rem;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-send:hover {
  background: #20ba5a;
}

/* Unit Tabs */
.unit-nav-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 0;
  position: sticky;
  top: 70px;
  z-index: 40;
}

.unit-tabs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
}

.unit-tab {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.unit-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Sections */
.main-wrapper {
  padding: 1.75rem 0 5rem 0;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-label h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Teaser Unlocked Card */
.teaser-card {
  background: var(--bg-card);
  border: 2px solid var(--success-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

.teaser-badge-free {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.teaser-row {
  display: flex;
  align-items: flex-start;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.teaser-row:last-child {
  border-bottom: none;
}

.q-num {
  background: var(--bg-muted);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.q-body {
  flex: 1;
}

.q-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.q-ans-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
}

.q-ans-pill .opt-letter {
  background: var(--success);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.78rem;
}

.teaser-locked-notice {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-top: 1rem;
  text-align: center;
  border: 1px dashed var(--border-color);
}

.teaser-locked-notice p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* Locked Quizzes Grid */
.locked-quizzes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.locked-quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

.locked-quiz-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-subtle);
}

.locked-quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.locked-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--warning);
  background: var(--warning-bg);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.locked-quiz-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  line-height: 1.35;
}

.btn-card-unlock {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.btn-card-unlock:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

/* Unlock Passcode Box */
.passcode-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 2.5rem;
  text-align: center;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.passcode-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.passcode-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-muted);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none;
}

.passcode-input:focus {
  border-color: var(--primary);
}

.btn-submit-code {
  padding: 0.65rem 1.25rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .paywall-hero {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
  }

  .paywall-action-card {
    width: 100%;
  }

  .locked-quizzes-grid {
    grid-template-columns: 1fr;
  }
}
