/* ============================================
   RAZOR AI TUTOR - Global Styles
   Future-Tech Theme (v2.0)
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap');

/* CSS Variables - Future Tech Theme */
:root {
  /* Brand Colors */
  --primary-cyan: #06b6d4;
  --primary-blue: #3b82f6;
  --primary-gradient: linear-gradient(135deg, var(--primary-cyan), var(--primary-blue));
  --primary-glow: 0 0 20px rgba(6, 182, 212, 0.5);

  /* Backgrounds */
  --bg-dark: #0f172a;
  /* Slate 900 */
  --bg-card: rgba(30, 41, 59, 0.7);
  /* Slate 800 + Opacity */
  --bg-hover: rgba(51, 65, 85, 0.8);
  /* Slate 700 + Opacity */

  /* Text */
  --text-main: #f8fafc;
  /* Slate 50 */
  --text-muted: #94a3b8;
  /* Slate 400 */
  --text-accent: #38bdf8;
  /* Sky 400 */

  /* Borders & Effects */
  --border-color: rgba(148, 163, 184, 0.1);
  --border-glow: rgba(56, 189, 248, 0.3);
  --glass-blur: blur(12px);

  /* Functional */
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;

  /* Fonts */
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* Light Theme Overrides */
[data-theme="light"] {
  --bg-dark: #f0f4f8;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-hover: rgba(241, 245, 249, 0.9);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-accent: #0284c7;
  --border-color: rgba(148, 163, 184, 0.25);
  --border-glow: rgba(6, 182, 212, 0.2);
  --primary-glow: 0 0 20px rgba(6, 182, 212, 0.25);
}

[data-theme="light"] body {
  background-image:
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.08) 0px, transparent 50%);
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .footer {
  background: rgba(30, 41, 59, 0.95);
  color: #f8fafc;
}

[data-theme="light"] .footer h4,
[data-theme="light"] .footer p,
[data-theme="light"] .footer a,
[data-theme="light"] .footer .footer-bottom {
  color: #cbd5e1;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
  height: 100%;
  overflow-y: auto;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.15) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

a:hover {
  color: var(--primary-cyan);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

ul,
ol {
  list-style: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}


.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 2rem;
  /* Pill shape */
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
  background: rgba(6, 182, 212, 0.05);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* Dark Mode Toggle Button */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--gray-100);
  border: 2px solid var(--gray-200);
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: 1.25rem;
}

.theme-toggle:hover {
  background-color: var(--gray-200);
  border-color: var(--gray-300);
  transform: scale(1.05);
}

[data-theme="dark"] .theme-toggle {
  background-color: var(--gray-800);
  border-color: var(--gray-700);
  color: var(--gray-300);
}

[data-theme="dark"] .theme-toggle:hover {
  background-color: var(--gray-700);
  border-color: var(--gray-600);
}

/* ============================================
   CARDS
   ============================================ */

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.card-feature {
  text-align: center;
  padding: 2rem;
}

.card-feature .icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--primary-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-cyan);
  font-size: 2rem;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.card-feature h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.card-feature p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Pricing Cards */
.pricing-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: 2rem;
  padding: 3rem 2rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  text-align: center;
  position: relative;
  transition: all var(--transition-normal);
}

.pricing-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.15);
}

.pricing-card.popular {
  border: 1px solid var(--primary-cyan);
  background: rgba(6, 182, 212, 0.05);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
  transform: scale(1.05);
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-10px);
  box-shadow: 0 0 50px rgba(6, 182, 212, 0.3);
}

.pricing-card .badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-gradient);
  color: #fff;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: var(--primary-glow);
}

.pricing-card .plan-name {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pricing-card .price {
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--primary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 1.5rem 0;
  text-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.pricing-card .price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  -webkit-text-fill-color: var(--text-muted);
}

.pricing-card .features {
  margin: 2.5rem 0;
  text-align: left;
}

.pricing-card .features li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--text-muted);
}

.pricing-card .features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-cyan);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* ============================================
   FORMS
   ============================================ */

/* ============================================
   FORMS
   ============================================ */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  background-color: rgba(15, 23, 42, 0.6);
  color: var(--text-main);
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
  background-color: rgba(15, 23, 42, 0.9);
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.form-checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  accent-color: var(--primary-cyan);
  cursor: pointer;
}

