/* =========================================
   Biochemistry Practice - Unified Style (HSM Design)
   Theme: Indigo/Pink/Teal (Biochem)
   ========================================= */

:root {
    --primary-color: #818cf8;
    /* Indigo 400 */
    --secondary-color: #ec4899;
    /* Pink 500 */
    --accent-color: #00d4aa;
    /* Teal */
    --bg-dark: #0f172a;
    /* Slate 900 */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-hover: rgba(51, 65, 85, 0.5);
    --success: #22c55e;
    --error: #ef4444;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Ambient Glow */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(129, 140, 248, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.12) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* Glass Components */
.glass-nav {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(129, 140, 248, 0.3);
}

/* Navbar */
.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-main);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 8rem 1.5rem 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-symbols span {
    position: absolute;
    font-size: 2.5rem;
    opacity: 0.2;
    animation: float 20s infinite linear;
    z-index: -1;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-20vh) rotate(360deg);
        opacity: 0;
    }
}

.badge-pulse {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(236, 72, 153, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4);
    animation: pulse-pink 2s infinite;
}

@keyframes pulse-pink {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(236, 72, 153, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(236, 72, 153, 0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #db2777);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--secondary-color);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Features Section */
.section {
    padding: 6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.tag-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.tag-blue {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Subject & Topic Cards */
.subject-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.subject-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.subject-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.topic-grid-container {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    animation: slide-down 0.3s ease;
}

.topic-grid-container.open {
    display: grid;
}

.topic-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    overflow: hidden;
}

.topic-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.topic-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.topic-btn:hover::after {
    width: 100%;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Quiz UI */
.quiz-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    padding: 1.5rem;
}

.quiz-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.quiz-container {
    width: 100%;
    max-width: 800px;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.quiz-header {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    width: 100%;
}

.progress-fill {
    height: 100%;
    background: var(--secondary-color);
    width: 0%;
    transition: width 0.3s;
}

.question-area {
    padding: 2.5rem;
}

.option-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
    text-align: left;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.option-btn.correct {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
}

.option-btn.correct .option-letter {
    background: var(--success);
    color: white;
}

.option-btn.wrong {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

.option-btn.wrong .option-letter {
    background: var(--error);
    color: white;
}

/* Score Circle */
.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto 2rem;
}

/* Footer */
footer {
    background: #0f172a;
    border-top: 1px solid var(--glass-border);
    padding: 4rem 1.5rem 2rem;
    text-align: center;
    margin-top: 4rem;
}

.footer-links a,
.footer-network a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 0.75rem;
    font-size: 0.9rem;
    transition: 0.2s;
}

.footer-links a:hover,
.footer-network a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: #0f172a;
        padding: 2rem;
        flex-direction: column;
        border-bottom: 1px solid var(--glass-border);
        transform: translateY(-150%);
        transition: 0.3s;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .menu-toggle {
        display: flex;
    }

    .stats-bar {
        gap: 1.5rem;
    }

    .stat-item {
        flex: 1 1 40%;
    }
}