@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(16, 185, 129, 0.1);
    --accent-green: #059669;
    --accent-blue: #2563eb;
    --text-black: #0f172a;
    --text-slate: #334155;
    --text-dim: #64748b;
    --card-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-light);
    color: var(--text-slate);
    overflow: hidden;
    height: 100vh;
    font-size: 14px;
    /* Default professional size */
}

h1,
h2,
h3,
h4,
.font-outfit {
    font-family: 'Outfit', sans-serif;
    color: var(--text-black);
}

/* Background Mesh - Subtler for professionalism */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-light);
    background-image:
        radial-gradient(at 0% 0%, hsla(160, 100%, 98%, 1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, hsla(210, 100%, 98%, 1) 0px, transparent 50%);
}

.mesh-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-green) 0%, transparent 70%);
    filter: blur(100px);
    opacity: 0.03;
    animation: blob-float 30s infinite alternate;
}

@keyframes blob-float {
    from {
        transform: translate(-2%, -2%) scale(1);
    }

    to {
        transform: translate(2%, 2%) scale(1.05);
    }
}

/* Layout Elements */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    /* More standard radius */
}

.glass-card {
    background: #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.08);
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
    border-radius: 1.25rem;
}

.glass-card:hover {
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.15);
}

/* Sidebar & Navigation */
.active-topic {
    background: rgba(16, 185, 129, 0.05) !important;
    border-left: 3px solid var(--accent-green) !important;
    color: var(--accent-green) !important;
    font-weight: 700 !important;
}

#sidebar-content button {
    font-size: 13px;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
}

/* Animations */
.explanation-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card.explanation-open .explanation-content {
    max-height: 3000px;
    opacity: 1;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(16, 185, 129, 0.05);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
        z-index: 40;
        display: none;
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    aside {
        position: fixed;
        height: calc(100vh - 2rem);
        z-index: 50;
        transform: translateX(-110%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.sidebar-open aside {
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    main {
        padding: 0.75rem !important;
    }

    header {
        padding: 1rem !important;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    header .flex-items-center-gap-5 {
        width: 100%;
        justify-content: space-between;
    }

    .stats-card {
        padding: 1rem !important;
    }
}

/* Input Consistency */
input {
    transition: all 0.2s ease;
}

input:focus {
    border-color: var(--accent-green) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Typography Scale */
.text-h1 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.text-h2 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.text-body {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-small {
    font-size: 0.75rem;
}