.form-checkbox span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-checkbox a {
  color: var(--primary-cyan);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-cyan);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

/* ============================================
   HEADER & NAVIGATION
   - Re-applying header styles ensures no partial overwrites
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(15, 23, 42, 0.85);
  /* Dark */
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  background-color: rgba(15, 23, 42, 0.95);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 0 5px rgba(6, 182, 212, 0.5));
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.logo-text span {
  color: var(--primary-cyan);
}

.nav-desktop {
  display: none;
}

.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-desktop a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width var(--transition-normal);
  box-shadow: var(--primary-glow);
}

.nav-desktop a:hover {
  color: var(--text-main);
}

.nav-desktop a:hover::after {
  width: 100%;
}

.header-actions {
  display: none;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: var(--text-main);
  transition: all var(--transition-normal);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 999;
  overflow-y: auto;
}

[data-theme="light"] .mobile-nav {
  background-color: rgba(255, 255, 255, 0.98);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav a {
  display: block;
  padding: 1rem 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-nav a:hover,
.mobile-nav a:active {
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary-cyan);
}

.mobile-nav .btn {
  margin-top: 1rem;
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */

/* Footer replaced at end of file, leaving placeholder here to maintain structure if needed, 
   but actual footer styles are moved to end of file to ensure cascade priority */

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  padding: 10rem 0 6rem;
  background: var(--bg-dark);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent);
  opacity: 0.5;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(to right, #fff, #cbd5e1);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
}

.hero-text h1 span {
  background: var(--primary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.5));
}

.hero-text p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 550px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-image {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--primary-cyan), transparent, var(--primary-blue));
  z-index: -1;
  opacity: 0.5;
  filter: blur(10px);
}

/* Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
}

.stat-item .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: transparent;
  background: var(--primary-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-heading);
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.stat-item .label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 5rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* ============================================
   MARQUEE SECTION
   ============================================ */

.marquee-section {
  background: rgba(6, 182, 212, 0.05);
  /* Very transparent cyan */
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

.marquee {
  display: flex;
  animation: marquee 20s linear infinite;
  white-space: nowrap;
}

.marquee-content {
  display: flex;
  gap: 4rem;
  padding-right: 4rem;
}

.marquee-item {
  color: var(--text-accent);
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.marquee-item::before {
  content: '✦';
  color: var(--primary-cyan);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ============================================
   PRICING SECTION
   ============================================ */

.pricing-section {
  background: var(--bg-dark);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  background-image:
    radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.1), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.1), transparent 25%);
  padding: 2rem 1rem;
}

.auth-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 10;
}

.auth-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(20px);
  border-radius: 2rem;
  padding: 3rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header .logo {
  justify-content: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.auth-footer {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary-cyan);
  font-weight: 600;
  margin-left: 0.5rem;
}

.alert {
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  display: none;
  backdrop-filter: blur(5px);
}

