/* --- PREMIUM DARK THEME VARIABLES --- */
:root {
    --bg-page: #020617;    /* Deepest Slate */
    --bg-card: #1e293b;    /* Oxford Blue */
    --accent: #fbbf24;     /* Bright Gold */
    --text-main: #f8fafc;  /* White */
    --text-muted: #94a3b8; /* Silver */
    --glow-blue: rgba(56, 189, 248, 0.15); /* Soft Light Blue */
    --glow-secondary: rgba(30, 58, 138, 0.2); /* Deep Blue Shadow */
    color-scheme: dark;
}

html { scroll-behavior: smooth; background-color: var(--bg-page); }
body { 
    background-color: var(--bg-page); 
    color: var(--text-main); 
    overflow-x: hidden; 
    position: relative;
    z-index: 1;
}

/* --- GLOBAL ANIMATED BACKGROUND --- */
#animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Behind everything */
    overflow: hidden;
    background: var(--bg-page); /* Fallback */
    pointer-events: none; /* Make sure clicks pass through */
}


.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px); /* Reduced from 80px for performance */
    opacity: 0.6;
    will-change: transform, background; /* Hardware acceleration hint */
    transform: translateZ(0); /* Force GPU layer */
}

/* Light Blue Walking Shadows (More Movement) */
.orb-1 { 
    width: 60vw; height: 60vw; 
    background: var(--glow-blue); 
    top: -20%; left: -20%; 
    animation: orbFloat1 25s infinite alternate ease-in-out; 
}
.orb-2 { 
    width: 60vw; height: 60vw; 
    background: var(--glow-secondary); 
    bottom: -20%; right: -20%; 
    animation: orbFloat2 35s infinite alternate ease-in-out; 
    animation-delay: -5s; 
}
.orb-3 { 
    width: 50vw; height: 50vw; 
    background: rgba(56, 189, 248, 0.1); 
    top: 40%; left: 30%; 
    animation: orbFloat3 40s infinite alternate ease-in-out; 
    animation-delay: -10s; 
}
.orb-4 { 
    width: 40vw; height: 40vw; 
    background: rgba(251, 191, 36, 0.08); /* Slight warm accent */
    bottom: 20%; left: 10%; 
    animation: orbFloat4 45s infinite alternate ease-in-out; 
    animation-delay: -15s; 
}

/* Keyframes moved to bottom to include color transitions */

/* --- FORCE DARK MODE OVERRIDES --- */
.bg-white, .bg-gray-50, .bg-light, .bg-slate-50 {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.text-gray-800, .text-gray-700, .text-slate-800, .text-black { color: var(--text-main) !important; }
.text-gray-600, .text-gray-500, .text-slate-600 { color: var(--text-muted) !important; }

/* --- CRITICAL INPUT FIX --- */
input, textarea, select {
    background-color: #020617 !important;
    color: #fbbf24 !important;
    border: 1px solid #fbbf24 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #fbbf24 !important;
    font-weight: 500;
}
input::placeholder, textarea::placeholder { color: #64748b !important; -webkit-text-fill-color: #64748b !important; }

/* Loader Hide Utility */
body.loaded { overflow-y: auto; }
#loader.opacity-0 { pointer-events: none; }

/* --- NAVBAR SCROLL TRANSITION --- */
nav {
    transition: transform 0.3s ease-in-out, background-color 0.3s ease;
}

/* --- HERO SECTION --- */
.hero-container {
    position: relative;
    /* Removed background-color to let global background show through */
}

.hero-content { position: relative; z-index: 10; }

/* --- SCROLL REVEAL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- HOVER EFFECTS --- */
.hover-card {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(30, 41, 59, 0.4); /* Glassier base */
    backdrop-filter: blur(10px);
}

.hover-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(56, 189, 248, 0.15); /* Blue glow shadow */
    border-color: var(--accent);
    background-color: rgba(30, 41, 59, 0.8) !important;
}

/* Button & Interactive Enhancements */
button, a.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
button:hover, a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(251, 191, 36, 0.3); /* Gold glow */
}
button:active, a.btn:active {
    transform: scale(0.96) translateY(0);
    box-shadow: 0 5px 10px -5px rgba(251, 191, 36, 0.2);
}
.group:hover .admin-control {
    opacity: 1;
    transform: translateY(0);
} 
.admin-control { transition: all 0.3s ease; transform: translateY(5px); }


/* --- TEXT GLOW ANIMATION (Premium Silver) --- */
.text-glow-gold, .text-glow-blue {
    animation: glowSilver 3s ease-in-out infinite alternate;
}

@keyframes glowSilver {
    from { text-shadow: 0 0 5px rgba(255, 255, 255, 0.3); color: #e2e8f0; }
    to { text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 255, 255, 0.4); color: #ffffff; }
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); background: var(--glow-blue); }
    50% { transform: translate(150px, 100px) scale(1.1) rotate(20deg); background: rgba(251, 191, 36, 0.15); /* Shift to Gold */ }
    100% { transform: translate(-50px, 150px) scale(0.9) rotate(-10deg); background: var(--glow-blue); }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); background: var(--glow-secondary); }
    50% { transform: translate(-150px, -100px) scale(1.2) rotate(-15deg); background: rgba(56, 189, 248, 0.2); /* Shift to Cyan */ }
    100% { transform: translate(50px, -150px) scale(0.95) rotate(10deg); background: var(--glow-secondary); }
}

@keyframes orbFloat3 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); background: rgba(56, 189, 248, 0.1); }
    50% { transform: translate(-100px, 150px) scale(1.1) rotate(15deg); background: rgba(168, 85, 247, 0.15); /* Shift to Purple */ }
    100% { transform: translate(150px, -50px) scale(0.9) rotate(-20deg); background: rgba(56, 189, 248, 0.1); }
}

@keyframes orbFloat4 {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); background: rgba(251, 191, 36, 0.08); }
    50% { transform: translate(120px, -120px) scale(1.15) rotate(-20deg); background: rgba(236, 72, 153, 0.1); /* Shift to Pink */ }
    100% { transform: translate(-80px, 80px) scale(0.95) rotate(10deg); background: rgba(251, 191, 36, 0.08); }
}

/* --- UTILS --- */
table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
th, td { padding: 12px; border: 1px solid rgba(255, 255, 255, 0.1); text-align: left; }
th { background-color: #0f172a; color: var(--accent); }
tr:hover { background-color: rgba(251, 191, 36, 0.05); }

.notice-board { max-height: 350px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--accent) var(--bg-page); }
.admin-overlay { background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(2px); opacity: 0; transition: opacity 0.2s; cursor: pointer; border: 1px solid var(--accent); }
.group:hover .admin-overlay { opacity: 1; }

/* Toast System */
.toast {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border-left: 4px solid transparent;
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, toastFadeOut 0.5s ease forwards 4.5s;
    max-width: 320px;
    pointer-events: auto;
}

.toast.success { border-left-color: #10b981; border-right: 1px solid rgba(16, 185, 129, 0.2); }
.toast.error { border-left-color: #ef4444; border-right: 1px solid rgba(239, 68, 68, 0.2); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}
