:root {
    --bg: #f4f7fb;
    --sidebar: #0f172a;
    --sidebar-soft: #1e293b;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --text: #0f172a;
    --muted: #64748b;
    --card: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.15), transparent 35%),
        radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.12), transparent 30%),
        var(--bg);
    color: var(--text);
}

.mobile-topbar {
    display: none;
}

.overlay {
    display: none;
}

.app {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #0f172a, #111827);
    color: white;
    padding: 28px 22px;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 12px 0 40px rgba(15, 23, 42, 0.15);
    z-index: 1000;
}

.brand {
    margin-bottom: 36px;
}

.brand-badge {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 14px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.brand h1 {
    font-size: 21px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.brand p {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
}

.course-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-btn {
    width: 100%;
    border: none;
    background: transparent;
    color: #dbeafe;
    text-align: left;
    padding: 14px 16px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    transition: all 0.25s ease;
}

.course-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.course-btn.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.course-icon {
    font-size: 22px;
}

.sidebar-footer {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 24px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.5;
}

.main {
    padding: 42px;
    min-width: 0;
}

.hero {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius);
    padding: 34px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero h2 {
    font-size: clamp(28px, 5vw, 48px);
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 16px;
}

.hero p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    max-width: 820px;
}

.course-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.course-title-block h3 {
    font-size: 30px;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
}

.course-title-block p {
    color: var(--muted);
    line-height: 1.6;
    max-width: 760px;
}

.activity-count {
    padding: 10px 15px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.catalogue {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.activity-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.activity-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.activity-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.13);
}

.activity-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.activity-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    flex-shrink: 0;
}

.activity-card h4 {
    font-size: 22px;
    margin-bottom: 7px;
    letter-spacing: -0.02em;
}

.activity-subtitle {
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 14px;
}

.activity-description {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 18px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.meta span {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: #475569;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 13px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.tag {
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: white;
    padding: 13px 16px;
    border-radius: 16px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.open-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.empty-state {
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 42px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-state .empty-icon {
    font-size: 42px;
    margin-bottom: 14px;
}

.empty-state h4 {
    font-size: 22px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    line-height: 1.6;
}

.fade-in {
    animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .app {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .main {
        padding: 30px;
    }

    .hero {
        padding: 28px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 14px;
        position: sticky;
        top: 0;
        z-index: 900;
        height: 68px;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
        border: none;
        border-radius: 14px;
        background: #0f172a;
        color: white;
        font-size: 22px;
        cursor: pointer;
    }

    .mobile-title {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .mobile-title strong {
        font-size: 15px;
    }

    .mobile-title span {
        font-size: 13px;
        color: var(--muted);
    }

    .overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 950;
    }

    .overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

    .app {
        display: block;
        min-height: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(82vw, 320px);
        height: 100vh;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-footer {
        position: static;
        margin-top: 28px;
    }

    .main {
        padding: 20px 16px 32px;
    }

    .hero {
        padding: 24px;
        border-radius: 22px;
        margin-bottom: 24px;
    }

    .hero h2 {
        font-size: 31px;
    }

    .hero p {
        font-size: 15.5px;
    }

    .course-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .course-title-block h3 {
        font-size: 26px;
    }

    .activity-count {
        font-size: 13px;
    }

    .catalogue {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .activity-card {
        padding: 22px;
        border-radius: 22px;
    }

    .activity-top {
        align-items: flex-start;
    }

    .activity-card h4 {
        font-size: 20px;
    }

    .empty-state {
        padding: 30px 22px;
    }
}

/* Small phones */
@media (max-width: 420px) {
    .main {
        padding: 16px 12px 28px;
    }

    .hero {
        padding: 20px;
    }

    .hero-label {
        font-size: 12px;
    }

    .hero h2 {
        font-size: 27px;
    }

    .activity-card {
        padding: 20px;
    }

    .activity-icon {
        width: 46px;
        height: 46px;
        font-size: 22px;
    }

    .meta span,
    .tag {
        font-size: 12px;
    }
}