.alert.show {
  display: block;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================
   DASHBOARD
   ============================================ */

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-page {
  padding-top: 80px;
  min-height: 100vh;
  background: var(--bg-dark);
}

.dashboard-header {
  background: rgba(15, 23, 42, 0.5);
  border-bottom: 1px solid var(--border-color);
  padding: 3rem 0;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.dashboard-content {
  padding: 3rem 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.dashboard-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.dashboard-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary-cyan);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.plan-badge {
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--primary-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.5rem;
}

/* Dynamic Dashboard Elements */
.progress-entry {
  margin-bottom: 1.5rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.progress-label strong {
  font-weight: 500;
  color: var(--text-main);
}

.progress-label span {
  color: var(--primary-cyan);
}

.progress-track {
  height: 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  overflow: hidden;
}

.progress-fill-dynamic {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.learning-item,
.subject-list-item {
  background: rgba(30, 41, 59, 0.4);
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.learning-item:hover,
.subject-list-item:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: var(--primary-cyan);
  transform: translateX(5px);
}

.learning-content,
.subject-list-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.learning-icon,
.subject-list-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.5rem;
}

.learning-info strong,
.subject-list-info strong {
  display: block;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.1rem;
}

.learning-info span,
.subject-list-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.empty-state {
  color: var(--text-muted);
  padding: 1rem;
  font-style: italic;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.5rem;
}

/* Progress Bars */
.progress-item {
  margin-bottom: 1.5rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.progress-header span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.progress-header .percent {
  color: var(--primary-cyan);
  font-weight: 700;
  font-family: var(--font-heading);
}

.progress-bar {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subject Cards (in Dashboard) */
.subject-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.subject-card {
  background: rgba(30, 41, 59, 0.4);
  border-radius: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.subject-card:hover {
  border-color: var(--primary-cyan);
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
  background: rgba(30, 41, 59, 0.6);
}

.subject-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Specific Subject Colors - converted to glow effects */
.subject-card.math .icon {
  color: #60a5fa;
  box-shadow: 0 0 15px rgba(96, 165, 250, 0.2);
}

.subject-card.mathlit .icon {
  color: #34d399;
  box-shadow: 0 0 15px rgba(52, 211, 153, 0.2);
}

.subject-card.physics .icon {
  color: #fbbf24;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.subject-card.life .icon {
  color: #f472b6;
  box-shadow: 0 0 15px rgba(244, 114, 182, 0.2);
}

.subject-card h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.subject-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.subject-card .meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

/* ============================================
   SUBJECT PAGE
   ============================================ */

.subject-page {
  padding-top: 72px;
  min-height: 100vh;
  background-color: var(--gray-50);
}

.subject-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

.subject-sidebar {
  background-color: var(--white);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  height: fit-content;
}

.subject-sidebar h3 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chapter-item {
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.95rem;
  color: var(--gray-700);
}

.chapter-item:hover {
  background-color: var(--gray-100);
}

.chapter-item.active {
  background-color: var(--primary-blue);
  color: var(--white);
}

.subject-main {
  background-color: var(--white);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.subject-main h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.topic-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topic-item {
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topic-item:hover {
  border-color: var(--primary-blue);
  background-color: var(--gray-50);
}

.topic-item .topic-name {
  font-weight: 500;
  color: var(--gray-900);
}

.topic-item .topic-status {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.topic-item .topic-status.completed {
  color: var(--success);
}

/* ============================================
   CHAT INTERFACE
   ============================================ */

/* ============================================
   CHAT INTERFACE
   ============================================ */

.chat-page {
  margin-top: 80px;
  height: calc(100vh - 80px);
  display: flex;
  flex-direction: row;
  background: var(--bg-dark);
  overflow: visible;
  position: relative;
}

.chat-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  padding: 1rem;
  min-height: 0;
}

.chat-header {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chat-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid var(--primary-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-cyan);
  font-size: 1.5rem;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.chat-header-text h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
  letter-spacing: 0.05em;
}

.chat-header-text p {
  font-size: 0.9rem;
  color: var(--text-accent);
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--primary-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.chat-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--primary-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary-cyan);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 10px var(--primary-cyan);
  }

  50% {
    opacity: 0.5;
    box-shadow: 0 0 20px var(--primary-cyan);
  }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 0;
}

.message {
  display: flex;
  gap: 1rem;
  max-width: 85%;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.ai {
  align-self: flex-start;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border: 1px solid var(--border-color);
}

.message.user .message-avatar {
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.message.ai .message-avatar {
  background: rgba(6, 182, 212, 0.1);
  color: var(--primary-cyan);
  border-color: var(--primary-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.message-content {
  padding: 1rem 1.5rem;
  border-radius: 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
}

.message.user .message-content {
  background: var(--primary-gradient);
  color: #fff;
  border-top-right-radius: 0.25rem;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.message.ai .message-content {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  color: var(--text-main);
  border-top-left-radius: 0.25rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.message.sending {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.message.sending .message-content::after {
  content: '...';
  display: inline-block;
  animation: ellipsis 1.5s infinite;
  margin-left: 0.25rem;
}

@keyframes ellipsis {
  0% {
    content: '.';
  }

  33% {
    content: '..';
  }

  66% {
    content: '...';
  }
}

.chat-input-area {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 1.5rem;
  padding: 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.chat-input-wrapper {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  font-size: 1rem;
  font-family: var(--font-body);
  resize: none;
  min-height: 54px;
  max-height: 150px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-cyan);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
}

.chat-send-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.chat-send-btn:hover {
  transform: scale(1.1) rotate(-10deg);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
}

.chat-send-btn:disabled {
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.chat-suggestions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.chat-suggestion {
  padding: 0.5rem 1rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chat-suggestion:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

/* Typing Indicator */
.typing-indicator {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  border-radius: 1.25rem;
  border-bottom-left-radius: 0.25rem;
  width: fit-content;
  border: 1px solid var(--border-color);
}

.typing-indicator.show {
  display: flex;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background-color: var(--primary-cyan);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
  box-shadow: 0 0 5px var(--primary-cyan);
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   VOICE INTEGRATION
   Hold-to-talk mic + TTS speaker buttons
   ============================================ */

/* Mic Button - sits next to send button */
.voice-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  flex-shrink: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

.voice-btn:hover {
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.voice-btn svg {
  width: 22px;
  height: 22px;
  pointer-events: none;
}

/* Recording State */
.voice-btn.recording {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
  animation: voicePulse 1s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

@keyframes voicePulse {

  0%,
  100% {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
    transform: scale(1.08);
  }
}

/* Recording Overlay — covers input when recording */
.recording-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 1.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 5;
  pointer-events: none;
}

.recording-overlay.show {
  display: flex;
}

.recording-overlay .rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--error);
  animation: recBlink 1s ease-in-out infinite;
}

@keyframes recBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.recording-overlay .rec-text {
  font-size: 0.95rem;
  color: var(--error);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.recording-overlay .rec-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}

/* Speaker Button on AI Messages */
.speak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--primary-cyan);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.speak-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.speak-btn.speaking {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  animation: speakerPulse 1.5s ease-in-out infinite;
}

@keyframes speakerPulse {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.3);
  }

  50% {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.6);
  }
}

.speak-btn svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* Auto-Speak Toggle in Chat Header */
.auto-speak-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auto-speak-toggle label {
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--transition-fast);
}

.toggle-switch.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--primary-cyan);
}

.toggle-switch.active::after {
  left: 18px;
  background: var(--primary-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
}

/* Voice not supported banner */
.voice-unsupported {
  display: none;
  padding: 0.5rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 0.75rem;
  font-size: 0.8rem;
  color: var(--warning);
  text-align: center;
  margin-bottom: 0.5rem;
}

.voice-unsupported.show {
  display: block;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .voice-btn {
    width: 48px;
    height: 48px;
  }

  .auto-speak-toggle label {
    font-size: 0.65rem;
  }

  .toggle-switch {
    width: 30px;
    height: 16px;
  }

  .toggle-switch::after {
    width: 10px;
    height: 10px;
    top: 2px;
  }

  .toggle-switch.active::after {
    left: 16px;
  }
}

/* ============================================
   UPLOAD BUTTON & MENU
   ============================================ */

.upload-btn-wrapper {
  position: relative;
}

.upload-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.upload-btn:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: var(--primary-cyan);
  transform: scale(1.05);
}

/* Popup menu */
.upload-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(100, 116, 139, 0.25);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.upload-menu.active {
  display: flex;
  flex-direction: column;
  animation: uploadMenuSlideUp 0.2s ease-out;
}

@keyframes uploadMenuSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.upload-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-family: var(--font-primary);
  cursor: pointer;
  border-radius: 8px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.upload-menu-item:hover {
  background: rgba(6, 182, 212, 0.12);
  color: var(--primary-cyan);
}

.upload-menu-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.upload-menu-item:hover svg {
  opacity: 1;
}

/* Preview bar */
.upload-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 10px;
  margin-bottom: 6px;
}

.upload-preview img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.upload-file-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.upload-preview-remove {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  line-height: 1;
}

.upload-preview-remove:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ============================================
   CAMERA CAPTURE MODAL
   ============================================ */

.camera-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.camera-modal.active {
  display: flex;
}

.camera-modal-content {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(100, 116, 139, 0.25);
  border-radius: 16px;
  overflow: hidden;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.camera-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.15);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.camera-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.camera-modal-close:hover {
  background: rgba(239, 68, 68, 0.3);
}

.camera-modal-body {
  position: relative;
  background: #000;
  aspect-ratio: 4/3;
}

.camera-modal-body video,
.camera-modal-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px;
  border-top: 1px solid rgba(100, 116, 139, 0.15);
}

.camera-action-btn {
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

/* Snap button — big circle */
.snap-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.snap-btn:hover {
  border-color: var(--primary-cyan);
  transform: scale(1.05);
}

.snap-btn:active {
  transform: scale(0.95);
}

.snap-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  transition: all var(--transition-fast);
  pointer-events: none;
}

.snap-btn:hover .snap-circle {
  background: var(--primary-cyan);
}

/* Retake / Use buttons */
.camera-action-btn.secondary,
.camera-action-btn.primary {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: var(--font-primary);
  font-weight: 600;
}

.camera-action-btn.secondary {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-secondary);
}

.camera-action-btn.secondary:hover {
  background: rgba(100, 116, 139, 0.25);
}

.camera-action-btn.primary {
  background: var(--primary-gradient);
  color: #fff;
}

.camera-action-btn.primary:hover {
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

/* ============================================
   REAL-TIME VOICE/VIDEO CHAT OVERLAY
   ============================================ */

.vc-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.97) 0%, rgba(2, 6, 15, 0.99) 100%);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.vc-overlay.active {
  display: flex;
  animation: overlayFadeIn 0.3s ease-out;
}

/* Camera feed — fills the overlay as background */
.vc-camera-feed {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scaleX(-1);
  /* Mirror the camera */
}

.vc-overlay.camera-on .vc-camera-feed {
  display: block;
  animation: cameraFadeIn 0.4s ease-out;
}

/* Dark scrim over camera for readability */
.vc-overlay.camera-on::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 15, 0.5);
  z-index: 1;
}

@keyframes cameraFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Main content (orb, status, transcript) — centered over camera */
.vc-main-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

/* Voice Call AI Response Display Panel */
.vc-ai-response {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 40%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 1rem 1rem 0 0;
  display: none;
  flex-direction: column;
  z-index: 10;
  animation: vcResponseSlideUp 0.3s ease;
  transition: max-height 0.3s ease;
}

.vc-ai-response.has-content {
  display: flex;
}

.vc-ai-response.collapsed {
  max-height: 42px;
  overflow: hidden;
}

.vc-ai-response.collapsed .vc-ai-response-toggle svg {
  transform: rotate(180deg);
}

@keyframes vcResponseSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

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

.vc-ai-response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.15);
  flex-shrink: 0;
}

