/* Smart Realty Academy — Premium Dark Theme */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep: #0a0f1c;
  --bg-dark: #111827;
  --bg-card: rgba(17, 24, 39, 0.6);
  --blue: #3b82f6;
  --teal: #14b8a6;
  --blue-glow: rgba(59, 130, 246, 0.3);
  --teal-glow: rgba(20, 184, 166, 0.3);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --gradient-hero: linear-gradient(135deg, #3b82f6 0%, #14b8a6 50%, #8b5cf6 100%);
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 6vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }

.text-gradient {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: none; transition: all 0.3s; font-family: inherit;
}
.btn-primary {
  background: var(--blue); color: #fff;
}
.btn-primary:hover { background: #2563eb; transform: translateY(-2px); box-shadow: 0 8px 25px var(--blue-glow); }
.btn-outline {
  background: transparent; color: var(--text); border: 1px solid var(--glass-border);
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #0d9488; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0; background: rgba(10,15,28,0.9); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { font-size: 1.4rem; font-weight: 800; }
.nav-logo span { color: var(--blue); }
.nav-links { display: flex; list-style: none; gap: 8px; align-items: center; }
.nav-links a { padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; color: var(--text-muted); transition: all 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--glass); }
.nav-cta { background: var(--blue) !important; color: #fff !important; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* Hero */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px; position: relative; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(59,130,246,0.05) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}
.orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.3; }
.orb-1 { width: 600px; height: 600px; background: var(--blue); top: -200px; right: -200px; }
.orb-2 { width: 400px; height: 400px; background: var(--teal); bottom: -100px; left: -100px; }
.orb-3 { width: 300px; height: 300px; background: #8b5cf6; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 50px;
  font-size: 0.85rem; color: var(--teal); font-weight: 500; margin-bottom: 24px;
}
.hero h1 { margin-bottom: 24px; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-stats { display: flex; gap: 48px; justify-content: center; }
.hero-stat-value { font-size: 2.5rem; font-weight: 800; color: var(--blue); }
.hero-stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* Cards */
.card {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius); padding: 32px; backdrop-filter: blur(10px);
  transition: all 0.3s;
}
.card:hover { border-color: rgba(59,130,246,0.3); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

/* Product Cards */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.product-card { position: relative; overflow: hidden; }
.product-card .product-icon {
  width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 20px;
}
.product-card h3 { margin-bottom: 10px; }
.product-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .product-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-card .badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  border-radius: 6px; font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--blue); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }

/* Progress bar */
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; margin-top: 16px; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 12px 16px; background: var(--bg-dark); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.95rem; font-family: inherit;
  transition: border-color 0.3s;
}
.form-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }
.form-input::placeholder { color: var(--text-dim); }

/* Auth pages */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 80px 24px;
}
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 2rem; margin-bottom: 8px; text-align: center; }
.auth-card .auth-subtitle { color: var(--text-muted); text-align: center; margin-bottom: 32px; }
.auth-card .auth-footer { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.9rem; }
.auth-card .auth-footer a { color: var(--blue); font-weight: 600; }
.auth-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: var(--danger); padding: 12px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; display: none; }

/* Dashboard layout */
.app-layout { display: flex; min-height: 100vh; padding-top: 64px; }
.sidebar {
  width: 260px; background: var(--bg-dark); border-right: 1px solid var(--glass-border);
  padding: 24px 16px; position: fixed; top: 64px; bottom: 0; overflow-y: auto;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-radius: 8px; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: all 0.2s;
}
.sidebar-nav li a:hover, .sidebar-nav li a.active { color: var(--text); background: var(--glass); }
.sidebar-nav li a i { width: 20px; text-align: center; }
.sidebar-section { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); padding: 16px 16px 8px; }
.main-content { flex: 1; margin-left: 260px; padding: 32px; }

/* Stats cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { text-align: center; }
.stat-card .stat-value { font-size: 2.5rem; font-weight: 800; margin-bottom: 4px; }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--glass-border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-dark); }
th { padding: 12px 16px; text-align: left; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); border-bottom: 1px solid var(--glass-border); }
td { padding: 12px 16px; font-size: 0.9rem; border-bottom: 1px solid var(--glass-border); }
tr:hover td { background: var(--glass); }

/* Phone mockup (practice page) */
.phone-mockup {
  width: 320px; max-width: 100%; margin: 0 auto; background: var(--bg-dark);
  border: 2px solid var(--glass-border); border-radius: 32px; padding: 40px 24px;
  text-align: center; position: relative;
}
.phone-mockup .caller-avatar {
  width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #fff;
}
.phone-mockup .caller-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.phone-mockup .caller-status { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 32px; }
.phone-mockup .call-timer { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 32px; color: var(--teal); }

