:root {
    --ink: #172033;
    --muted: #5d6678;
    --line: #dfe5ee;
    --soft: #f5f7fb;
    --white: #ffffff;
    --red: #cf1f2f;
    --red-dark: #a81624;
    --gold: #f4b545;
    --navy: #192a56;
    --shadow: 0 18px 48px rgba(23, 32, 51, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Outfit, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    display: block;
    max-width: 100%;
}

.page-shell {
    overflow: hidden;
}

.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 24px clamp(18px, 4vw, 56px) 48px;
    color: var(--white);
    background: #101829;
}

.hero-background-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center 34%;
    transform: scaleX(1.72) scaleY(0.82) translateY(-5%);
    transform-origin: center center;
    background: #101829;
}

.hero-video-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(8, 13, 24, 0.28) 0%, rgba(8, 13, 24, 0.04) 34%, rgba(8, 13, 24, 0.12) 100%);
}

.sound-toggle {
    min-height: 44px;
    padding: 0 16px;
    color: var(--white);
    background: #274785;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(25, 42, 86, 0.24);
}

.sound-toggle:hover {
    background: #1d376d;
}

.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    max-width: 1240px;
    margin: 0 auto;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 240px;
}

.brand-image-wrap {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.08);
}

.brand-image {
    width: 50px;
    height: auto;
}

.brand-title,
.brand-subtitle {
    display: block;
}

.brand-title {
    font-family: "Space Grotesk", Outfit, sans-serif;
    font-size: 1.35rem;
    line-height: 1;
}

.brand-subtitle {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9rem;
}