.vc-ai-response-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-cyan);
  letter-spacing: 0.03em;
}

.vc-ai-response-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}

.vc-ai-response-toggle svg {
  transition: transform 0.2s;
}

.vc-ai-response-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
}

.vc-ai-response-text {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.vc-ai-response-text strong {
  color: var(--primary-cyan);
  font-weight: 600;
}

.vc-ai-response-text code {
  background: rgba(56, 189, 248, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--primary-cyan);
}

.vc-ai-response-visual {
  display: none;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(100, 116, 139, 0.15);
}

.vc-visual-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  max-width: 200px;
}

.vc-visual-item img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 8px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  object-fit: contain;
}

.vc-visual-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

/* Bottom control bar */
.vc-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 0;
}

.vc-control-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(45, 55, 72, 0.6);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.vc-control-btn:hover {
  background: rgba(55, 65, 82, 0.8);
  transform: scale(1.1);
}

.vc-control-btn svg {
  width: 24px;
  height: 24px;
}

/* Camera button active state */
.vc-control-btn.camera-active {
  background: rgba(6, 182, 212, 0.25);
  border-color: rgba(6, 182, 212, 0.5);
  color: var(--primary-cyan);
}

/* End call button — red */
.vc-end-btn {
  background: var(--error);
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
  width: 64px;
  height: 64px;
}

