:root {
    --bg-deep: #0a0b10;
    --bg-surface: rgba(20, 22, 32, 0.7);
    --accent-cyan: #00f2ff;
    --accent-violet: #bc13fe;
    --text-main: #e2e8f0;
    --text-dim: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --primary-gradient: linear-gradient(135deg, #00f2ff 0%, #bc13fe 100%);
    --amber-gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 700; }

.glow-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at 10% 20%, rgba(0, 242, 255, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(188, 19, 254, 0.05) 0%, transparent 40%);
}

.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%; position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(10px); background: rgba(10, 11, 16, 0.8);
    border-bottom: 1px solid var(--glass-border);
}
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; letter-spacing: -1px; }
.nav-logo span { color: var(--accent-cyan); }

.hero {
    min-height: 60vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    padding: 0 5%;
    gap: 40px;
}
.hero-content h1 { font-size: 4rem; line-height: 1.1; margin-bottom: 20px; color: white; }
.hero-content h1 span { background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-content p { font-size: 1.1rem; color: var(--text-dim); max-width: 600px; }
.hero-visual { position: relative; display: flex; justify-content: center; }

.glass-card {
    width: 260px; height: 300px; background: var(--bg-surface);
    border: 1px solid var(--glass-border); border-radius: 24px;
    backdrop-filter: blur(20px); padding: 30px; box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.card-dot { width: 12px; height: 12px; background: var(--accent-cyan); border-radius: 50%; margin-bottom: 20px; box-shadow: 0 0 10px var(--accent-cyan); }
.card-line { height: 8px; background: var(--glass-border); margin-bottom: 10px; border-radius: 4px; width: 80%; }
.card-line.short { width: 50%; }
.floating { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.hub-section { padding: 60px 5% 100px; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1000px; margin: 0 auto; }

.hub-card {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    transition: all 0.4s ease;
    display: block;
    backdrop-filter: blur(20px);
}
.hub-card:hover { transform: translateY(-10px); }
.hub-card.exam-creator:hover { box-shadow: 0 0 40px rgba(0, 242, 255, 0.15); }
.hub-card.report-writer:hover { box-shadow: 0 0 40px rgba(245, 158, 11, 0.15); }

.hub-card-bg {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.08; transition: opacity 0.4s;
}
.hub-card.exam-creator .hub-card-bg { background: var(--primary-gradient); }
.hub-card.report-writer .hub-card-bg { background: var(--amber-gradient); }
.hub-card:hover .hub-card-bg { opacity: 0.15; }

.hub-content { position: relative; padding: 50px 40px; z-index: 1; }
.hub-icon { font-size: 3rem; margin-bottom: 20px; }
.hub-content h2 { font-size: 2rem; margin-bottom: 15px; }
.hub-content p { color: var(--text-dim); margin-bottom: 25px; line-height: 1.6; }

.hub-features { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.hub-features span {
    font-size: 0.75rem; padding: 6px 14px; border-radius: 20px;
    border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05);
    font-weight: 500; letter-spacing: 0.5px;
}

.hub-cta {
    font-weight: 600; font-size: 1rem;
    transition: transform 0.3s;
}
.hub-card.exam-creator .hub-cta { color: var(--accent-cyan); }
.hub-card.report-writer .hub-cta { color: var(--accent-amber); }
.hub-card:hover .hub-cta { transform: translateX(5px); }

footer {
    padding: 60px 5%; border-top: 1px solid var(--glass-border);
    text-align: center; background: rgba(0,0,0,0.4);
}
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 10px; }
.footer-logo span { color: var(--accent-cyan); }
.footer-content p { color: var(--text-dim); font-size: 0.8rem; }

.reveal { animation: reveal 1s ease forwards; }
.reveal-delay { opacity: 0; animation: reveal 1s ease 0.3s forwards; }

@keyframes reveal { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ========================
   LOGIN OVERLAY
   ======================== */

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-modal {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 50px 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    backdrop-filter: blur(20px);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.login-modal .login-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.login-modal h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-modal p {
    color: var(--text-dim);
    margin-bottom: 30px;
    line-height: 1.6;
}

.login-modal .g_id_signin {
    display: flex;
    justify-content: center;
}

.login-error {
    color: #ef4444;
    margin-top: 16px;
    font-size: 0.9rem;
}

/* ========================
   TOAST NOTIFICATIONS
   ======================== */

.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 24px;
    border-radius: 12px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(20px);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.toast.info {
    border-color: rgba(0, 242, 255, 0.3);
    background: rgba(0, 242, 255, 0.1);
    color: var(--accent-cyan);
}

/* ========================
   NAVBAR AUTH STYLES
   ======================== */

.nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge-sm {
    color: var(--accent-cyan);
    font-size: 0.8rem;
    padding: 4px 12px;
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.1);
    border-radius: 20px;
    cursor: default;
}

.logout-btn {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--glass-border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.logout-btn:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.login-btn {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 242, 255, 0.3);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.login-btn:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--accent-cyan);
}

.admin-link {
    color: var(--accent-violet) !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(188, 19, 254, 0.2);
    text-decoration: none !important;
    transition: all 0.3s;
}

.admin-link:hover {
    background: rgba(188, 19, 254, 0.1);
    border-color: var(--accent-violet);
}

/* ========================
   SESSION SIDEBAR (Report Writer)
   ======================== */

.session-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    min-width: 280px;
    max-width: 320px;
    backdrop-filter: blur(20px);
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.session-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-family: 'Inter', sans-serif;
    color: var(--text-dim);
}

.session-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 242, 255, 0.2);
}

.session-item.active {
    background: rgba(0, 242, 255, 0.05);
    border-color: var(--accent-cyan);
    color: var(--text-main);
}

.session-item .session-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-item .session-meta {
    font-size: 0.75rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

.session-item .session-delete {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.session-item .session-delete:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.new-session-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 12px;
}

.new-session-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.2);
}

@media (max-width: 768px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 80px; }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-visual { display: none; }
    .hub-grid { grid-template-columns: 1fr; }
}