:root {
    --learning-bg: #f3f6fb;
    --learning-dark: #0f172a;
    --learning-primary: #4f46e5;
    --learning-muted: #64748b;
    --learning-border: #e5e7eb;
}

html {
    scrollbar-gutter: stable;
}

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;
    }
}

.lesson-page {
    padding-top: 10px;
}

.lesson-hero {
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.18), 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);
}

.lesson-hero-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.lesson-hero-icon {
    width: 86px;
    height: 86px;
    border-radius: 28px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    flex: 0 0 86px;
    box-shadow: 0 18px 35px rgba(79, 70, 229, 0.28);
}

.lesson-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
    font-weight: 900;
    margin-bottom: 14px;
    color: #0f172a;
}

.lesson-hero p {
    max-width: 820px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 0;
}

.lesson-content {
    max-width: 980px;
    margin: 0 auto;
}

.lesson-block,
.explain-box,
.important-box,
.code-card,
.image-box,
.quiz-box,
.connect-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.lesson-block h2,
.quiz-box h2,
.connect-box h2 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 14px;
}

.lesson-block p,
.explain-box p,
.important-box p,
.quiz-box li,
.connect-box p {
    color: #475569;
    font-size: 17px;
    line-height: 1.8;
}

.intro-block {
    border-left: 7px solid #4f46e5;
}

.explain-box {
    display: flex;
    gap: 18px;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.explain-box-icon {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: #4f46e5;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex: 0 0 52px;
}

.explain-box h3 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 8px;
}

.important-box {
    background: #fffbeb;
    border-color: #fde68a;
}

.important-box h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #92400e;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
}

.important-box p {
    color: #78350f;
}

.nice-list {
    padding-left: 0;
    list-style: none;
    margin-bottom: 0;
}

.nice-list li {
    position: relative;
    padding-left: 34px;
    margin-bottom: 10px;
    color: #475569;
    font-size: 17px;
    line-height: 1.7;
}

.nice-list li::before {
    content: "\F26E";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: 1px;
    color: #16a34a;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.step-item {
    display: flex;
    gap: 16px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
}

.step-number {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: #4f46e5;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.step-item h3 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 4px;
}

.step-item p {
    margin-bottom: 0;
    color: #64748b;
    line-height: 1.6;
}

.code-card {
    background: #0f172a;
    border-color: #1e293b;
    color: #ffffff;
    padding: 0;
    overflow: hidden;
}

.code-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px 26px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.code-card-header h3 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 6px;
}

.code-card-header p {
    color: #94a3b8;
    margin-bottom: 0;
    line-height: 1.6;
}

.copy-code-btn {
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: #ffffff;
    border-radius: 999px;
    padding: 8px 13px;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
}

.copy-code-btn:hover {
    background: rgba(255,255,255,0.14);
}

.code-card pre {
    margin: 0;
    padding: 26px;
    overflow-x: auto;
}

.code-card code {
    color: #e5e7eb;
    font-size: 15px;
    line-height: 1.7;
}

.image-placeholder {
    min-height: 220px;
    border: 2px dashed #cbd5e1;
    border-radius: 22px;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 24px;
}

.image-placeholder i {
    font-size: 42px;
    color: #4f46e5;
}

.image-caption {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 12px;
}

.quiz-box {
    background: #f8fafc;
}

.quiz-box ol {
    margin-bottom: 0;
}

.quiz-box li {
    margin-bottom: 8px;
}

.connect-box {
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 32%),
        #ffffff;
    border-color: #bae6fd;
}

@media (max-width: 575px) {
    .lesson-hero {
        padding: 26px;
        border-radius: 24px;
    }

    .lesson-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .lesson-hero-icon {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
        font-size: 34px;
    }

    .lesson-block,
    .explain-box,
    .important-box,
    .code-card,
    .image-box,
    .quiz-box,
    .connect-box {
        padding: 22px;
        border-radius: 22px;
    }

    .code-card {
        padding: 0;
    }

    .code-card-header {
        flex-direction: column;
    }

    .explain-box {
        flex-direction: column;
    }
}

.lesson-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 22px;
    border: 1px solid #e5e7eb;
}

/* =========================================================
   Tudástér előválasztó oldal
========================================================= */

.knowledge-area-badge {
    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;
}

.knowledge-area-grid {
    margin-top: 26px;
}

.knowledge-area-box {
    min-height: 280px;
}

.knowledge-area-box.disabled {
    opacity: 0.55;
    pointer-events: none;
}

.knowledge-area-box.disabled .topic-box-footer {
    color: #94a3b8;
}


.learning-logo-icon-space {
    position: relative;
    overflow: hidden;
}

.learning-logo-space-svg {
    width: 50px;
    height: 50px;
    display: block;
    overflow: visible;
    transform: translateZ(0);
}

.space-dot {
    fill: rgba(255,255,255,0.9);
    transform-box: fill-box;
    transform-origin: center;
    animation-name: logoTwinkle;
    animation-duration: 4s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-delay: var(--logo-phase-4s, 0s);
}

.dot-2 {
    animation-duration: 5.3s;
    animation-delay: var(--logo-phase-53s, 0s);
}

.dot-3 {
    animation-duration: 4.7s;
    animation-delay: var(--logo-phase-47s, 0s);
}

.dot-4 {
    animation-duration: 6.1s;
    animation-delay: var(--logo-phase-61s, 0s);
}

.space-orbit {
    fill: none;
    stroke: rgba(255,255,255,0.48);
    stroke-width: 1.1;
    stroke-linecap: round;
    stroke-dasharray: 3 5;
}

.orbit-b {
    stroke: rgba(185,230,255,0.65);
}

.space-orbit-wrap {
    transform-origin: center;
    animation-name: logoOrbit;
    animation-duration: 18s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-delay: var(--logo-phase-18s, 0s);
}

.space-star-main {
    fill: rgba(255,255,255,0.96);
    transform-box: fill-box;
    transform-origin: center;
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.55));
    animation-name: logoStarDrift;
    animation-duration: 7s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-delay: var(--logo-phase-7s, 0s);
}

.space-comet-wrap {
    transform-origin: center;
    animation-name: logoCometOrbit;
    animation-duration: 9s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-delay: var(--logo-phase-9s, 0s);
}

.space-comet {
    fill: rgba(255,255,255,0.95);
    filter: drop-shadow(0 0 7px rgba(180,235,255,0.9));
}

@keyframes logoTwinkle {
    0%, 100% {
        opacity: 0.35;
        transform: scale(0.75);
    }

    45% {
        opacity: 1;
        transform: scale(1.25);
    }
}

@keyframes logoOrbit {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes logoStarDrift {
    0%, 100% {
        transform: rotate(-4deg) scale(0.96);
    }

    50% {
        transform: rotate(7deg) scale(1.04);
    }
}

@keyframes logoCometOrbit {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .learning-logo-space-svg * {
        animation: none !important;
    }
}

.space-orbit-wrap,
.space-comet-wrap,
.space-star-main,
.space-dot {
    will-change: transform, opacity;
}