/* Waveform animation */
.waveform { display: flex; align-items: center; justify-content: center; gap: 3px; height: 40px; margin-bottom: 32px; }
.waveform .bar {
  width: 4px; border-radius: 2px; background: var(--teal);
  animation: wave 1.2s ease-in-out infinite;
}
.waveform .bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.waveform .bar:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.waveform .bar:nth-child(3) { height: 30px; animation-delay: 0.2s; }
.waveform .bar:nth-child(4) { height: 25px; animation-delay: 0.3s; }
.waveform .bar:nth-child(5) { height: 35px; animation-delay: 0.4s; }
.waveform .bar:nth-child(6) { height: 20px; animation-delay: 0.5s; }
.waveform .bar:nth-child(7) { height: 15px; animation-delay: 0.6s; }
.waveform .bar:nth-child(8) { height: 25px; animation-delay: 0.7s; }
.waveform .bar:nth-child(9) { height: 10px; animation-delay: 0.8s; }
@keyframes wave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1.5); }
}

/* Call buttons */
.call-actions { display: flex; gap: 16px; justify-content: center; }
.call-btn {
  width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff; transition: all 0.3s;
}
.call-btn-start { background: var(--success); }
.call-btn-start:hover { background: #16a34a; transform: scale(1.1); }
.call-btn-end { background: var(--danger); }
.call-btn-end:hover { background: #dc2626; transform: scale(1.1); }
.call-btn-mute { background: var(--glass); border: 1px solid var(--glass-border); }

/* Score display */
.score-circle {
  width: 160px; height: 160px; border-radius: 50%; margin: 0 auto 24px;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  border: 4px solid var(--blue); position: relative;
}
.score-circle .score-value { font-size: 3rem; font-weight: 800; }
.score-circle .score-label { font-size: 0.8rem; color: var(--text-muted); }
.score-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 500px; margin: 0 auto; }
.score-item { text-align: center; }
.score-item .score-item-value { font-size: 1.5rem; font-weight: 700; }
.score-item .score-item-label { font-size: 0.8rem; color: var(--text-muted); }

/* Training page */
.training-content { max-width: 800px; margin: 0 auto; }
.training-section { margin-bottom: 32px; }
.training-section h3 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.training-section h3 i { color: var(--blue); }
.training-section .content-block {
  background: var(--bg-card); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 20px; white-space: pre-line; line-height: 1.8; color: var(--text-muted);
}

/* Mode selector */
.mode-selector { display: flex; gap: 12px; margin-bottom: 24px; }
.mode-btn {
  flex: 1; padding: 16px; border-radius: var(--radius-sm); border: 2px solid var(--glass-border);
  background: var(--bg-card); cursor: pointer; text-align: center; transition: all 0.3s;
}
.mode-btn.active { border-color: var(--blue); background: rgba(59,130,246,0.1); }
.mode-btn h4 { margin-bottom: 4px; }
.mode-btn p { font-size: 0.8rem; color: var(--text-muted); }

/* Section padding */
.section { padding: 100px 0; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 16px;
}
.section-label::before { content: ''; width: 24px; height: 2px; background: var(--teal); border-radius: 2px; }
.section-title { margin-bottom: 16px; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin-bottom: 48px; }

/* Steps */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.step-card { text-align: center; }
.step-number {
  width: 48px; height: 48px; border-radius: 12px; background: rgba(59,130,246,0.15);
  color: var(--blue); font-weight: 800; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}

/* Footer */
.footer { padding: 48px 0; border-top: 1px solid var(--glass-border); text-align: center; color: var(--text-dim); font-size: 0.85rem; }

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-24 { margin-top: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* Loading spinner */
.spinner { width: 40px; height: 40px; border: 3px solid var(--glass-border); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.6s ease forwards; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-dark); padding: 16px; border-bottom: 1px solid var(--glass-border);
  }
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .hero-stats { gap: 24px; }
  .score-breakdown { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
