/* =============================================================
   CODEADVENTURE — BASE STYLES
   Aesthetic: Neon Academy (shared foundation)
   Fonts: Fredoka (display) · Outfit (body) · JetBrains Mono (code)
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

/* ===== NEON ACADEMY TOKENS (shared across SEO + app pages) ===== */
:root {
    --neon-purple: #7f5af0;
    --neon-blue:   #00d4ff;
    --neon-pink:   #ff0077;
    --neon-green:  #00ff88;
    --brand-deep:  #2A146E;
    --glow-purple: rgba(127, 90, 240, 0.35);
    --glow-blue:   rgba(0, 212, 255, 0.25);
    --glass-bg:    rgba(255, 255, 255, 0.03);
    --glass-border:rgba(255, 255, 255, 0.08);
    --font-display:'Fredoka', sans-serif;
    --font-body:   'Outfit', sans-serif;
    --font-code:   'JetBrains Mono', monospace;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BASE ===== */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

main {
    flex-grow: 1;
}

/* ===== GENERIC BUTTON ===== */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand-deep, #2A146E), var(--neon-blue, #00d4ff));
    color: #fff;
    padding: 14px 32px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-decoration: none;
    border-radius: 30px;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
    position: relative;
    overflow: hidden;
    width: 200px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 212, 255, 0.4);
    color: #fff;
}

/* ===== USER MENU ===== */
.user-menu-item {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* ===== CHECKBOX (forms & modals) ===== */
.form-group.checkbox-group .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-group.checkbox-group .checkbox-label input[type="checkbox"] {
    display: none;
}

.form-group.checkbox-group .checkbox-label .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color, #0a0a0a);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.form-group.checkbox-group .checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, var(--brand-deep, #2A146E), var(--neon-blue, #00d4ff));
    border-color: var(--neon-blue, #00d4ff);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.form-group.checkbox-group .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* ===== HEADER ===== */
header {
    background-color: var(--bg-header);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 24px 20px;
    width: auto;
    border-top: 1px solid rgba(0, 212, 255, 0.12);
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

footer a {
    color: var(--neon-blue, #00d4ff);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

footer a:hover {
    opacity: 0.75;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 200px;
    background: var(--sidebar-bg);
    color: var(--text-color);
    height: auto;
    position: fixed;
    margin-top: -50px;
    top: 80px;
    left: 0;
    padding: 20px;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.4);
    border-right: 1px solid rgba(0, 212, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.user-info {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-color);
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar nav li {
    margin-bottom: 4px;
    display: block;
}

.sidebar nav a {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 15px;
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.sidebar nav a:hover {
    color: var(--neon-blue, #00d4ff);
    background: rgba(0, 212, 255, 0.06);
    padding-left: 16px;
}

/* ===== ADD CHILD BUTTON ===== */
#add-child {
    background: linear-gradient(135deg, #e2964a, #f0b070);
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    margin-top: 20px;
    transition: var(--transition-smooth);
    box-shadow: 0 3px 12px rgba(226, 150, 74, 0.25);
}

#add-child:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(226, 150, 74, 0.4);
}

/* ===== LEFT NAV (.menuiz) ===== */
.menuiz ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menuiz li {
    margin-bottom: 4px;
    display: block;
}

.menuiz a {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 15px;
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.menuiz a:hover {
    color: var(--neon-blue, #00d4ff);
    background: rgba(0, 212, 255, 0.06);
    padding-left: 16px;
}

/* ===== LOGOUT ITEM ===== */
.logout-item {
    color: var(--danger-color, #dc3545);
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.logout-item:hover {
    background: rgba(220, 53, 69, 0.12);
    color: #ff6b6b;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .logo-dropdown {
        min-width: 180px;
        left: -10px;
    }
}

/* ===== PERFORMANCE: Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