.vc-end-btn:hover {
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.vc-end-btn svg {
  width: 28px;
  height: 28px;
}

.voice-orb-container {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-orb {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(6, 182, 212, 0.6), rgba(59, 130, 246, 0.4));
  box-shadow: 0 0 60px rgba(6, 182, 212, 0.3), inset 0 0 30px rgba(6, 182, 212, 0.2);
  transition: all 0.5s ease;
  position: relative;
}

.voice-orb::before,
.voice-orb::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.voice-orb::before {
  width: 170px;
  height: 170px;
  border: 1px solid rgba(6, 182, 212, 0.15);
  animation: orbRing1 3s ease-in-out infinite;
}

.voice-orb::after {
  width: 200px;
  height: 200px;
  border: 1px solid rgba(6, 182, 212, 0.08);
  animation: orbRing2 4s ease-in-out infinite;
}

@keyframes orbRing1 {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 1;
  }
}

@keyframes orbRing2 {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 0.7;
  }
}

/* State: Listening */
.voice-orb.state-listening {
  background: radial-gradient(circle at 35% 35%, rgba(6, 182, 212, 0.8), rgba(59, 130, 246, 0.5));
  box-shadow: 0 0 80px rgba(6, 182, 212, 0.5), inset 0 0 40px rgba(6, 182, 212, 0.3);
  animation: orbListening 2s ease-in-out infinite;
}

