:root {
    --bg: #fff9f1;
    --bg-soft: #fff1dd;
    --surface: #ffffff;
    --text: #24324a;
    --muted: #5e6b82;
    --line: rgba(36, 50, 74, 0.1);
    --peach: #ffad66;
    --orange: #ff8a5b;
    --yellow: #ffd46a;
    --blue: #75c8ff;
    --mint: #82ddb8;
    --pink: #ff9dc1;
    --shadow: 0 22px 50px rgba(255, 138, 91, 0.18);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --font-display: "Trebuchet MS", "Avenir Next Rounded", "Segoe UI", sans-serif;
    --font-body: "Trebuchet MS", "Gill Sans", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: var(--font-body);
    background:
        radial-gradient(circle at top left, rgba(255, 212, 106, 0.4), transparent 30%),
        radial-gradient(circle at top right, rgba(117, 200, 255, 0.35), transparent 28%),
        linear-gradient(180deg, #fffaf4 0%, #fff1de 100%);
}

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

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

.site-shell {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.sky {
    position: fixed;
    z-index: 0;
    width: 380px;
    height: 380px;
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.55;
    pointer-events: none;
}

.sky-left {
    top: -120px;
    left: -140px;
    background: radial-gradient(circle, rgba(255, 212, 106, 0.8) 0%, rgba(255, 212, 106, 0) 70%);
}

.sky-right {
    top: 60px;
    right: -140px;
    background: radial-gradient(circle, rgba(117, 200, 255, 0.8) 0%, rgba(117, 200, 255, 0) 70%);
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: rgba(255, 249, 241, 0.84);
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
}

.topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 18px 0;
}

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

.brand strong,
.site-footer h2 {
    display: block;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.brand small {
    display: block;
    max-width: 260px;
    color: var(--muted);
    font-size: 0.8rem;
}

.brand-mark {
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    color: white;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.main-nav,
.locale-switcher,
.footer-links {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav {
    justify-content: center;
}

.main-nav a,
.footer-links a,
.locale-switcher a,
.text-link,
.video-category,
.back-link,
.eyebrow-link {
    color: var(--muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.footer-links a:hover,
.locale-switcher a:hover,
.text-link:hover,
.video-category:hover,
.back-link:hover,
.eyebrow-link:hover {
    color: var(--orange);
}

.locale-switcher a {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--line);
    font-size: 0.92rem;
}

.locale-switcher a.active {
    background: linear-gradient(135deg, var(--yellow), #fff4b0);
    color: var(--text);
}

.hero,
.subhero,
.section {
    padding: 40px 0 72px;
}

.hero-grid,
.video-page {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 28px;
    align-items: start;
}

.hero-copy h1,
.subhero-card h1,
.video-copy h1,
.empty-panel h1 {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.hero-copy p,
.subhero-card p,
.video-copy p,
.empty-panel p {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.7;
    color: var(--muted);
}

.eyebrow,
.category-count,
.video-badge,
.eyebrow-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.eyebrow,
.eyebrow-link {
    margin-bottom: 18px;
    color: #8d4f27;
    background: rgba(255, 212, 106, 0.32);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    border: 1px solid transparent;
}

.button-primary {
    background: linear-gradient(135deg, var(--orange), var(--peach));
    color: white;
    box-shadow: var(--shadow);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--line);
}

.hero-note {
    margin-top: 18px;
    max-width: 520px;
}

.hero-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.showcase-bubble,
.showcase-card,
.subhero-card,
.video-card,
.category-card,
.video-copy,
.empty-panel,
.admin-card,
.admin-table-wrap,
.auth-card,
.stat-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.showcase-bubble {
    padding: 26px 24px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.showcase-bubble strong {
    font-size: 3rem;
    font-family: var(--font-display);
    line-height: 1;
}

.bubble-orange {
    background: linear-gradient(145deg, rgba(255, 173, 102, 0.26), rgba(255, 255, 255, 0.92));
}

.bubble-blue {
    background: linear-gradient(145deg, rgba(117, 200, 255, 0.26), rgba(255, 255, 255, 0.92));
}

.showcase-card {
    display: block;
    overflow: hidden;
    padding: 14px;
}

.showcase-card img,
.video-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 22px;
}

.showcase-card span {
    display: block;
    padding: 14px 6px 4px;
    font-weight: 700;
}

.section-soft {
    position: relative;
}

.section-soft::before,
.section-wave::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.section-soft::before {
    background: linear-gradient(180deg, rgba(255, 212, 106, 0.18), rgba(255, 255, 255, 0));
}

.section-wave::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 157, 193, 0.18), transparent 22%),
        radial-gradient(circle at 80% 10%, rgba(130, 221, 184, 0.22), transparent 24%);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 24px;
}

.section-heading h2,
.admin-section h2,
.admin-section h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.video-grid,
.category-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.video-card,
.category-card {
    overflow: hidden;
}

.video-thumb {
    position: relative;
    display: block;
    padding: 14px 14px 0;
}

.video-badge {
    position: absolute;
    right: 24px;
    bottom: 16px;
    color: white;
    background: rgba(36, 50, 74, 0.82);
}

.video-body {
    padding: 18px 18px 22px;
}

.language-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: rgba(117, 200, 255, 0.18);
    color: #2f668a;
    font-size: 0.82rem;
    font-weight: 800;
}

.language-pill-link:hover {
    color: #1f567b;
    background: rgba(117, 200, 255, 0.28);
}

.video-category {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.video-body h3 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.video-body p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.6;
}

.category-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
    padding: 24px;
    border-top: 6px solid var(--accent);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 249, 241, 0.95) 100%);
}

