/* ============================================
   NEET HUB — Shared Styles
   ============================================ */

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

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a2e;
    --bg-card: #16162a;
    --bg-hover: #16162a;
    --neon-purple: #b829e3;
    --neon-cyan: #00f5ff;
    --neon-green: #39ff14;
    --neon-pink: #ff2d75;
    --neon-yellow: #f5f520;
    --text-primary: #e0e0ff;
    --text-secondary: #a8a8cc;
    --text-muted: #7777a0;
    --border: rgba(255,255,255,0.05);
    --border-glow: rgba(0, 245, 255, 0.2);
    --shadow-neon: 0 0 15px rgba(0, 245, 255, 0.3);
    --shadow-purple: 0 0 15px rgba(184, 41, 227, 0.3);
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Rajdhani', sans-serif;

    /* Opacity scale for neon cyan */
    --cyan-30: rgba(0, 245, 255, 0.3);
    --cyan-20: rgba(0, 245, 255, 0.2);
    --cyan-15: rgba(0, 245, 255, 0.15);
    --cyan-10: rgba(0, 245, 255, 0.1);
    --cyan-08: rgba(0, 245, 255, 0.08);
    --cyan-05: rgba(0, 245, 255, 0.05);

    /* Common white overlays */
    --white-08: rgba(255, 255, 255, 0.08);
    --white-05: rgba(255, 255, 255, 0.05);
    --white-10: rgba(255, 255, 255, 0.1);

    /* Standard transitions (avoid transition: all) */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
}

a { color: var(--neon-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Scrollbar — Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }
/* Scrollbar — Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--neon-purple) var(--bg-primary); }

/* ============================================
   NAVIGATION (shared across all pages)
   ============================================ */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    border-bottom: 1px solid var(--border-glow);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.nav.scrolled {
    box-shadow: var(--shadow-neon);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: 3px;
}

.nav-center {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    cursor: pointer;
}

.chat-btn {
    background: rgba(0, 245, 255, 0.1);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 245, 255, 0.3);
}
.chat-btn:hover {
    background: rgba(0, 245, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
    transform: translateY(-1px);
}

.forum-btn {
    background: rgba(184, 41, 227, 0.1);
    color: var(--neon-purple);
    border: 1px solid rgba(184, 41, 227, 0.3);
}
.forum-btn:hover {
    background: rgba(184, 41, 227, 0.2);
    box-shadow: 0 0 15px rgba(184, 41, 227, 0.3);
    transform: translateY(-1px);
}

.resource-btn {
    background: rgba(57, 255, 20, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(57, 255, 20, 0.3);
}
.resource-btn:hover {
    background: rgba(57, 255, 20, 0.2);
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
    transform: translateY(-1px);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.nav-auth-btn {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    color: #fff;
    border: none;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-auth-btn:hover {
    box-shadow: 0 0 20px rgba(184, 41, 227, 0.4);
    transform: translateY(-1px);
}

.user-avatar-small {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    overflow: hidden;
    position: relative;
}

/* X (Twitter) nav button */
.x-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    font-weight: 900;
    font-size: 0.8rem !important;
}
.x-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2) !important;
}
.x-followers {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--neon-cyan);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    color: #fff;
    border: none;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.9rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.9rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-secondary:hover {
    background: rgba(0, 245, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.2);
    transform: translateY(-2px);
}

/* ============================================
   AUTH MODAL (shared across pages)
   ============================================ */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.auth-overlay.active { display: flex; }

.auth-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-neon);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}
.auth-close:hover { color: var(--text-primary); }

.auth-modal h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

#authSubtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-error {
    color: var(--neon-pink);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    display: none;
    font-family: var(--font-mono);
}
.auth-error.show { display: block; }

#authForm {
    display: flex;
    flex-direction: column;
}

.auth-input {
    width: 100%;
    background: var(--bg-tertiary);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    margin-bottom: 0.8rem;
    transition: border-color 0.3s;
}
.auth-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.1);
}
.auth-input::placeholder { color: var(--text-muted); }

.auth-divider {
    text-align: center;
    margin: 1.2rem 0;
    position: relative;
    font-size: 0.85rem;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
}
.auth-divider span {
    background: var(--bg-secondary);
    padding: 0 1rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.auth-toggle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}