@keyframes orbListening {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 60px rgba(6, 182, 212, 0.4);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 100px rgba(6, 182, 212, 0.7);
  }
}

/* State: Processing */
.voice-orb.state-processing {
  background: radial-gradient(circle at 35% 35%, rgba(245, 158, 11, 0.7), rgba(234, 88, 12, 0.4));
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.3);
  animation: orbProcessing 1s ease-in-out infinite;
}

@keyframes orbProcessing {

  0%,
  100% {
    transform: scale(0.95);
  }

  50% {
    transform: scale(1.05);
  }
}

/* State: Speaking */
.voice-orb.state-speaking {
  background: radial-gradient(circle at 35% 35%, rgba(16, 185, 129, 0.7), rgba(6, 182, 212, 0.5));
  box-shadow: 0 0 80px rgba(16, 185, 129, 0.4);
  animation: orbSpeaking 0.8s ease-in-out infinite;
}

@keyframes orbSpeaking {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.3);
  }

  25% {
    transform: scale(1.06) scaleX(1.02);
  }

  50% {
    transform: scale(1.03);
    box-shadow: 0 0 90px rgba(16, 185, 129, 0.5);
  }

  75% {
    transform: scale(1.07) scaleY(1.02);
  }
}

/* Voice Chat Text */
.voice-chat-status-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  transition: color 0.3s ease;
}

.voice-chat-status-text.listening {
  color: var(--primary-cyan);
}

.voice-chat-status-text.processing {
  color: var(--warning);
}

.voice-chat-status-text.speaking {
  color: var(--success);
}

.voice-chat-transcript {
  max-width: 700px;
  text-align: center;
  font-size: 1.05rem;
  color: rgba(148, 163, 184, 0.9);
  line-height: 1.6;
  min-height: 3em;
  padding: 0.5rem 1.5rem;
}

/* End Call Button */
.voice-end-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--error);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
  margin-top: 1rem;
}

.voice-end-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

.voice-end-btn svg {
  width: 28px;
  height: 28px;
}

/* Start Voice Call Button in header */
.voice-call-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.voice-call-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
  transform: scale(1.1);
}

.voice-call-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   VOICE INTEGRATION - END
   ============================================ */

/* ============================================
   FOOTER SOCIAL LINKS
   ============================================ */

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(100, 116, 139, 0.15);
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.social-link:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
  transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px and up) */
@media (min-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
  }

  .hero-text h1 {
    font-size: 3.5rem;
  }

  .hero-buttons {
    flex-direction: row;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .subject-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .subject-layout {
    grid-template-columns: 280px 1fr;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }

  .header-actions {
    display: flex;
  }

  .mobile-menu-btn {
    display: none;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  .subject-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

/* ============================================
   UTILITY ANIMATIONS
   ============================================ */

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(45, 55, 72, 0.8);
  border-radius: 5px;
  border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-cyan);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-muted);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  margin-bottom: 1.5rem;
}

