/* =========================================
   QUANTUM VARIABLES & RESET
========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
::-webkit-scrollbar { width: 0px; }

:root {
    --bg-base: #03000a;
    --glass-bg: rgba(10, 5, 20, 0.55);
    --glass-border: rgba(0, 240, 255, 0.15);
    --primary: #00f0ff;
    --primary-glow: rgba(0, 240, 255, 0.6);
    --secondary: #b026ff;
    --text-main: #e2e8f0;
    --text-muted: #64748b;
    --danger: #ff0055;
    --success: #00ff88;
}

body { font-family: 'Inter', sans-serif; background: var(--bg-base); color: var(--text-main); min-height: 100vh; overflow-x: hidden; position: relative; }
.font-code { font-family: 'Space Mono', monospace; }
.hidden { display: none !important; }
.mt-10 { margin-top: 10px; } .mt-15 { margin-top: 15px; } .mt-20 { margin-top: 20px; } .mt-30 { margin-top: 30px; } .mb-10 { margin-bottom: 10px; } .mb-20 { margin-bottom: 20px; }
.text-center { text-align: center; }
.theme-text { color: var(--primary); text-shadow: 0 0 15px var(--primary-glow); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); text-shadow: 0 0 10px var(--danger); }

/* =========================================
   🌌 EXTREME ANIMATED BACKGROUND
========================================= */
.dynamic-universe { position: fixed; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; background: #000; }
.void-bg { position: absolute; width: 100%; height: 100%; background: radial-gradient(circle at center, transparent 0%, #03000a 80%); z-index: 2; pointer-events: none; }

.glowing-orb { position: absolute; width: 400px; height: 400px; background: var(--secondary); border-radius: 50%; filter: blur(120px); opacity: 0.15; animation: orbFloat 15s infinite alternate ease-in-out; }
@keyframes orbFloat { 0% { top: -10%; left: -10%; transform: scale(1); } 100% { top: 50%; left: 80%; transform: scale(1.5); background: var(--primary); } }

.cyber-grid {
    position: absolute; width: 200%; height: 200%; bottom: -50%; left: -50%;
    background-image: linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px; transform: rotateX(75deg); animation: panGrid 10s linear infinite; z-index: 1;
}
@keyframes panGrid { 0% { transform: rotateX(75deg) translateY(0); } 100% { transform: rotateX(75deg) translateY(50px); } }

.quantum-ring { position: absolute; border-radius: 50%; border: 2px dashed rgba(176, 38, 255, 0.4); z-index: 0; filter: blur(1px); mix-blend-mode: screen; }
.ring-1 { width: 80vw; height: 80vw; top: -20%; left: -20%; animation: spinRing 30s linear infinite; box-shadow: inset 0 0 100px rgba(176, 38, 255, 0.3); }
.ring-2 { width: 60vw; height: 60vw; bottom: -10%; right: -10%; border-color: rgba(0, 240, 255, 0.3); animation: spinRing 20s linear infinite reverse; box-shadow: 0 0 100px rgba(0, 240, 255, 0.2); }
@keyframes spinRing { 100% { transform: rotate(360deg); } }

.floating-sparks { position: absolute; width: 100%; height: 100%; z-index: 2; }
.spark { position: absolute; background: #fff; border-radius: 50%; box-shadow: 0 0 15px var(--primary), 0 0 30px #fff; animation: floatUp linear infinite; opacity: 0; }
@keyframes floatUp { 0% { transform: translateY(100vh) scale(0); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(-10vh) scale(2); opacity: 0; } }

/* =========================================
   COMPACT & ANIMATED HEADER
========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 20px 20px; } 
.app-header { text-align: center; margin-bottom: 30px; } 

.logo-wrap { position: relative; width: 70px; height: 70px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.outer-icon { font-size: 4rem; color: rgba(0, 240, 255, 0.4); filter: blur(1px); animation: logoSpin 10s linear infinite; position: absolute;}
.inner-icon { font-size: 2.2rem; color: var(--primary); filter: drop-shadow(0 0 20px var(--primary)); position: absolute; animation: pulseLogo 2s infinite alternate;}
@keyframes logoSpin { 100% { transform: rotate(360deg); } }
@keyframes pulseLogo { 0% { transform: scale(0.95); } 100% { transform: scale(1.1); filter: drop-shadow(0 0 30px var(--primary)); } }

.title-glow { font-size: 2.5rem; font-weight: 900; letter-spacing: 4px; color: #fff; margin-top: 10px; text-shadow: 0 5px 25px rgba(0, 240, 255, 0.5); animation: floatTitle 4s infinite ease-in-out; }
@keyframes floatTitle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.animated-subtitle { display: inline-block; font-size: 0.9rem; overflow: hidden; white-space: nowrap; margin: 5px auto 0; letter-spacing: 2px; font-weight: 700; position: relative; background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary)); background-size: 200% 100%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: subtitleSweep 2s infinite linear; }
@keyframes subtitleSweep { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* =========================================
   🚨 HIGHLIGHTED SETUP PHASE
========================================= */
.setup-container { max-width: 600px; margin: 0 auto; padding: 40px !important; position: relative; }

.highlight-pulse { border: 2px solid var(--primary); box-shadow: 0 0 40px rgba(0, 240, 255, 0.4), inset 0 0 20px rgba(0, 240, 255, 0.2); animation: focusPulse 1.5s infinite alternate; }
@keyframes focusPulse { 0% { transform: scale(1); box-shadow: 0 0 30px rgba(0, 240, 255, 0.2); } 100% { transform: scale(1.02); box-shadow: 0 0 60px rgba(0, 240, 255, 0.6), inset 0 0 30px rgba(0, 240, 255, 0.4); border-color: #fff;} }

.attention-badge { background: var(--danger); color: #fff; padding: 6px 15px; border-radius: 30px; font-size: 0.8rem; font-weight: 800; letter-spacing: 2px; display: inline-block; margin-bottom: 15px; box-shadow: 0 0 20px var(--danger); }

.input-group { display: flex; gap: 15px; justify-content: center; }
.big-input { width: 130px; font-size: 2rem !important; font-weight: 900; padding: 15px !important; height: 65px; text-shadow: 0 0 10px var(--primary);}
.input-group .btn-calculate { font-size: 1.1rem; height: 65px; padding: 0 30px; }

/* =========================================
   UI LAYOUT (PERFECTLY ALIGNED)
========================================= */
.calculator-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px; align-items: stretch; } 
@media (max-width: 900px) { .calculator-layout { grid-template-columns: 1fr; } .input-group { flex-direction: column; } .big-input { width: 100%; } .input-group .btn-calculate { width: 100%; } }

.glass-panel { background: var(--glass-bg); backdrop-filter: blur(25px); border: 1px solid var(--glass-border); border-radius: 24px; padding: 30px; box-shadow: 0 25px 50px rgba(0,0,0,0.6), inset 0 0 20px rgba(0,240,255,0.05); }
.glass-heavy { background: rgba(3, 0, 10, 0.85); backdrop-filter: blur(30px); border: 1px solid rgba(176, 38, 255, 0.4); border-radius: 24px; padding: 35px; box-shadow: 0 30px 60px rgba(0,0,0,0.8), inset 0 0 40px rgba(176, 38, 255, 0.2); text-align: center; transition: 0.5s; display: flex; flex-direction: column; justify-content: center; }

/* =========================================
   INPUTS & SUPER-ANIMATED COURSE BOXES
========================================= */
.section-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px;}
.section-title h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }

.course-list { display: flex; flex-direction: column; gap: 15px; max-height: 330px; overflow-y: auto; padding-right: 10px; padding-left: 5px; padding-top: 5px; }
.course-list::-webkit-scrollbar { width: 6px; }
.course-list::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.8); border-radius: 10px; box-shadow: 0 0 10px var(--primary); }
.course-list::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 10px; }

.course-row { 
    display: grid; grid-template-columns: 2fr 1fr 1fr 45px; gap: 12px; align-items: center; 
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(0, 240, 255, 0.15); 
    padding: 15px; border-radius: 14px; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: slideInRow 0.5s ease-out forwards; opacity: 0; transform: translateX(-30px);
}
.course-row:hover {
    border-color: var(--primary); background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 240, 255, 0.3), inset 0 0 15px rgba(0, 240, 255, 0.1);
    transform: translateY(-5px) scale(1.02);
}

