/* ============================================================
   BGMI Training Tracker — Main Stylesheet
   Dark Gaming Theme · Orange & Teal Accents
   ============================================================

   TABLE OF CONTENTS
   1.  CSS Variables (Design Tokens)
   2.  Reset & Base
   3.  Typography
   4.  Layout Utilities
   5.  Navbar
   6.  Buttons
   7.  Cards
   8.  Forms
   9.  Tables
   10. Stat Cards
   11. Progress Bar
   12. Badges
   13. Alerts / Flash Messages
   14. Landing Page (index.php)
   15. Auth Pages (login / register)
   16. Dashboard
   17. Match Analysis
   18. Training Modules
   19. AI Suggestions
   20. Footer
   21. Animations
   22. Responsive (Mobile ≤ 768 px)
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES
   ============================================================ */
:root {
    /* Backgrounds */
    --bg-primary:   #0d0d14;
    --bg-secondary: #13131f;
    --bg-card:      #16162a;
    --bg-elevated:  #1a1a2e;
    --bg-hover:     #1e1e38;

    /* Orange accent */
    --orange:       #f97316;
    --orange-dark:  #ea580c;
    --orange-light: #fb923c;
    --orange-glow:  rgba(249, 115, 22, 0.25);
    --orange-glow2: rgba(249, 115, 22, 0.12);

    /* Teal accent */
    --teal:         #14b8a6;
    --teal-dark:    #0d9488;
    --teal-glow:    rgba(20, 184, 166, 0.25);

    /* Text */
    --text:         #f1f5f9;
    --text-soft:    #94a3b8;
    --text-muted:   #64748b;

    /* Borders */
    --border:       rgba(255, 255, 255, 0.07);
    --border-accent: rgba(249, 115, 22, 0.3);

    /* Status */
    --success: #22c55e;
    --danger:  #ef4444;
    --warning: #f59e0b;
    --info:    #3b82f6;

    /* Misc */
    --radius:  12px;
    --radius-sm: 8px;
    --shadow:  0 4px 32px rgba(0, 0, 0, 0.5);
    --transition: all 0.2s ease;
    --nav-h: 64px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--orange); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--orange-light); }

img { max-width: 100%; display: block; }

ul, ol { list-style: none; }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { color: var(--text-soft); line-height: 1.7; }

code {
    background: var(--bg-elevated);
    color: var(--orange-light);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
    font-family: 'Courier New', monospace;
}

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    padding-top: calc(var(--nav-h) + 32px);
    padding-bottom: 60px;
    min-height: 100vh;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: 12px; align-items: center; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.text-center { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-soft    { color: var(--text-soft); }
.text-orange  { color: var(--orange); }
.text-teal    { color: var(--teal); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-left: 8px;
}

/* ============================================================
   5. NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(13, 13, 20, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.navbar-brand a {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}
.navbar-brand span { color: var(--orange); }

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.navbar-nav a {
    color: var(--text-soft);
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.92rem;
}
.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--orange);
    background: var(--orange-glow2);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-badge {
    font-size: 0.85rem;
    color: var(--text-soft);
    background: var(--bg-elevated);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
}
.btn-logout {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    transition: var(--transition);
}
.btn-logout:hover { color: var(--danger); border-color: var(--danger); }

/* Hamburger (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-soft);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================================
   6. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}
.btn-primary:hover:not(:disabled) {
    background: var(--orange-dark);
    border-color: var(--orange-dark);
    color: #fff;
    box-shadow: 0 4px 16px var(--orange-glow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
    color: #fff;
    box-shadow: 0 4px 16px var(--teal-glow);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-accent);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--orange-glow2);
    color: var(--orange);
    border-color: var(--orange);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.4);
    padding: 6px 12px;
    font-size: 0.82rem;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.15); }

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ============================================================
   7. CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { border-color: rgba(249, 115, 22, 0.2); }

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.card-body { padding: 20px; }

/* ============================================================
   8. FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.93rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}
.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-glow2);
}
.form-control::placeholder { color: var(--text-muted); }

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}
.form-select option { background: var(--bg-elevated); }

.form-textarea { resize: vertical; min-height: 90px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Radio group (zone timing) */
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-label {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-soft);
    transition: var(--transition);
}
.radio-label input { display: none; }
.radio-label:has(input:checked),
.radio-label.checked {
    border-color: var(--orange);
    background: var(--orange-glow2);
    color: var(--orange);
}
.radio-label:hover { border-color: var(--orange); color: var(--orange); }

/* ============================================================
   9. TABLES
   ============================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table thead th {
    background: var(--bg-elevated);
    color: var(--text-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody td { padding: 12px 16px; color: var(--text-soft); vertical-align: middle; }

.table .rank-1 td:first-child { color: var(--orange); font-weight: 700; }
.table .rank-top5 td:nth-child(4) { color: var(--success); font-weight: 600; }

/* ============================================================
   10. STAT CARDS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: var(--orange);
    border-radius: 2px 0 0 2px;
}
.stat-card:nth-child(2)::before { background: var(--teal); }
.stat-card:nth-child(3)::before { background: var(--success); }
.stat-card:nth-child(4)::before { background: var(--warning); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.stat-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    display: block;
}
.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text);
    margin-bottom: 4px;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ============================================================
   11. PROGRESS BAR
   ============================================================ */