.footer-brand .logo-text {
  color: var(--text-main);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-links h4 {
  color: var(--text-main);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-cyan);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   SETTINGS PANEL
   ============================================ */

/* Profile Trigger Button */
.profile-trigger {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-gradient);
  border: 2px solid transparent;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-trigger:hover {
  box-shadow: var(--primary-glow);
  transform: scale(1.08);
}

.profile-trigger svg {
  width: 18px;
  height: 18px;
}

/* Settings Overlay */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.35s ease;
}

.settings-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Settings Panel */
.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-left: 1px solid var(--border-color);
  z-index: 9999;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-theme="light"] .settings-panel {
  background: rgba(255, 255, 255, 0.95);
}

.settings-panel.open {
  transform: translateX(0);
}

.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-panel-header h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.settings-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-close:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.settings-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

/* Settings Sections */
.settings-section {
  margin-bottom: 2rem;
}

.settings-section-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-section-title svg {
  opacity: 0.7;
}

.settings-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Theme Switch */
.theme-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-hover);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.theme-switch-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
}

.theme-switch {
  position: relative;
  width: 56px;
  height: 28px;
  display: inline-block;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #334155;
  border-radius: 28px;
  transition: background 0.4s ease;
  overflow: hidden;
}

.theme-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 2;
}

.theme-switch input:checked+.theme-slider {
  background: var(--primary-cyan);
}

.theme-switch input:checked+.theme-slider::before {
  transform: translateX(28px);
}

.theme-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  z-index: 1;
  transition: opacity 0.3s;
}

.theme-icon.sun {
  right: 6px;
  opacity: 0.5;
}

.theme-icon.moon {
  left: 6px;
  opacity: 0.5;
}

.theme-switch input:checked~.theme-slider .sun {
  opacity: 1;
}

.theme-switch input:checked~.theme-slider .moon {
  opacity: 0.3;
}

/* Voice Cards */
.voice-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.voice-card {
  padding: 0.85rem 1rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.voice-card:hover {
  border-color: var(--border-glow);
  background: rgba(56, 189, 248, 0.05);
}

.voice-card.active {
  border-color: var(--primary-cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.voice-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.3rem;
}

.voice-emoji {
  font-size: 1.3rem;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.voice-card-info {
  flex: 1;
  min-width: 0;
}

.voice-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.voice-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.voice-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.voice-card.active .voice-check {
  opacity: 1;
  transform: scale(1);
}

.voice-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-left: 2.65rem;
  line-height: 1.4;
}

/* Settings Form Fields */
.settings-field {
  margin-bottom: 0.75rem;
}

.settings-field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.settings-input,
.settings-select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-main);
  transition: border-color 0.2s;
  outline: none;
  box-sizing: border-box;
}

.settings-input:focus,
.settings-select:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.15);
}

.settings-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.settings-plan-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 20px;
}

/* Settings Toggle Rows */
.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-hover);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.settings-toggle-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  display: block;
}

.settings-toggle-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.1rem;
}

/* Settings Action Buttons */
.settings-actions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-action-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
  width: 100%;
}

.settings-action-btn:hover {
  border-color: var(--border-glow);
  background: rgba(56, 189, 248, 0.05);
}

.settings-action-btn.settings-action-danger {
  color: #ef4444;
}

.settings-action-btn.settings-action-danger:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

/* Settings About Section */
.settings-about {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.settings-about-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(100, 116, 139, 0.1);
}

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

.settings-about-row a {
  color: var(--primary-cyan);
  text-decoration: none;
  font-size: 0.85rem;
}

.settings-about-row a:hover {
  text-decoration: underline;
}

/* Mobile Settings Panel */
@media (max-width: 480px) {
  .settings-panel {
    width: 100%;
  }
}

/* ============================================
   CHAT SIDEBAR
   ============================================ */

.chat-sidebar {
  width: 280px;
  min-width: 280px;
  height: 100%;
  background: rgba(15, 23, 42, 0.95);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease, min-width 0.3s ease;
  z-index: 100;
  overflow: hidden;
}

[data-theme="light"] .chat-sidebar {
  background: rgba(248, 250, 252, 0.98);
}

