/* Buxin Academy — Core Styles */
:root {
  --bg: #0a0e1a;
  --bg-card: rgba(15, 23, 42, 0.85);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #00d4aa;
  --primary-dark: #00a884;
  --accent: #7c3aed;
  --accent-2: #f59e0b;
  --border: rgba(0, 212, 170, 0.2);
  --glow: 0 0 30px rgba(0, 212, 170, 0.15);
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-theme="light"], body.light-mode {
  --bg: #f0f4f8;
  --bg-card: rgba(255, 255, 255, 0.95);
  --text: #0f172a;
  --text-muted: #64748b;
  --border: rgba(0, 168, 132, 0.25);
  --glow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(124, 58, 237, 0.06) 0%, transparent 50%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Glass cards */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: var(--glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #0a0e1a;
}
.btn-primary:hover { box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-danger { background: #ef4444; color: #fff; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Inputs */
.input, input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="datetime-local"], select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
[data-theme="light"] .input,
body.light-mode input, body.light-mode select, body.light-mode textarea {
  background: #fff;
}
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}
label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; color: var(--text-muted); }
.form-group { margin-bottom: 1rem; }

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}
[data-theme="light"] .navbar { background: rgba(255,255,255,0.95); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: none; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; gap: 0.5rem; align-items: center; }
#menu-toggle {
  background: none; border: none; color: var(--text);
  font-size: 1.5rem; cursor: pointer; padding: 0.25rem;
}
#mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}
#mobile-nav.open { display: flex; }
#mobile-nav a { padding: 0.5rem 0; color: var(--text); }

/* Hero */
.hero {
  padding: 3rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(0, 212, 170, 0.15);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--primary); }
.hero p { color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; font-size: 1.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; text-align: left; }
  .hero-grid .hero-cta { justify-content: flex-start; }
  .hero-grid p { margin-left: 0; }
}

.robot-visual {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(0,212,170,0.1), rgba(124,58,237,0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  border: 2px solid var(--border);
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Sections */
section { padding: 3rem 0; }
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: 0.5rem;
}
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 2.5rem; }

/* Pricing */
.pricing-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
.pricing-card {
  padding: 2rem;
  position: relative;
  transition: transform 0.3s;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 40px rgba(0, 212, 170, 0.2);
}
.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 1rem 0;
}
.pricing-card ul { list-style: none; margin: 1.5rem 0; }
.pricing-card li { padding: 0.4rem 0; color: var(--text-muted); }
.pricing-card li::before { content: '✓ '; color: var(--primary); }

/* Features */
.features-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card { padding: 1.5rem; }
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }

/* Testimonials & FAQ */
.testimonial-card { padding: 1.5rem; margin-bottom: 1rem; }
.testimonial-card .stars { color: var(--accent-2); margin-bottom: 0.5rem; }
.faq-item { margin-bottom: 0.75rem; }
.faq-item summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { padding: 1rem; color: var(--text-muted); }

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: 1rem; }

/* Country gate */
.country-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.country-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
  text-align: center;
}
.country-card h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.country-select-wrap { position: relative; margin: 2rem 0; }
.country-select {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1.1rem;
  appearance: none;
  cursor: pointer;
}
.country-flag-display {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  pointer-events: none;
}

/* Dashboard layout */
.dashboard-layout {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem 0 3rem;
}
@media (min-width: 768px) {
  .dashboard-layout { grid-template-columns: 260px 1fr; }
}
.sidebar {
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 80px;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li { margin-bottom: 0.25rem; }
.sidebar-nav a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: rgba(0, 212, 170, 0.1);
  color: var(--primary);
}
.dashboard-main { display: grid; gap: 1.25rem; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { padding: 1.25rem; text-align: center; }
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--primary); }

/* Payment */
.payment-methods {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin: 1.5rem 0;
}
.payment-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s;
}
.payment-method-card:has(input:checked) {
  border-color: var(--primary);
  background: rgba(0, 212, 170, 0.08);
}
.payment-method-card input { display: none; }
.payment-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
  margin: 1rem 0;
}
.receipt-thumb { max-width: 120px; max-height: 100px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.receipt-link { display: inline-block; }
.class-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.group-badge { background: rgba(0, 212, 170, 0.2); color: var(--primary); }
.individual-badge { background: rgba(124, 58, 237, 0.25); color: #a78bfa; }
#receipt-preview { max-width: 200px; margin: 1rem auto; border-radius: 8px; }

/* Community */
.post-card { padding: 1.25rem; margin-bottom: 1rem; }
.post-card.pinned { border-color: var(--accent-2); }
.post-header { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.75rem; }
.avatar-sm {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #0a0e1a;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.post-image { border-radius: 8px; margin: 0.75rem 0; max-height: 300px; object-fit: cover; }
.post-footer { display: flex; gap: 1rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.like-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.95rem; }
.like-btn.liked { color: #ef4444; }
.comment-section { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.comment-section .input { margin: 0; flex: 1; }
.pin-badge, .announce-badge, .live-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}
.pin-badge { background: rgba(245, 158, 11, 0.2); color: var(--accent-2); }
.live-badge { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.soon-alert { color: var(--accent-2); font-weight: 700; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: capitalize;
}
.status-pending { background: rgba(245, 158, 11, 0.2); color: var(--accent-2); }
.status-approved, .status-active { background: rgba(0, 212, 170, 0.2); color: var(--primary); }
.status-rejected { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* Admin tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-weight: 600; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.admin-tabs button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
}
.admin-tabs button.active {
  background: var(--primary);
  color: #0a0e1a;
  border-color: var(--primary);
}

/* Schedule slots */
.schedule-slots {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.schedule-slot {
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  display: block;
}
.schedule-slot input { display: none; }
.schedule-slot:has(input:checked) { border-color: var(--primary); background: rgba(0,212,170,0.1); }
.slot-day { display: block; font-weight: 700; }
.slot-time { color: var(--text-muted); font-size: 0.9rem; }

/* Waiting page */
.waiting-hero {
  text-align: center;
  padding: 3rem 1rem;
}
.waiting-icon { font-size: 4rem; margin-bottom: 1rem; animation: float 3s ease-in-out infinite; }

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast-success { border-color: var(--primary); }
.toast-error { border-color: #ef4444; }

.hidden { display: none !important; }
.loading-pulse { animation: pulse 1.5s infinite; text-align: center; padding: 2rem; }
.error-text { color: #ef4444; text-align: center; }
.empty-state { padding: 2rem; text-align: center; }

/* Simplified home */
.home-simple .home-main {
  padding: 2rem 1rem 1rem;
  min-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.home-country-line { text-align: center; margin-bottom: 0.5rem; }
.home-pricing-title { margin-bottom: 1.5rem; }
.home-pricing-grid {
  width: 100%;
  max-width: 720px;
}
.home-class-card {
  text-align: center;
  padding: 2rem 1.5rem;
}
.home-class-card h2 { font-size: 1.35rem; margin-bottom: 0.25rem; }
.home-card-note { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.75rem; }
.home-class-card .price { margin: 0.5rem 0 1.25rem; }
.home-faq { padding: 2rem 0 3rem; }
.footer-minimal { padding: 1.25rem 0; }
.footer-minimal .footer-links { display: none; }
.text-sm { font-size: 0.875rem; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.flex-wrap { flex-wrap: wrap; }