.exam-countdown {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.countdown-item {
    display: grid;
    min-height: 88px;
    align-content: center;
    justify-items: center;
    padding: 12px 10px;
    color: var(--white);
    background: rgba(16, 24, 41, 0.68);
    border: 1px solid rgba(244, 181, 69, 0.34);
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(16, 24, 41, 0.22);
    text-align: center;
}

.countdown-item strong {
    color: var(--gold);
    font-family: "Space Grotesk", Outfit, sans-serif;
    font-size: clamp(2.05rem, 2.6vw, 2.75rem);
    line-height: 1;
}

.countdown-item small {
    margin-top: 7px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.15;
}

.hero-menu-panel {
    position: absolute;
    z-index: 2;
    top: clamp(128px, 18vh, 220px);
    display: grid;
    width: min(230px, 16vw);
    gap: 10px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 800;
}

.hero-menu-left {
    left: clamp(18px, 5vw, 86px);
}

.hero-menu-right {
    right: clamp(18px, 5vw, 86px);
}

.hero-menu-panel a,
.hero-menu-panel button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    color: var(--white);
    background: rgba(25, 42, 86, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(25, 42, 86, 0.22);
    text-align: center;
}

.hero-menu-panel a:hover,
.hero-menu-panel button:hover {
    color: var(--white);
    background: #274785;
}

.hero-menu-panel .side-cta {
    color: var(--white);
    background: #274785;
}

.hero-menu-panel .system-link {
    color: #101829;
    background: var(--gold);
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: 0 12px 26px rgba(244, 181, 69, 0.22);
}

.hero-menu-panel .exam-cta {
    background: var(--red);
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: 0 12px 26px rgba(207, 31, 47, 0.25);
}

.hero-menu-panel .tumdersler-menu-link {
    color: #172033;
    background: linear-gradient(135deg, #b8ec4f, #ffffff);
    border-color: rgba(255, 255, 255, 0.46);
    box-shadow: 0 14px 30px rgba(184, 236, 79, 0.24);
}

.hero-menu-panel .side-cta:hover {
    color: var(--white);
    background: #1d376d;
}

.hero-menu-panel .system-link:hover {
    color: #101829;
    background: #ffd15f;
}

.hero-menu-panel .exam-cta:hover {
    background: var(--red-dark);
}

.hero-menu-panel .tumdersler-menu-link:hover {
    color: #172033;
    background: linear-gradient(135deg, #cdf86a, #ffffff);
}

.hero-menu-panel .contact-mail {
    min-height: auto;
    padding: 10px 12px;
    overflow-wrap: anywhere;
    color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.92rem;
    line-height: 1.25;
}

.hero-date-time {
    grid-column: 1 / -1;
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 900;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    max-width: 780px;
    font-family: "Space Grotesk", Outfit, sans-serif;
    font-size: clamp(2.35rem, 4.8vw, 4.55rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero-copy p,
.section-head p,
.program-card p,
.lesson-card p,
.instagram-card p,
.cta-panel p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-copy p {
    color: rgba(255, 255, 255, 0.86);
    max-width: 760px;
    margin: 20px 0 0;
}

.branch-pill-row,
.hero-actions,
.stats-grid {
    display: flex;
    flex-wrap: wrap;
}

.branch-pill-row {
    gap: 10px;
    margin-top: 20px;
}

.branch-pill {
    padding: 9px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.05);
}

.hero-actions {
    gap: 12px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 8px;
    font-weight: 800;
}

.button.primary {
    color: var(--white);
    background: var(--red);
    box-shadow: 0 14px 28px rgba(207, 31, 47, 0.24);
}

.button.secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.button.light {
    color: var(--red);
    background: var(--white);
    border: 1px solid rgba(207, 31, 47, 0.18);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 12px;
    max-width: 720px;
    margin-top: 26px;
}

.stat-card {
    min-height: 92px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
}

.stat-card strong,
.stat-card span {
    display: block;
}

.stat-card strong {
    color: var(--gold);
    font-family: "Space Grotesk", Outfit, sans-serif;
    font-size: 1.45rem;
}

.stat-card span {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.section {
    padding: 86px clamp(18px, 4vw, 56px);
    background: var(--white);
}

.section.alt {
    background: #f7f9fc;
}

.section-head {
    max-width: 820px;
    margin: 0 auto 32px;
    text-align: center;
}

.section-head h2,
.cta-panel h2 {
    margin: 0;
    font-family: "Space Grotesk", Outfit, sans-serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.section-head p {
    margin: 16px auto 0;
    max-width: 680px;
}

.program-grid,
.lessons-grid,
.instagram-grid {
    display: grid;
    max-width: 1240px;
    margin: 0 auto;
    gap: 18px;
}

.program-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.video-lessons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lesson-directory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.instagram-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lessons-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.program-card,
.lesson-card,
.lesson-video-card,
.lesson-directory-card,
.instagram-card,
.cta-panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(23, 32, 51, 0.07);
}

.program-card,
.lesson-card,
.lesson-video-card,
.lesson-directory-card,
.instagram-card {
    min-height: 100%;
    padding: 24px;
}

.lesson-video-card {
    display: grid;
    align-content: start;
    gap: 14px;
    background:
        linear-gradient(135deg, rgba(207, 31, 47, 0.08), rgba(25, 42, 86, 0.09)),
        var(--white);
}

.lesson-directory-card {
    display: grid;
    align-content: start;
    gap: 16px;
    background:
        linear-gradient(135deg, rgba(207, 31, 47, 0.08), rgba(25, 42, 86, 0.08)),
        var(--white);
}

.system-card {
    display: grid;
    align-content: start;
    gap: 16px;
    background:
        linear-gradient(135deg, rgba(244, 181, 69, 0.18), rgba(25, 42, 86, 0.08)),
        var(--white);
}

.system-card .button {
    width: 100%;
    margin-top: auto;
}

.private-lesson-card {
    background:
        linear-gradient(135deg, rgba(207, 31, 47, 0.12), rgba(25, 42, 86, 0.08)),
        var(--white);
}

.lesson-directory-card h3 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.lesson-link-list {
    display: grid;
    gap: 10px;
}

.lesson-link-row {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(25, 42, 86, 0.12);
    border-radius: 8px;
    font-weight: 900;
}

.lesson-link-row:hover,
.exam-year-link:hover {
    color: var(--white);
    background: var(--red);
    border-color: var(--red);
}

.lesson-link-row small {
    color: var(--red);
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.lesson-link-row:hover small {
    color: var(--white);
}

.past-exams-card {
    grid-column: 1 / -1;
}

.exam-year-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.exam-year-link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(25, 42, 86, 0.12);
    border-radius: 8px;
    font-weight: 900;
}

.game-section {
    background:
        radial-gradient(circle at top left, rgba(244, 181, 69, 0.16), transparent 34%),
        linear-gradient(135deg, #101829, #192a56 58%, #cf1f2f);
    color: var(--white);
}

.game-section .section-head p {
    color: rgba(255, 255, 255, 0.78);
}

.game-shell {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 18px;
    max-width: 1240px;
    margin: 0 auto;
    align-items: stretch;
}

.game-info-panel,
.game-board-wrap {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: 0 18px 52px rgba(4, 8, 18, 0.28);
}

.game-info-panel {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.1);
}

.game-info-panel .card-tag {
    margin-bottom: 0;
    color: var(--gold);
    background: rgba(244, 181, 69, 0.14);
}

.game-info-panel h3,
.game-info-panel p {
    margin: 0;
}

.game-info-panel h3 {
    font-family: "Space Grotesk", Outfit, sans-serif;
    font-size: 1.8rem;
    line-height: 1.08;
}

.game-info-panel p {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    line-height: 1.55;
}

.game-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.game-stat-grid span {
    display: grid;
    min-height: 76px;
    align-content: center;
    justify-items: center;
    padding: 10px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(16, 24, 41, 0.72);
    border: 1px solid rgba(244, 181, 69, 0.26);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

.game-stat-grid strong {
    color: var(--gold);
    font-family: "Space Grotesk", Outfit, sans-serif;
    font-size: 1.8rem;
    line-height: 1;
}

.game-board-wrap {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.game-board {
    width: 100%;
    height: auto;
    overflow: hidden;
    background: #101829;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
}

.game-question {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    width: min(460px, calc(100% - 32px));
    gap: 12px;
    padding: 20px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(4, 8, 18, 0.38);
    transform: translate(-50%, -50%);
}

.game-question[hidden] {
    display: none;
}

.game-question strong {
    color: var(--red);
    font-size: 0.92rem;
}

.game-question p {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.35;
}

.game-question div {
    display: grid;
    gap: 8px;
}

.game-question button,
.game-touch-controls button {
    min-height: 44px;
    color: var(--white);
    background: #192a56;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.game-question button:hover,
.game-touch-controls button:hover {
    background: var(--red);
}

.game-touch-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.exam-news-card {
    background:
        linear-gradient(135deg, rgba(207, 31, 47, 0.08), rgba(244, 181, 69, 0.12)),
        var(--white);
}

.exam-news-card h3 {
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.ai-coach-card {
    grid-column: span 2;
    background:
        linear-gradient(135deg, rgba(38, 76, 154, 0.08), rgba(42, 167, 107, 0.12)),
        var(--white);
}

.ai-coach-card h3 {
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.ai-coach-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.ai-coach-form label {
    display: grid;
    gap: 7px;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 800;
}

.ai-coach-form select,
.ai-coach-form input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
}

.ai-control-grid,
.ai-net-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ai-coach-result {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(38, 76, 154, 0.16);
    border-radius: 8px;
    font-weight: 700;
}

.ai-coach-result strong {
    color: var(--ink);
}

.ai-coach-result ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}

.ai-coach-result li {
    line-height: 1.45;
}

.ai-result-block {
    display: grid;
    gap: 8px;
    padding-top: 6px;
}

.ai-result-block span {
    color: var(--red);
    font-weight: 900;
}

.ai-coach-result em {
    color: var(--ink);
    font-style: normal;
    font-weight: 900;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.exam-qr-block {
    display: grid;
    max-width: 220px;
    justify-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(207, 31, 47, 0.14);
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.exam-qr-block img {
    width: 100%;
    max-width: 176px;
    height: auto;
    background: var(--white);
    border-radius: 6px;
}

.card-tag,
.lesson-meta,
.instagram-chip {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 7px 10px;
    color: var(--red);
    background: rgba(207, 31, 47, 0.08);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.program-card h3,
.lesson-card h3,
.lesson-video-card h3,
.instagram-card h3 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.card-link,
.instagram-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--red);
    font-weight: 800;
}

.news-video {
    width: 100%;
    margin-top: 16px;
    overflow: hidden;
    background: #101829;
    border: 1px solid var(--line);
    border-radius: 8px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-image {
    width: 100%;
    max-height: 520px;
    margin: 0 0 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: contain;
    background: #101829;
}

.branch-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.branch-list li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
    font-weight: 700;
}

.branch-list li::before {
    position: absolute;
    top: 9px;
    left: 0;
    width: 8px;
    height: 8px;
    content: "";
    background: var(--gold);
    border-radius: 50%;
}

.instagram-card strong {
    display: block;
    margin-top: 10px;
    color: var(--red);
}

.cta-panel {
    display: flex;
    max-width: 1240px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 52px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84)),
        linear-gradient(120deg, rgba(207, 31, 47, 0.12), rgba(244, 181, 69, 0.16));
}

.cta-panel p {
    max-width: 720px;
}

.site-footer {
    display: flex;
    min-height: 104px;
    align-items: center;
    justify-content: center;
    padding: 22px clamp(18px, 4vw, 56px);
    color: rgba(255, 255, 255, 0.9);
    background: #101829;
    text-align: center;
}

.site-footer p {
    width: 100%;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
}

.handwritten-footer {
    min-height: 56px;
    color: var(--gold);
    font-family: "Dancing Script", "Brush Script MT", cursive;
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.2;
    text-shadow: 0 8px 24px rgba(244, 181, 69, 0.18);
}

.handwritten-footer::after {
    display: inline-block;
    width: 2px;
    height: 0.9em;
    margin-left: 4px;
    content: "";
    background: currentColor;
    border-radius: 2px;
    transform: translateY(4px);
    animation: cursorBlink 0.8s steps(2, start) infinite;
}

.quick-apply-widget {
    position: fixed;
    left: calc(50% - 108px);
    bottom: 22px;
    z-index: 20;
    display: grid;
        justify-items: start;
    gap: 12px;
}

.quick-apply-toggle {
    min-height: 54px;
    padding: 0 20px;
    color: var(--white);
    background: var(--red);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(207, 31, 47, 0.34);
}

.quick-apply-panel {
    display: none;
    width: min(360px, calc(100vw - 32px));
    gap: 12px;
    padding: 18px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(16, 24, 41, 0.26);
}

.quick-apply-widget.is-open .quick-apply-panel {
    display: grid;
}

.quick-apply-panel strong {
    font-size: 1.15rem;
}

.quick-apply-panel label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 900;
}

.quick-apply-panel input,
.quick-apply-panel select,
.quick-apply-panel textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
}

.quick-apply-panel textarea {
    resize: vertical;
}

.memory-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(207, 31, 47, 0.2), transparent 32%),
        linear-gradient(135deg, #101829, #192a56 58%, #cf1f2f);
}

.memory-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 54px;
}

.memory-hero {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    color: var(--white);
}

.memory-back {
    display: inline-flex;
    width: fit-content;
    min-height: 44px;
    align-items: center;
    padding: 10px 14px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    font-weight: 900;
}

.memory-hero h1 {
    margin: 0;
    font-family: "Space Grotesk", Outfit, sans-serif;
    font-size: clamp(2.35rem, 6vw, 5rem);
    line-height: 0.98;
}

.memory-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.6;
}

.memory-studio {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.memory-controls,
.memory-preview-wrap {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    box-shadow: 0 26px 70px rgba(16, 24, 41, 0.28);
}

.memory-controls {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.memory-upload {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-weight: 900;
}

.memory-upload input {
    width: 100%;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

.memory-camera {
    width: 100%;
    overflow: hidden;
    background: #101829;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.memory-preview-wrap {
    padding: 18px;
}

.memory-canvas {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(16, 24, 41, 0.16);
}

@keyframes cursorBlink {
    50% {
        opacity: 0;
    }
}

@media (max-width: 980px) {
    .topbar,
    .cta-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        display: grid;
        gap: 16px;
    }

    .hero-menu-panel {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-menu-left {
        margin-top: clamp(220px, 36vh, 420px);
    }

    .stats-grid,
    .program-grid,
    .video-lessons-grid,
    .lesson-directory,
    .game-shell,
    .lessons-grid,
    .instagram-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-coach-card {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: 100svh;
        padding-top: 18px;
        padding-bottom: 34px;
    }

    .hero-background-video {
        width: 100%;
        height: 100%;
        transform: scaleX(1.28) scaleY(0.9) translateY(-3%);
    }

    .sound-toggle {
        width: auto;
    }

    .brand-lockup {
        min-width: 0;
    }

    .exam-countdown {
        grid-template-columns: 1fr;
    }

    .hero-menu-panel {
        grid-template-columns: 1fr;
    }

    .hero-menu-left {
        margin-top: clamp(160px, 30vh, 280px);
    }

    .hero-copy h1 {
        font-size: 2.25rem;
        line-height: 1.08;
    }

    .hero-copy p {
        font-size: 0.98rem;
        line-height: 1.62;
    }

    .hero-actions .button,
    .cta-panel .button {
        width: 100%;
    }

    .stats-grid,
    .program-grid,
    .video-lessons-grid,
    .lesson-directory,
    .game-shell,
    .lessons-grid,
    .instagram-grid {
        grid-template-columns: 1fr;
    }

    .past-exams-card {
        grid-column: auto;
    }

    .exam-year-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lesson-link-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .ai-coach-card {
        grid-column: auto;
    }

    .ai-control-grid,
    .ai-net-grid {
        grid-template-columns: 1fr;
    }

    .game-touch-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-apply-widget {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }
    #cp-chat-widget {
        left: auto;
        right: 12px;
        bottom: 78px;
    }

    .quick-apply-toggle,
    .quick-apply-panel {
        width: 100%;
    }

    .memory-studio {
        grid-template-columns: 1fr;
    }
}
