/* ============================================================
   🌟 NEXTEDU - PREMIUM BUTTERY THEME (v2.0)
   Features: Glassmorphism, Dark/Light Mode, Floating Orbs
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800&display=swap');

:root {
    /* 🍯 Buttery Light Mode Palette */
    --primary: #F59E0B;            /* Deep Amber/Gold */
    --primary-hover: #D97706;
    --accent: #FCD34D;             /* Soft Sun Yellow */
    --bg-color: #FDFCF0;           /* Creamy White */
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(255, 193, 7, 0.3);
    --text-main: #1E293B;          /* Slate 800 */
    --text-muted: #64748B;
    --input-bg: rgba(255, 255, 255, 0.9);
    --error: #EF4444;
    --success: #10B981;
    --anim-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 🌙 Dark Mode Overrides (Deep & Glossy) */
[data-theme='dark'] {
    --bg-color: #0B0F19;           /* Pure Deep Dark */
    --card-bg: rgba(30, 41, 59, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --input-bg: rgba(15, 23, 42, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* =========================================
   GLOBAL BODY & ORB ANIMATIONS
   ========================================= */
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color var(--anim-smooth), color var(--anim-smooth);
}

/* Center items ONLY on Auth/Login pages (Prevents breaking Dashboard) */
body:not(.dashboard-body) {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ✨ Background Blurred Glow (Buttery Orbs) */
body::before, body::after {
    content: '';
    position: fixed; /* Fixed so it stays in bg even on scroll */
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none; /* Prevents blocking clicks */
    animation: floatOrb 15s infinite ease-in-out alternate;
}

body::before {
    width: 45vw;
    height: 45vw;
    max-width: 500px;
    max-height: 500px;
    background: rgba(245, 158, 11, 0.15); /* Gold glow */
    top: -10%;
    left: -10%;
}

body::after {
    width: 35vw;
    height: 35vw;
    max-width: 400px;
    max-height: 400px;
    background: rgba(252, 211, 77, 0.12); /* Amber glow */
    bottom: -5%;
    right: -5%;
    animation-delay: -7s;
}

[data-theme='light'] body::before { background: rgba(245, 158, 11, 0.25); }
[data-theme='light'] body::after { background: rgba(252, 211, 77, 0.2); }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 50px) scale(1.05); }
    100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* =========================================
   AUTH CARD (BUTTERY GLASS)
   ========================================= */
.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 28px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    z-index: 10;
}

@keyframes fadeUp {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.auth-card h2 {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, var(--primary), #FFD54F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.auth-card p.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

/* =========================================
   FORM INPUTS (SMOOTH & GLOSSY)
   ========================================= */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
    padding-left: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--anim-smooth);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.input-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.input-group input:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15), inset 0 2px 4px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* =========================================
   BUTTERY BUTTONS
   ========================================= */
.btn-primary {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border: none;
    border-radius: 16px;
    color: #000; /* Dark text on gold looks ultra premium */
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--anim-smooth);
    margin-top: 1rem;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}

/* Shiny Hover Effect */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    transition: 0.6s ease;
}

.btn-primary:hover::after {
    left: 150%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* =========================================
   BUTTERY TOAST NOTIFICATIONS
   ========================================= */
.toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--card-bg);
    color: var(--text-main);
    padding: 16px 24px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    border-left: 5px solid var(--primary);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    font-weight: 500;
}

.toast.show {
    transform: translateX(0);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }

.toast-icon {
    font-size: 1.4rem;
}

/* =========================================
   UTILITIES & MESSAGES
   ========================================= */
.message-box {
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 600;
    display: none;
    animation: fadeUp 0.3s ease forwards;
}
.message-box.error { background: rgba(239, 68, 68, 0.15); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.3); }
.message-box.success { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }

/* Theme Toggle Button (If used on Auth Pages) */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--anim-smooth);
    color: var(--text-main);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    transform: rotate(30deg) scale(1.1);
    border-color: var(--primary);
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media screen and (max-width: 480px) {
    body:not(.dashboard-body) { padding: 15px; }
    .auth-card { padding: 2.5rem 1.5rem; border-radius: 24px; }
    .auth-card h2 { font-size: 1.7rem; }
    .toast-container { top: 15px; right: 15px; left: 15px; align-items: center; }
    .toast { width: 100%; justify-content: center; }
}