/* assets/css/saas-style.css - QuizVid SaaS Design System */
:root {
  --bg: #030712;
  --panel: #0f172a;
  --panel-light: #1e293b;
  --card-bg: rgba(15, 23, 42, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --accent-cyan: #38bdf8;
  --accent-purple: #a855f7;
  --accent-rose: #f43f5e;
  --accent-gold: #facc15;
  --accent-green: #22c55e;
  --text: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --grad-primary: linear-gradient(135deg, #38bdf8, #a855f7, #f43f5e);
  --grad-gold: linear-gradient(135deg, #facc15, #f97316);
  --grad-cyan-purple: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-glow: 0 10px 40px rgba(56, 189, 248, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, .brand-title, .outfit {
  font-family: 'Outfit', sans-serif;
}

/* Ambient Background Glows */
.glow-blob {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}
.glow-1 { top: -100px; left: -100px; background: #38bdf8; }
.glow-2 { top: 40%; right: -150px; background: #a855f7; }
.glow-3 { bottom: 10%; left: 20%; background: #f43f5e; }

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navbar */
header.saas-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(3, 7, 18, 0.85);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-title {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-cyan); }
.nav-user-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

/* User Quota Nav Pill */
.nav-quota-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 700;
}
.nav-quota-pill .quota-badge {
  background: var(--accent-cyan);
  color: #030712;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}
.btn-primary {
  background: var(--grad-primary);
  color: #030712;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.5);
}
.btn-gold {
  background: var(--grad-gold);
  color: #030712;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  color: #fff;
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}
.btn-danger:hover {
  background: #ef4444;
  color: #fff;
}
.btn-lg {
  padding: 15px 34px;
  font-size: 1.05rem;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}
.btn-block {
  width: 100%;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-free {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}
.badge-creator {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--accent-cyan);
}
.badge-pro {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: var(--accent-purple);
}

/* Alert Notification Banners */
.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.alert-warning {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.15), rgba(249, 115, 22, 0.15));
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fef08a;
}
.alert-danger {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(185, 28, 28, 0.15));
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

/* Auth Card Styles */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 60px 20px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  position: relative;
}
.auth-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  text-align: center;
}
.auth-card p.subtitle {
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 28px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.form-control {
  width: 100%;
  background: #030712;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.auth-divider span {
  padding: 0 12px;
}

/* Dashboard Grid & HUD */
.dashboard-page {
  padding: 40px 0 80px 0;
  flex: 1;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
}
.dashboard-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
}
.dashboard-header p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.stat-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
}
.stat-card-icon {
  font-size: 1.4rem;
}
.stat-value {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  margin-bottom: 12px;
}
.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--grad-primary);
  transition: width 0.5s ease;
}

/* Studio Hero Action Box */
.studio-action-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.85), rgba(15, 23, 42, 0.95));
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-bottom: 40px;
  box-shadow: 0 20px 50px rgba(168, 85, 247, 0.2);
  flex-wrap: wrap;
}
.studio-action-card h2 {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.studio-action-card p {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 600px;
}

/* Table Card */
.table-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 40px;
}
.table-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 20px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  padding: 12px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 16px;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.data-table tr:last-child td {
  border-bottom: none;
}

/* Razorpay Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  padding: 36px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}
.modal-overlay.active .modal-box {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
}
.modal-close:hover { color: #fff; }

/* Footer */
footer.saas-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: auto;
}
footer.saas-footer a { color: var(--accent-cyan); text-decoration: none; }

/* Dynamic Hero & Conversion Enhancements */
.hero-title {
  min-height: 2.2em;
}
.grad-typed-text {
  background: linear-gradient(135deg, #38bdf8 0%, #a855f7 50%, #f43f5e 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: heroGradFlow 5s ease infinite;
  display: inline-block;
  font-weight: 900;
  text-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
}
@keyframes heroGradFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.typed-cursor {
  color: #38bdf8 !important;
  -webkit-text-fill-color: #38bdf8 !important;
  font-weight: 300;
  opacity: 1;
  animation: typedBlink 0.75s infinite;
  font-family: monospace;
}
@keyframes typedBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Hero Showcase Phone Mockup */
.hero-mockup-wrapper {
  margin: 50px auto 0 auto;
  max-width: 360px;
  position: relative;
}
.hero-phone-frame {
  background: #090d16;
  border: 4px solid #1e293b;
  border-radius: 36px;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 50px rgba(56, 189, 248, 0.2);
  padding: 18px 14px;
  position: relative;
  overflow: hidden;
  text-align: left;
}
.hero-phone-notch {
  width: 90px;
  height: 18px;
  background: #1e293b;
  border-radius: 0 0 12px 12px;
  margin: -18px auto 14px auto;
}
.hero-phone-timer {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}
.hero-phone-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #38bdf8, #a855f7);
  border-radius: 4px;
  animation: timerProgress 4s ease-in-out infinite;
}
@keyframes timerProgress {
  0% { width: 100%; background: #38bdf8; }
  60% { background: #facc15; }
  100% { width: 0%; background: #ef4444; }
}

.hero-phone-qbox {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.hero-phone-option {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.hero-phone-option.correct {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #4ade80;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
}
.hero-float-tag {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  animation: floatTag 3s ease-in-out infinite;
}
.hero-float-tag-left {
  top: 20%;
  left: -40px;
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}
.hero-float-tag-right {
  bottom: 25%;
  right: -40px;
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
  animation-delay: 1.5s;
}
@keyframes floatTag {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .dashboard-header { flex-direction: column; align-items: flex-start; }
  .studio-action-card { flex-direction: column; text-align: center; }
  .auth-card { padding: 30px 20px; }
  .hero-float-tag-left { left: 5px; top: 10px; }
  .hero-float-tag-right { right: 5px; bottom: 10px; }
}