@keyframes slideInRow { to { opacity: 1; transform: translateX(0); } }

.cyber-input, .grade-select { width: 100%; padding: 12px; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; color: #fff; font-size: 0.95rem; outline: none; transition: 0.3s; }
.cyber-input:focus, .grade-select:focus { border-color: var(--primary); box-shadow: 0 0 20px var(--primary-glow), inset 0 0 10px rgba(0, 240, 255, 0.2); background: rgba(0,240,255,0.1); transform: translateY(-2px); }
.grade-select { cursor: pointer; appearance: none; }
.custom-select { position: relative; }
.custom-select::after { content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--primary); pointer-events: none; }
.grade-select option { background: var(--bg-base); color: #fff; }

.delete-btn { background: rgba(255, 0, 85, 0.1); border: 1px solid rgba(255, 0, 85, 0.3); color: var(--danger); width: 45px; height: 45px; border-radius: 12px; cursor: pointer; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); font-size: 1.2rem;}
.delete-btn:hover { background: var(--danger); color: #fff; box-shadow: 0 0 25px var(--danger); transform: scale(1.15) rotate(90deg); border-color: #fff;}
.btn-icon { background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: 0.3s; }
.btn-icon:hover { color: var(--danger); transform: rotate(180deg) scale(1.3); filter: drop-shadow(0 0 15px var(--danger)); }

/* =========================================
   EXTREME BUTTONS
========================================= */
.action-buttons { display: grid; grid-template-columns: 1fr 2fr; gap: 15px; }

.btn-outline { background: rgba(0,0,0,0.4); border: 1px solid var(--text-muted); color: #fff; padding: 15px; border-radius: 12px; font-weight: 800; cursor: pointer; transition: 0.3s; letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 8px;}
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; transform: translateY(-4px); box-shadow: 0 10px 20px rgba(255,255,255,0.1); }

.btn-calculate { 
    background: linear-gradient(45deg, var(--secondary), var(--primary), var(--secondary)); background-size: 200% auto;
    border: none; padding: 15px; border-radius: 12px; color: #fff; font-size: 1.1rem; font-weight: 900; 
    cursor: pointer; transition: 0.3s; box-shadow: 0 10px 30px rgba(176, 38, 255, 0.5);
    letter-spacing: 2px; position: relative; overflow: hidden; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
    animation: gradientShift 3s infinite linear;
}
@keyframes gradientShift { 0% { background-position: 0% center; } 100% { background-position: 200% center; } }

.btn-calculate::after { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: rgba(255,255,255,0.2); transform: rotate(45deg); transition: 0.5s; opacity: 0; }
.btn-calculate:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 20px 50px rgba(0, 240, 255, 0.8); }
.btn-calculate:hover::after { animation: laserSweep 1s infinite; }
@keyframes laserSweep { 0% { left: -100%; opacity: 0; } 50% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.btn-calculate:active { transform: scale(0.95); }

/* =========================================
   LIVE RESULT UI
========================================= */
.result-card { margin-bottom: 20px; position: relative; }
.result-card h3 { font-size: 1.1rem; letter-spacing: 3px; margin-bottom: 10px; }

.gpa-display { display: flex; justify-content: center; align-items: center; height: 100px; }
#final-gpa { font-size: 5.5rem; font-weight: 900; color: #fff; text-shadow: 0 10px 40px rgba(0,0,0,0.8); transition: 0.3s; }
.gpa-msg { font-size: 1.1rem; font-weight: 800; letter-spacing: 2px; color: var(--text-muted); margin-top: 10px; transition: 0.3s; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.stat-box { background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 20px; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: inset 0 0 15px rgba(0,0,0,0.5);}
.stat-box:hover { border-color: var(--secondary); transform: translateY(-8px) scale(1.05); box-shadow: 0 15px 30px rgba(0,0,0,0.6), inset 0 0 25px rgba(176, 38, 255, 0.2); }
.stat-box i { font-size: 1.6rem; margin-bottom: 10px; animation: floatIcon 3s infinite ease-in-out alternate; }
@keyframes floatIcon { 0% { transform: translateY(0); } 100% { transform: translateY(-5px); filter: drop-shadow(0 0 10px var(--primary)); } }

.stat-box h4 { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 5px; letter-spacing: 1px;}
.stat-box span { font-size: 1.8rem; font-weight: 900; color: #fff; }

/* Floating Stats Boxes */
.floating-box-1 { animation: boxFloat1 6s infinite alternate ease-in-out; }
.floating-box-2 { animation: boxFloat2 7s infinite alternate ease-in-out; }
@keyframes boxFloat1 { 0% { transform: translateY(0); } 100% { transform: translateY(-4px); } }
@keyframes boxFloat2 { 0% { transform: translateY(0); } 100% { transform: translateY(-4px); } }

/* Processing & Glows */
.processing .gpa-display { animation: pulseScan 0.3s infinite alternate; filter: blur(2px); }
@keyframes pulseScan { 0% { transform: scale(0.95); opacity: 0.5; } 100% { transform: scale(1.1); opacity: 1; text-shadow: 0 0 50px var(--primary); } }

.reveal-pop { animation: popResult 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes popResult { 0% { transform: scale(0.2); opacity: 0; filter: blur(20px); } 60% { transform: scale(1.2); opacity: 1; filter: blur(0); } 100% { transform: scale(1); } }

.glow-excellent { color: var(--success) !important; text-shadow: 0 0 50px var(--success), 0 0 100px var(--success) !important; }
.glow-good { color: var(--primary) !important; text-shadow: 0 0 50px var(--primary), 0 0 100px var(--primary) !important; }
.glow-average { color: #f59e0b !important; text-shadow: 0 0 50px #f59e0b, 0 0 100px #f59e0b !important; }
.glow-danger { color: var(--danger) !important; text-shadow: 0 0 50px var(--danger), 0 0 100px var(--danger) !important; }

/* Entry Animations */
.fade-in { animation: fadeIn 1s ease-out forwards; }
.slide-up { animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.slide-up-delay { animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: 0.2s; opacity: 0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
