:root {
    --bg-color: #021a1d;
    --text-color: #E2E8F0;
    --primary: #40E0D0; /* Turquoise */
    --secondary: #008080; /* Teal */
    --accent: #10B981; /* Glow Green */
    
    --glass-bg: rgba(2, 26, 29, 0.6);
    --glass-border: rgba(64, 224, 208, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    /* Turquoise background */
    background: linear-gradient(to bottom, #0f5b66 0%, #052429 100%);
}

/* Background Stars Animation */
.stars, .twinkling {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: -2;
}

.stars {
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat top center;
    z-index: -3;
}

.twinkling {
    background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat top center;
    z-index: -2;
    animation: move-twink-back 200s linear infinite;
    opacity: 0.5;
}

@keyframes move-twink-back {
    from {background-position: 0 0;}
    to {background-position: -10000px 5000px;}
}

/* Shooting Stars */
.shooting-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    transform: rotateZ(45deg);
}

.shooting-stars span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1), 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 20px rgba(255, 255, 255, 1);
    animation: animate-stars 3s linear infinite;
}

.shooting-stars span::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
}

@keyframes animate-stars {
    0% {
        transform: rotate(315deg) translateX(0);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: rotate(315deg) translateX(-1000px);
        opacity: 0;
    }
}

.shooting-stars span:nth-child(1) {
    top: 0;
    right: 0;
    left: initial;
    animation-delay: 0s;
    animation-duration: 1s;
}

.shooting-stars span:nth-child(2) {
    top: 0;
    right: 80px;
    left: initial;
    animation-delay: 0.2s;
    animation-duration: 3s;
}

.shooting-stars span:nth-child(3) {
    top: 80px;
    right: 0px;
    left: initial;
    animation-delay: 0.4s;
    animation-duration: 2s;
}

.shooting-stars span:nth-child(4) {
    top: 300px;
    right: 180px;
    left: initial;
    animation-delay: 0.6s;
    animation-duration: 1.5s;
}

/* UI Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
}

.glow-text {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5), 0 0 20px rgba(59, 130, 246, 0.5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Navbar */
.navbar {
    margin: 1.5rem;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    border-radius: 100px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.nav-content {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.logo .icon {
    font-size: 2rem;
}

.subtitle {
    font-size: 0.9rem;
    color: #94A3B8;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Views (Pages) */
.view {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.view.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Hero */
.hero {
    text-align: center;
    margin: 4rem 0 2rem;
    padding: 6rem 2rem;
    background: url('assets/hero_bg.png') center/cover no-repeat;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30, 41, 59, 0.4); /* Lighter overlay */
    z-index: 0;
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-text h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(255,255,255,0.3);
    animation: float 3s ease-in-out infinite;
}

.hero-text p {
    font-size: 1.2rem;
    color: #94A3B8;
    animation: pulseText 2s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulseText {
    0% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); text-shadow: 0 0 10px var(--secondary); color: white; }
    100% { opacity: 0.8; transform: scale(1); }
}

/* Cards */
.grade-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 20px;
    color: white;
    background: rgba(45, 27, 105, 0.6); /* Dark purple */
    border: 2px solid rgba(139, 92, 246, 0.3); /* Purple border */
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2); /* Glow */
}

.card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.8), inset 0 0 15px rgba(139, 92, 246, 0.5);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(69, 43, 161, 0.8);
}

.card-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.card h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: #CBD5E1;
    font-size: 1.1rem;
    font-weight: 300;
}

/* Notes Section */
.view-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.btn-primary {
    padding: 0.8rem 1.5rem;
    color: white;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: rgba(255,255,255,0.1);
    transform: translateX(-5px);
}

.view-header h2 {
    font-size: 2.5rem;
    color: white;
}

.notes-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    min-height: 600px;
}

.units-sidebar {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.unit-btn {
    width: 100%;
    text-align: left;
    padding: 1rem;
    background: transparent;
    border: 1px solid transparent;
    color: #E2E8F0;
    font-size: 1rem;
    font-family: inherit;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.unit-btn:hover {
    background: rgba(255,255,255,0.05);
}

.unit-btn.active {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2), transparent);
    border-left: 4px solid var(--primary);
    color: white;
    font-weight: bold;
}

.note-content {
    padding: 3rem;
    position: relative;
    overflow-y: auto;
}

.note-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.note-content h4 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: #fff;
}

.note-content p, .note-content ul {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #CBD5E1;
    margin-bottom: 1.5rem;
}

.note-content li {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.note-content strong {
    color: var(--accent);
}

/* Animations loading note */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 900px) {
    .notes-layout {
        grid-template-columns: 1fr;
    }
    .hero-text h2 {
        font-size: 2.2rem;
    }
}