.category-count {
    background: rgba(255, 255, 255, 0.7);
    color: var(--accent);
}

.category-card h3 {
    margin: 18px 0 10px;
    font-family: var(--font-display);
    font-size: 1.65rem;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
}

.category-link,
.text-link {
    font-weight: 800;
}

.subhero-card,
.video-copy {
    padding: 28px;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    font-weight: 700;
}

.video-rail {
    width: 100%;
}

.video-embed {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    background: #111;
}

.video-embed iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
}

.video-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 22px 0 0;
}

.video-meta div {
    min-width: 140px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 241, 221, 0.7);
}

.video-meta dt {
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--muted);
}

.video-meta dd {
    margin: 0;
    font-weight: 800;
}

@media (min-width: 981px) {
    .video-rail {
        position: sticky;
        top: clamp(92px, calc(50vh - 210px), 240px);
        align-self: start;
    }

    .video-embed {
        width: 100%;
        margin: 0 auto;
    }
}

.empty-state,
.empty-panel {
    text-align: center;
    padding: 48px 24px;
}

.filter-panel {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow);
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.8fr) auto;
    gap: 16px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.pagination-status {
    font-weight: 800;
    color: var(--muted);
}

.thumbnail-preview {
    margin-top: 12px;
}

.thumbnail-preview img {
    width: min(280px, 100%);
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: white;
}

.site-footer {
    padding: 26px 0 40px;
    border-top: 1px solid rgba(36, 50, 74, 0.08);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.site-footer p {
    margin: 8px 0 0;
    color: var(--muted);
}

.admin-shell {
    background: linear-gradient(180deg, #fff8ee, #fff2de);
}

.admin-header {
    padding: 22px 0;
}

.admin-header .topbar {
    background: rgba(255, 255, 255, 0.82);
    padding: 16px 18px;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.admin-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-main {
    padding: 18px 0 56px;
}

.admin-section {
    display: grid;
    gap: 18px;
}

.admin-card,
.auth-card,
.stat-card,
.admin-table-wrap {
    padding: 22px;
}

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

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

.stat-card strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2.6rem;
}

.stat-note {
    margin: 0 0 18px;
    color: var(--muted);
}

.flash {
    padding: 14px 18px;
    border-radius: 18px;
    font-weight: 700;
}

.flash-success {
    background: rgba(130, 221, 184, 0.28);
}

.flash-error {
    background: rgba(255, 157, 193, 0.24);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-insights {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 18px;
}

.mini-bars {
    display: grid;
    gap: 12px;
}

.mini-bar-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 48px;
    gap: 12px;
    align-items: center;
}

.mini-bar-label {
    font-weight: 700;
    color: var(--muted);
}

.mini-bar-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 212, 106, 0.2);
    overflow: hidden;
}

.mini-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffbf53, #ff7f6a);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 212, 106, 0.32);
    font-size: 0.85rem;
    font-weight: 700;
}

.status-off {
    background: rgba(255, 157, 193, 0.24);
}

form {
    display: grid;
    gap: 18px;
}

.form-grid,
.locale-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.locale-grid {
    grid-template-columns: 1fr;
}

.field-group {
    display: grid;
    gap: 8px;
}

.field-group label {
    font-weight: 700;
}

.field-group input,
.field-group textarea,
.field-group select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    font: inherit;
    color: var(--text);
}

.field-group textarea {
    min-height: 120px;
    resize: vertical;
}

.checkbox-row {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.checkbox input {
    min-height: auto;
    width: auto;
}

.locale-block {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid var(--line);
}

.locale-block h3 {
    margin-top: 0;
    font-family: var(--font-display);
}

.locale-section-heading {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.locale-divider {
    margin: 22px 0 18px;
    border: 0;
    border-top: 1px solid var(--line);
}

.auth-wrap {
    min-height: calc(100vh - 40px);
    display: grid;
    place-items: center;
    padding: 20px 0;
}

.auth-card {
    width: min(560px, 100%);
}

.muted {
    color: var(--muted);
}

@media (max-width: 980px) {
    .topbar,
    .hero-grid,
    .video-page,
    .video-grid,
    .category-grid,
    .stats-grid,
    .admin-insights,
    .form-grid,
    .filter-form {
        grid-template-columns: 1fr;
    }

    .main-nav {
        justify-content: start;
    }
}

@media (max-width: 720px) {
    .topbar {
        gap: 16px;
    }

    .site-header {
        position: static;
    }

    .hero,
    .subhero,
    .section {
        padding: 24px 0 52px;
    }

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

    .footer-grid,
    .checkbox-row {
        align-items: start;
    }
}