.progress-container { margin-bottom: 8px; }
.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-soft);
    margin-bottom: 6px;
}
.progress-bar {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 99px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--orange), var(--orange-light));
    border-radius: 99px;
    transition: width 0.6s ease;
}
.progress-fill.teal {
    background: linear-gradient(90deg, var(--teal), #2dd4bf);
}

/* ============================================================
   12. BADGES
   ============================================================ */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-beginner     { background: rgba(34, 197, 94, 0.15);  color: var(--success); }
.badge-intermediate { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-advanced     { background: rgba(239, 68, 68, 0.15);  color: var(--danger); }
.badge-aiming       { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.badge-movement     { background: rgba(20, 184, 166, 0.15); color: var(--teal); }
.badge-looting      { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.badge-strategy     { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.badge-teamwork     { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.badge-done         { background: rgba(34, 197, 94, 0.15);  color: var(--success); }

/* ============================================================
   13. ALERTS / FLASH MESSAGES
   ============================================================ */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: rgba(34, 197, 94, 0.1);  border-color: rgba(34, 197, 94, 0.3);  color: #86efac; }
.alert-error   { background: rgba(239, 68, 68, 0.1);  border-color: rgba(239, 68, 68, 0.3);  color: #fca5a5; }
.alert-info    { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); color: #93c5fd; }
.alert-warning { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); color: #fde68a; }

/* ============================================================
   14. LANDING PAGE (index.php)
   ============================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249,115,22,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(20,184,166,0.08) 0%, transparent 50%);
    pointer-events: none;
}
.hero-tag {
    display: inline-block;
    background: var(--orange-glow2);
    border: 1px solid var(--border-accent);
    color: var(--orange);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 99px;
    margin-bottom: 20px;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero-title span {
    background: linear-gradient(135deg, var(--orange), var(--orange-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-soft);
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.8;
}
.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}
.hero-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-stat-item { text-align: center; }
.hero-stat-num  { font-size: 1.8rem; font-weight: 800; color: var(--orange); }
.hero-stat-lbl  { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.features { padding: 80px 0; }
.features-header { text-align: center; margin-bottom: 48px; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: var(--transition);
}
.feature-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px var(--orange-glow2);
}
.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 14px;
    display: block;
}
.feature-card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.feature-card p  { font-size: 0.88rem; }

.how-it-works { padding: 80px 0; background: var(--bg-secondary); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
    text-align: center;
    padding: 24px;
}
.step-num {
    width: 52px; height: 52px;
    background: var(--orange-glow2);
    border: 2px solid var(--orange);
    color: var(--orange);
    font-weight: 800;
    font-size: 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.step h3 { margin-bottom: 8px; }

/* ============================================================
   15. AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(ellipse 60% 50% at 50% 20%, rgba(249,115,22,0.08) 0%, transparent 60%);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
}
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}
.auth-logo a {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text);
}
.auth-logo span { color: var(--orange); }
.auth-logo p { font-size: 0.88rem; color: var(--text-muted); margin-top: 4px; }

.auth-divider {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 20px 0;
    position: relative;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-footer {
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 20px;
}

/* ============================================================
   16. DASHBOARD
   ============================================================ */
.page-header {
    margin-bottom: 28px;
}
.page-header h1 { font-size: 1.7rem; margin-bottom: 4px; }
.page-header p  { font-size: 0.9rem; color: var(--text-muted); }

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}
.chart-container {
    position: relative;
    height: 260px;
}

.no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: var(--text-muted);
    text-align: center;
    gap: 10px;
}
.no-data .icon { font-size: 2.5rem; }
.no-data p { font-size: 0.9rem; }

/* ============================================================
   17. MATCH ANALYSIS
   ============================================================ */
.kill-badge {
    display: inline-block;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
    font-size: 0.88rem;
}
.kill-0  { background: rgba(100,116,139,0.2); color: var(--text-muted); }
.kill-1  { background: rgba(34,197,94,0.15);  color: var(--success); }
.kill-5  { background: rgba(249,115,22,0.15); color: var(--orange); }
.kill-10 { background: rgba(239,68,68,0.15);  color: var(--danger); }

.pos-badge {
    display: inline-block;
    min-width: 28px;
    padding: 2px 8px;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
    font-size: 0.88rem;
}
.pos-1   { background: rgba(249,115,22,0.25); color: var(--orange); border: 1px solid var(--orange); }
.pos-top5 { background: rgba(34,197,94,0.15); color: var(--success); }
.pos-rest { background: rgba(100,116,139,0.15); color: var(--text-muted); }

/* ============================================================
   18. TRAINING MODULES
   ============================================================ */
.modules-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}
.category-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-soft);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.tab-btn:hover,
.tab-btn.active {
    background: var(--orange-glow2);
    border-color: var(--orange);
    color: var(--orange);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}
.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.module-card:hover {
    border-color: rgba(249,115,22,0.2);
    transform: translateY(-2px);
}
.module-card.completed {
    border-color: rgba(34,197,94,0.3);
    opacity: 0.8;
}
.module-card.completed .module-title { text-decoration: line-through; color: var(--text-muted); }

.module-icon-wrap {
    font-size: 2rem;
    margin-bottom: 12px;
}
.module-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    align-items: center;
}
.module-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.module-desc {
    font-size: 0.86rem;
    color: var(--text-soft);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 14px;
}
.module-tips {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.82rem;
    color: var(--text-soft);
    white-space: pre-line;
    line-height: 1.7;
    margin-bottom: 14px;
    display: none;
}
.module-tips.open { display: block; }
.module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}
.duration-tag {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   19. AI SUGGESTIONS
   ============================================================ */
.ai-hero {
    background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(20,184,166,0.06));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    margin-bottom: 28px;
}
.ai-hero .icon { font-size: 3rem; margin-bottom: 12px; display: block; }
.ai-hero h2 { margin-bottom: 8px; }

.ai-response {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 24px;
    line-height: 1.8;
    font-size: 0.93rem;
    color: var(--text-soft);
    white-space: pre-wrap;
    word-break: break-word;
}
.ai-response h1, .ai-response h2, .ai-response h3 {
    color: var(--orange);
    margin: 16px 0 8px;
    font-size: 1rem;
}
.ai-response strong { color: var(--text); }

.suggestion-history-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: var(--text-soft);
}
.suggestion-history-item .date { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; }