.chat-sidebar.collapsed {
  width: 0;
  min-width: 0;
  border-right: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-toggle-btn,
.sidebar-new-chat-btn,
.sidebar-group-chat-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.sidebar-toggle-btn:hover,
.sidebar-new-chat-btn:hover,
.sidebar-group-chat-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.sidebar-new-chat-btn,
.sidebar-group-chat-btn {
  background: var(--primary-gradient);
  color: #fff;
}

.sidebar-new-chat-btn:hover,
.sidebar-group-chat-btn:hover {
  box-shadow: var(--primary-glow);
  color: #fff;
}

.sidebar-group-chat-btn {
  margin-left: 0.5rem;
  background: linear-gradient(135deg, #10b981, #059669);
}

/* Sidebar Open Button */
.sidebar-open-btn {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: all var(--transition-fast);
}

.sidebar-open-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.chat-sidebar.collapsed~.chat-main-area .sidebar-open-btn,
.chat-sidebar.collapsed+.sidebar-overlay+.chat-main-area .sidebar-open-btn {
  display: flex;
}

/* Sidebar Search */
.sidebar-search {
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.sidebar-search svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.sidebar-search input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
}

.sidebar-search input::placeholder {
  color: var(--text-muted);
}

/* Temp Chat Toggle */
.sidebar-temp-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.sidebar-temp-toggle:hover {
  background: var(--bg-hover);
}

.sidebar-temp-toggle.active {
  color: var(--warning);
}

.sidebar-temp-toggle span {
  flex: 1;
}

.temp-toggle-switch {
  width: 36px;
  height: 20px;
  background: #334155;
  border-radius: 20px;
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}

.temp-toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  left: 2px;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.temp-toggle-switch.active {
  background: var(--warning);
}

.temp-toggle-switch.active::after {
  transform: translateX(16px);
}

/* Chat List */
.sidebar-chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.sidebar-chat-list::-webkit-scrollbar {
  width: 4px;
}

.sidebar-chat-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.chat-date-group {
  padding: 0 0.75rem;
}

.chat-date-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0 0.35rem;
  font-family: var(--font-heading);
}

.chat-history-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition-fast);
  margin-bottom: 2px;
  position: relative;
}

.chat-history-item:hover {
  background: var(--bg-hover);
}

.chat-history-item.active {
  background: rgba(6, 182, 212, 0.1);
  border-left: 3px solid var(--primary-cyan);
}

.chat-history-title {
  flex: 1;
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.chat-history-subject {
  font-size: 0.65rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.chat-history-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.chat-history-item:hover .chat-history-delete {
  opacity: 1;
}

.chat-history-delete:hover {
  color: var(--error);
}

.sidebar-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Temp Chat Banner */
.temp-chat-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  color: var(--warning);
  font-size: 0.78rem;
  margin: 0.5rem 1rem 0;
  flex-shrink: 0;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
  display: none;
}

/* Screen Share Active State */
.vc-control-btn.screen-sharing {
  background: rgba(6, 182, 212, 0.3);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

/* Responsive */
@media (max-width: 768px) {
  .chat-sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    height: calc(100vh - 80px);
    z-index: 999;
    transform: translateX(-100%);
  }

  .chat-sidebar.open {
    transform: translateX(0);
  }

  .chat-sidebar.collapsed {
    transform: translateX(-100%);
  }

  .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    top: 80px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-open-btn {
    display: flex !important;
  }
}

/* Upgrade Modal */
.upgrade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: premiumFadeIn 0.3s ease;
}

.upgrade-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), var(--primary-glow);
  animation: premiumSlideUp 0.3s ease;
}

.upgrade-modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.upgrade-modal-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.upgrade-modal-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.upgrade-modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.upgrade-modal-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Sidebar Locked Preview */
.sidebar-premium-locked {
  background: rgba(30, 41, 59, 0.4);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  margin: 1rem;
  padding: 2rem 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--text-muted);
}

.sidebar-premium-locked:hover {
  background: rgba(6, 182, 212, 0.05);
  border-color: var(--primary-cyan);
  color: var(--primary-cyan);
}

.locked-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.locked-content span {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@keyframes premiumFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes premiumSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

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

/* ============================================
   LEGAL PAGES (Terms, Privacy)
   ============================================ */
.legal-content h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.legal-content h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.legal-content ul {
  color: var(--text-muted);
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ul li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.legal-content ul li strong {
  color: var(--text-primary);
}