:root {
    --primary-hue: 260;
    --primary-color: hsl(260, 100%, 65%);
    --primary-glow: hsl(260, 100%, 70%);
    --secondary-color: hsl(320, 100%, 60%);
    --accent-cyan: hsl(180, 100%, 50%);
    --accent-orange: hsl(30, 100%, 60%);

    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 35, 0.8);
    --text-light: #ffffff;
    --text-dim: #a0a0b0;
    --text-muted: #606070;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-glow: 0 0 20px rgba(139, 92, 246, 0.5);

    --font-main: 'Outfit', sans-serif;

    --gradient-rainbow: linear-gradient(135deg,
            hsl(260, 100%, 65%) 0%,
            hsl(320, 100%, 60%) 25%,
            hsl(180, 100%, 50%) 50%,
            hsl(260, 100%, 65%) 75%,
            hsl(320, 100%, 60%) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ====== ANIMATED BACKGROUND ====== */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 60%),
        var(--bg-dark);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: blobFloat 25s ease-in-out infinite;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-cyan));
    bottom: -15%;
    right: -10%;
    animation-delay: -8s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--primary-color));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -16s;
}

@keyframes blobFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    25% {
        transform: translate(50px, -30px) scale(1.1) rotate(90deg);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.95) rotate(180deg);
    }

    75% {
        transform: translate(-50px, -20px) scale(1.05) rotate(270deg);
    }
}

/* ====== MAIN CONTAINER ====== */
.glass-container {
    width: 95%;
    max-width: 1400px;
    min-height: 90vh;
    margin: 5vh auto;
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 100px rgba(139, 92, 246, 0.1);
    overflow: hidden;
    position: relative;
}

.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3) 20%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0.3) 80%,
            transparent);
}

/* ====== HEADER ====== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--gradient-rainbow);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
    text-shadow: none;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
}

.logo i {
    -webkit-text-fill-color: var(--primary-color);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--primary-color));
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 12px;
}

.nav-btn:hover::before,
.nav-btn.active::before {
    opacity: 0.15;
}

.nav-btn.active,
.nav-btn:hover {
    color: white;
    border-color: rgba(139, 92, 246, 0.3);
}

/* ====== CONTENT AREA ====== */
.content-area {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-section {
    text-align: center;
    width: 100%;
    max-width: 1200px;
}

/* ====== TYPOGRAPHY ====== */
.title-gradient {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg,
            #ffffff 0%,
            var(--primary-color) 30%,
            var(--secondary-color) 60%,
            var(--accent-cyan) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
    margin-bottom: 1rem;
    letter-spacing: -2px;
    line-height: 1.1;
    filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.3));
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 3.5rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* ====== GRADE GRID ====== */
.grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ====== GRADE CARDS ====== */
.grade-card {
    cursor: pointer;
    text-align: left;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(145deg,
            rgba(30, 30, 50, 0.8),
            rgba(20, 20, 35, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2rem;
}

.grade-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.2) 0%,
            rgba(236, 72, 153, 0.1) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.grade-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.6s;
}

.grade-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(139, 92, 246, 0.2),
        0 0 60px rgba(139, 92, 246, 0.1);
}

.grade-card:hover::before {
    opacity: 1;
}

.grade-card:hover::after {
    left: 100%;
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: white;
    box-shadow:
        0 10px 30px rgba(139, 92, 246, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    z-index: 1;
}

.card-icon i {
    font-size: 1.8rem;
}

.grade-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

.grade-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* ====== EXAM SELECTION GRID ====== */
.exam-select-header {
    text-align: center;
    margin-bottom: 2rem;
}

.exam-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    margin: 1rem 0;
}

.exam-number-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
}

.exam-number-card:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.exam-number-card span {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

/* ====== FOOTER ====== */
footer {
    padding: 1.2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
}

footer p {
    opacity: 0.7;
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-glow), var(--secondary-color));
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .glass-container {
        width: 98%;
        margin: 1vh auto;
        border-radius: 20px;
    }

    .main-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .content-area {
        padding: 1.5rem;
    }

    .grade-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .title-gradient {
        font-size: 2rem;
    }
}