.stats-context {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.context-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}
.context-item .val { font-size: 1.4rem; font-weight: 800; color: var(--orange); }
.context-item .lbl { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Loading spinner for AI */
.spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   20. FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 28px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.83rem;
}
.footer span { color: var(--orange); }

/* ============================================================
   21. ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.5s ease forwards; }

@keyframes glow {
    0%, 100% { box-shadow: 0 0 8px var(--orange-glow); }
    50%       { box-shadow: 0 0 20px var(--orange-glow); }
}
.glow-pulse { animation: glow 2.5s ease infinite; }

/* ============================================================
   22. RESPONSIVE — Mobile ≤ 768 px
   ============================================================ */
@media (max-width: 768px) {
    .hamburger { display: flex; }

    .navbar-nav,
    .navbar-right {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: rgba(13, 13, 20, 0.97);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        z-index: 999;
    }
    .navbar-nav.open,
    .navbar-right.open { display: flex; }
    .navbar-right { top: calc(var(--nav-h) + 200px); border-top: 1px solid var(--border); }

    .stats-grid   { grid-template-columns: repeat(2, 1fr); }
    .charts-grid  { grid-template-columns: 1fr; }
    .form-row,
    .form-row-3   { grid-template-columns: 1fr; }
    .grid-2,
    .grid-3,
    .grid-4       { grid-template-columns: 1fr; }
    .steps        { grid-template-columns: 1fr; }

    .auth-card    { padding: 28px 20px; }
    .hero         { padding: 100px 20px 60px; }
    .hero-stats   { gap: 24px; }
    .modules-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 1.6rem; }
    .category-tabs { gap: 4px; }
    .tab-btn { padding: 5px 10px; font-size: 0.78rem; }
}

/* ===========================================================
   PRACTICE PAGE — drill rows, timers, weakness analyzer
   =========================================================== */

/* One row per drill: checkbox + name on left, timer on right */
.drill-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.drill-row:last-child { border-bottom: none; }
.drill-row:hover      { background: rgba(255,255,255,0.02); }

.drill-row.is-done {
    background: rgba(34,197,94,0.06);
}
.drill-row.is-done .drill-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Checkbox + drill label */
.drill-check {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}
.drill-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--orange);
    cursor: pointer;
    flex-shrink: 0;
}
.drill-name {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

/* Timer cluster on the right side */
.drill-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.timer-display {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: var(--teal);
    font-size: 1rem;
    min-width: 56px;
    text-align: right;
}
.timer-display.running { color: var(--orange); }
.timer-toggle {
    min-width: 78px;
}
.timer-toggle.running {
    background: var(--orange);
    color: #fff;
}

/* Custom drill badge */
.badge-custom {
    background: rgba(20,184,166,0.15);
    color: var(--teal);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Danger badge (HIGH PRIORITY weakness) */
.badge-danger {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
}

/* Danger alert (used for HIGH PRIORITY banner) */
.alert-danger {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #fecaca;
}

/* Section stat row on Custom Drills page */
.section-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.section-stat:last-child { border-bottom: none; }

/* Mobile tweaks for drill rows */
@media (max-width: 600px) {
    .drill-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 14px;
    }
    .drill-timer {
        justify-content: space-between;
    }
    .timer-display { font-size: 1.1rem; min-width: auto; }
}
