/* Global Variables */
:root {
    --bg-gradient: linear-gradient(135deg, #a8c0ff 0%, #3f2b96 100%);
    /* Deep blue fallback */
    --bg-gradient-soft: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
    /* Lavender to Light Blue */

    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-primary: #5a67d8;
    /* Indigo */
    --color-accent: #3182ce;
    /* Blue */

    --card-bg: rgba(255, 255, 255, 0.9);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    --glass-border: 1px solid rgba(255, 255, 255, 0.8);

    --font-main: 'Inter', sans-serif;

    --radius-lg: 30px;
    --radius-md: 12px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-gradient-soft);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center the main app card */
    color: var(--color-text);
    overflow: hidden;
    /* Hide scrollbars for the main body, content scrolls inside card if needed */
    position: relative;
}

/* Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #a0d8ef;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #e4c1f9;
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #ffcfd2;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
    opacity: 0.6;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* Main App Container (The "Card") */
.app-container {
    width: 97%;
    max-width: 100%;
    height: 95vh;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: var(--glass-border);
    position: relative;
}

/* Navbar */
.navbar {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

/* Mobile Button */
.menu-toggle {
    display: none;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 8px;
    padding: 8px 0;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--color-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: rgba(99, 102, 241, 0.05);
    /* Light primary color */
    color: var(--color-primary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

/* Content Area */
.content-wrapper {
    flex: 1;
    overflow-y: auto;
    /* Scroll inside the card */
    padding: 40px;
    position: relative;
}

/* Scrollbar styling */
.content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.content-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}

.content-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Typography Helpers */
h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -1.5px;
    font-weight: 900;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1a202c 0%, #4a5568 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Elements */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Grid Layouts */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    height: 100%;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

/* Mini Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: transform 0.2s, background 0.2s;
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .hero-split {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 20px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-radius: var(--radius-md);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        width: 200px;
        z-index: 1000;
        gap: 15px;
        border: 1px solid rgba(255, 255, 255, 0.5);
    }

    .nav-links.active {
        display: flex;
        animation: slideIn 0.3s ease;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--color-text);
        cursor: pointer;
    }

    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* =========================================
   Course Page Visualizations
   ========================================= */

/* Commons for Visual Containers */
.course-visual-container {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

/* --- Vedic Maths Animation (Floating Symbols) --- */
.vedic-symbol {
    position: absolute;
    color: var(--color-primary);
    opacity: 0.8;
    font-size: 1.5rem;
    font-weight: bold;
    animation: floatUp 8s linear infinite;
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    user-select: none;
}

@keyframes floatUp {
    0% {
        transform: translateY(150px) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-150px) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* --- Mid Brain Animation (Neural Pulse) --- */
.brain-core {
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    /* Pink/Purple */
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 50px var(--color-accent);
    animation: brainPulse 3s ease-in-out infinite;
    z-index: 10;
}

.brain-ring {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 4s linear infinite;
}

.brain-ring:nth-child(1) {
    width: 100px;
    height: 100px;
    animation-delay: 0s;
    border-color: rgba(99, 102, 241, 0.4);
}

.brain-ring:nth-child(2) {
    width: 160px;
    height: 160px;
    animation-delay: 1s;
    border-color: rgba(236, 72, 153, 0.4);
}

.brain-ring:nth-child(3) {
    width: 220px;
    height: 220px;
    animation-delay: 2s;
    border-color: rgba(99, 102, 241, 0.2);
}

@keyframes brainPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px var(--color-accent);
    }

    50% {
        transform: scale(1.2);
        box-shadow: 0 0 60px var(--color-accent), 0 0 100px var(--color-primary);
    }
}

@keyframes ripple {
    0% {
        border-width: 4px;
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }

    100% {
        border-width: 0px;
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Footer */
.copyright-footer {
    text-align: center;
    padding: 15px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.3);
    margin-top: auto;
}