:root {
    --learning-bg: #f3f6fb;
    --learning-dark: #0f172a;
    --learning-primary: #4f46e5;
    --learning-muted: #64748b;
    --learning-border: #e5e7eb;
}

body {
    margin: 0;
    background: var(--learning-bg);
    color: var(--learning-dark);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.learning-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.learning-header {
    background: #ffffff;
    border-bottom: 1px solid var(--learning-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.learning-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--learning-dark);
}

.learning-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.learning-logo-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
}

.learning-logo-subtitle {
    font-size: 13px;
    color: var(--learning-muted);
}

.learning-nav-link {
    color: #334155;
    font-weight: 600;
    text-decoration: none;
}

.learning-nav-link:hover {
    color: var(--learning-primary);
}

.learning-main {
    flex: 1;
}

.learning-footer {
    background: #ffffff;
    border-top: 1px solid var(--learning-border);
}

.topics-page {
    padding-top: 10px;
}

.topics-hero {
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.22), transparent 32%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    padding: 36px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.topics-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 16px;
}

.topics-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 900;
    margin-bottom: 16px;
    color: #0f172a;
}

.topics-hero p {
    max-width: 760px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 0;
}

.topics-hero-box {
    background: #0f172a;
    color: #ffffff;
    border-radius: 26px;
    padding: 28px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.22);
}

.topics-hero-number {
    font-size: 58px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
}

.topics-hero-text {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 600;
}

.topic-box {
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

.topic-box::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #eef2ff;
    transition: 0.2s ease;
}

.topic-box:hover {
    transform: translateY(-5px);
    color: #0f172a;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
    border-color: #c7d2fe;
}

.topic-box:hover::after {
    transform: scale(1.18);
    background: #e0e7ff;
}

.topic-box-icon {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    box-shadow: 0 18px 35px rgba(79, 70, 229, 0.28);
}

.topic-box-content {
    position: relative;
    z-index: 2;
    flex: 1;
}

.topic-box h2 {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 12px;
}

.topic-box p {
    color: #64748b;
    line-height: 1.65;
    font-size: 15px;
    margin-bottom: 0;
}

.topic-box-footer {
    position: relative;
    z-index: 2;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #4f46e5;
    font-weight: 850;
}

.topic-box-footer i {
    transition: 0.2s ease;
}

.topic-box:hover .topic-box-footer i {
    transform: translateX(4px);
}

@media (max-width: 575px) {
    .topics-hero {
        padding: 26px;
        border-radius: 24px;
    }

    .topics-hero p {
        font-size: 16px;
    }

    .topic-box {
        min-height: auto;
        padding: 22px;
    }

    .topic-box-icon {
        width: 62px;
        height: 62px;
        font-size: 29px;
        border-radius: 20px;
    }
}

.topic-detail-page {
    padding-top: 10px;
}

.topic-detail-hero {
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 32%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    padding: 36px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.topic-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 18px;
}

.topic-back-link:hover {
    color: #4f46e5;
}

.topic-detail-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 900;
    margin-bottom: 16px;
    color: #0f172a;
}

.topic-detail-hero p {
    max-width: 760px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 0;
}

.topic-detail-icon-box {
    background: #0f172a;
    color: #ffffff;
    border-radius: 30px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 86px;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.22);
}

.section-title h2 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 4px;
}

.section-title p {
    color: #64748b;
    margin-bottom: 0;
}

.subtopic-box {
    height: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease;
}

.subtopic-box:hover {
    transform: translateY(-4px);
    color: #0f172a;
    border-color: #c7d2fe;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.13);
}

.subtopic-box-icon {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 20px;
}

.subtopic-box-content {
    flex: 1;
}

.subtopic-box h3 {
    font-size: 21px;
    line-height: 1.25;
    font-weight: 900;
    margin-bottom: 10px;
}

.subtopic-box p {
    color: #64748b;
    line-height: 1.65;
    font-size: 15px;
    margin-bottom: 0;
}

.subtopic-box-footer {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #4f46e5;
    font-weight: 850;
}

.subtopic-box-footer i {
    transition: 0.2s ease;
}

.subtopic-box:hover .subtopic-box-footer i {
    transform: translateX(4px);
}

@media (max-width: 575px) {
    .topic-detail-hero {
        padding: 26px;
        border-radius: 24px;
    }

    .topic-detail-hero p {
        font-size: 16px;
    }

    .topic-detail-icon-box {
        min-height: 150px;
        font-size: 60px;
    }

    .subtopic-box {
        min-height: auto;
    }
}