.auth-toggle a {
    color: var(--neon-cyan);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}
.auth-toggle a:hover { color: #fff; }

.auth-forgot {
    text-align: center;
    font-size: 0.8rem;
    margin-top: 0.6rem;
}
.auth-forgot a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}
.auth-forgot a:hover {
    color: var(--neon-cyan);
}

/* ============================================
   FOOTER (shared across pages)
   ============================================ */
.footer {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, transparent, rgba(18, 18, 26, 0.5));
    border-top: 1px solid var(--border-glow);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}
.footer-links a:hover { color: var(--neon-cyan); }

.footer-x { margin-bottom: 1.2rem; }
.footer-x-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
}
.footer-x-link:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}
.footer-x-icon { font-size: 1.3rem; font-weight: 900; }
.footer-x-text { font-family: var(--font-mono); font-size: 0.85rem; color: var(--neon-cyan); }
.footer-x-count {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding-left: 0.7rem;
    border-left: 1px solid rgba(255,255,255,0.1);
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   FLOATING X BADGE
   ============================================ */
.x-float {
    position: fixed;
    bottom: 5rem;
    left: 2rem;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.6rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.x-float:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}
.x-float-icon { font-size: 1.1rem; font-weight: 900; }
.x-float-info { display: flex; flex-direction: column; line-height: 1.2; }
.x-float-handle { font-family: var(--font-mono); font-size: 0.7rem; color: var(--neon-cyan); }
.x-float-count { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); }

/* ============================================
   ANIMATION UTILITIES
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SCANLINE OVERLAY
   ============================================ */
.scanline-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    opacity: 0.4;
}

/* ============================================
   RESPONSIVE — SHARED NAV
   ============================================ */
@media (max-width: 768px) {
    .nav {
        padding: 0 1rem;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
    }
    .nav-toggle {
        display: block;
        order: 2;
        margin-left: auto;
    }
    .nav-logo { font-size: 1.1rem; order: 1; }
    .nav-center {
        order: 3;
        flex-direction: column;
        width: 100%;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .nav.menu-open .nav-center {
        max-height: 500px;
        padding: 0.5rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    .nav-center .nav-btn {
        width: 100%;
        justify-content: center;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding: 0.75rem 1rem;
    }
    .nav-right {
        order: 4;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        align-items: stretch;
    }
    .nav.menu-open .nav-right {
        max-height: 500px;
        padding: 0.5rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    /* Solid background for mobile dropdown (Safari doesn't reliably support backdrop-filter) */
    .nav.menu-open {
        background: rgba(10, 10, 15, 0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
    .x-float { display: none; }
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--neon-cyan);
    color: var(--bg-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

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

/* Minimum touch target size (nav/topbar buttons only, not inline UI) */
button.nav-btn, button.topbar-btn, .nav-btn, .topbar-btn {
    min-height: 44px;
    min-width: 44px;
}

/* Auth modal mobile fix — merged into .auth-modal above */

/* ============================================
   EMAIL VERIFICATION SCREEN
   ============================================ */
.auth-screen {
    display: none;
}
.auth-screen.active {
    display: block;
}

.verify-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.verify-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.verify-subtitle span {
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-weight: 600;
    word-break: break-all;
}

.verify-icon {
    font-size: 3rem;
    text-align: center;
    margin: 1.5rem 0;
    animation: verifyBounce 2s infinite;
}

@keyframes verifyBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.verify-status {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.verify-status.verified {
    background: rgba(57, 255, 20, 0.2);
    border-color: rgba(57, 255, 20, 0.5);
    color: var(--neon-green);
}

.verify-status.checking {
    animation: verifyPulse 1.5s infinite;
}

@keyframes verifyPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.verify-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.verify-buttons .btn-primary,
.verify-buttons .btn-secondary {
    width: 100%;
    margin: 0;
    padding: 0.8rem 1.5rem;
}

.verify-info {
    background: rgba(0, 245, 255, 0.05);
    border-left: 2px solid var(--neon-cyan);
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.verify-info p {
    margin: 0.3rem 0;
    line-height: 1.4;
}

.verify-cooldown {
    color: var(--neon-pink);
    font-weight: 600;
    margin-top: 0.5rem;
}
