:root {
    --bg-1: #020817;
    --bg-2: #071225;
    --bg-3: #0b1730;
    --panel: #061329;
    --panel-2: #081833;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.12);
    --text: #eef4ff;
    --muted: #a8bbd9;
    --green: #22c55e;
    --red: #ef4444;
    --blue: #38bdf8;
    --radius: 22px;
    --radius-sm: 16px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --header-h: 86px;
    --wrap: 1280px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

html {
    background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-3) 100%);
}

body {
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-3) 100%);
    line-height: 1.4;
}

img {
    max-width: 100%;
    display: block;
}

video {
    display: block;
}

a {
    color: #dff7ff;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.wrap {
    width: min(var(--wrap), calc(100% - 20px));
    margin: 0 auto;
}

/* HEADER */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(1, 8, 22, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    height: var(--header-h);
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    min-width: 0;
}

.brand:hover {
    color: var(--text);
}

.brand-logo {
    width: 76px;
    height: auto;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand span {
    display: block;
    min-width: 0;
}

.brand strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.05;
    margin-bottom: 2px;
    white-space: nowrap;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.top-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    min-width: 0;
}

.top-nav a {
    color: var(--text);
    opacity: 0.92;
    font-weight: 600;
    white-space: nowrap;
}

.top-nav a:hover {
    opacity: 1;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    color: var(--text);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.02);
}

.lang-switch a.is-active,
.lang-switch a[aria-current="page"] {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.12);
}

/* MAIN */
main {
    min-height: calc(100vh - var(--header-h));
}

.panel {
    background: linear-gradient(180deg, rgba(8, 20, 42, 0.96) 0%, rgba(7, 18, 38, 0.96) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel-pad {
    padding: 18px;
}

/* DESKTOP HOMEPAGE */
body.desktop-home {
    overflow: hidden;
}

body.desktop-home main {
    height: calc(100vh - var(--header-h));
    overflow: hidden;
}

body.desktop-home .site-footer {
    display: none;
}

.fullscreen-home {
    height: 100%;
    padding: 8px 0 10px;
}

.hero-grid {
    height: 100%;
}

.hero-main {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    padding: 8px 10px 10px;
}

.hero-side-col,
.hero-video-col {
    min-height: 0;
}

.hero-side-col {
    order: 1;
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 8px;
    align-content: start;
}

.hero-video-col {
    order: 2;
    display: grid;
    align-items: start;
    justify-items: center;
    min-height: 0;
}

.hero-meta h1 {
    margin: 0 0 6px;
    font-size: clamp(1.3rem, 1.7vw, 1.95rem);
    line-height: 1.08;
    font-weight: 800;
}

.hero-meta p,
.small {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
}

/* VIDEO */
.video-wrap {
    position: relative;
    background: #000;
    border-radius: 18px;
    overflow: hidden;
}

.video-wrap--fullscreen {
    width: min(100%, 920px);
    height: 31vh;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    z-index: 3;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.85rem;
    font-weight: 700;
}

/* BUTTON BASE */
.vote-btn,
.ghost-btn,
.admin-btn {
    appearance: none;
    border: 0;
    outline: 0;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.vote-btn:hover,
.ghost-btn:hover,
.admin-btn:hover {
    transform: translateY(-1px);
}

.vote-btn:disabled,
.ghost-btn:disabled,
.admin-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* TOP 3 ACTIONS */
.video-actions {
    display: grid;
    gap: 10px;
}

.video-actions--stack {
    grid-template-columns: 1fr 1fr 1fr;
}

.video-actions--stack > * {
    width: 100%;
}

.vote-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 18px;
    font-weight: 800;
    font-size: 0.98rem;
    text-align: center;
    white-space: nowrap;
}

.vote-btn--viral {
    background: var(--green);
    color: #062b15;
}

.vote-btn--viral:hover {
    background: #2bd166;
}

.vote-btn--fail {
    background: var(--red);
    color: #3f0a0a;
}

.vote-btn--fail:hover {
    background: #ff5757;
}

.ghost-btn,
.admin-btn {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    font-weight: 800;
    color: var(--text);
    background: linear-gradient(180deg, #07162f 0%, #041126 100%);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: center;
}

.admin-btn {
    background: linear-gradient(180deg, #0d274e 0%, #081c39 100%);
    border-color: rgba(56, 189, 248, 0.24);
}

/* RESULT BAR */
.result-bar {
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #08111f;
    min-height: 14px;
}

.result-fill {
    display: grid;
    grid-template-columns: var(--viral-width, 50%) var(--fail-width, 50%);
    min-height: 14px;
}

.result-fill span:first-child {
    background: var(--green);
}

.result-fill span:last-child {
    background: var(--red);
}

/* RESULT STATS EXACT LIKE YOUR SCREENSHOT */
.result-stats {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    color: var(--text);
    font-weight: 800;
    font-size: 0.95rem;
    min-height: 28px;
}

.result-stats > * {
    min-width: 0;
}

.result-stats > *:first-child {
    text-align: left;
}

.result-stats > *:nth-child(2) {
    text-align: center;
}

.result-stats > *:last-child {
    text-align: right;
}

/* 6 KNOPPEN OP 1 RIJ */
.hero-buttons {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    align-items: stretch !important;
}

.hero-buttons > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

.hero-buttons .ghost-btn,
.hero-buttons a.ghost-btn,
.hero-buttons button.ghost-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 13px !important;
    line-height: 1 !important;
    border-radius: 14px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: var(--text) !important;
}

.hero-buttons .ghost-btn:hover,
.hero-buttons a.ghost-btn:hover,
.hero-buttons button.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* ADS */
.compact-ad,
.ad-slot,
.ad-slot--wide {
    width: 100%;
    min-height: 100px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
}

.ad-slot {
    min-height: 250px;
}

/* COMMENTS + FORMS */
.comment-form,
.login-form {
    display: grid;
    gap: 12px;
}

.field,
input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #091223;
    color: var(--text);
    padding: 14px 16px;
    outline: none;
}

.field:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(56, 189, 248, 0.4);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.comment-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
}

.comment-meta {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

/* MODALS */
.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 300;
}

.modal-shell[hidden] {
    display: none !important;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
}

.modal-panel {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 32px));
    max-height: 82vh;
    overflow: auto;
    margin: 5vh auto 0;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.flash {
    margin-bottom: 14px;
    padding: 13px 15px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(56, 189, 248, 0.08);
    color: #dff8ff;
}

.flash--error {
    background: rgba(239, 68, 68, 0.08);
    color: #ffe4e4;
}

/* TABLES / ADMIN */
.cards {
    display: grid;
    gap: 16px;
}

.card,
.metric {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.02);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric strong {
    display: block;
    margin-top: 6px;
    font-size: 1.8rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--muted);
    font-size: 0.92rem;
}

.empty-state {
    padding: 70px 20px;
    text-align: center;
    color: var(--muted);
}

/* FOOTER */
.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 24px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
}

/* MOBILE PAGE */
body.mobile-home {
    overflow-x: hidden;
    overflow-y: auto;
}

body.mobile-home main {
    height: auto;
    overflow: visible;
}

body.mobile-home .site-footer {
    display: block;
}

.mobile-home-wrap {
    width: min(720px, calc(100% - 20px));
    margin: 14px auto 24px;
}

.mobile-card {
    display: grid;
    gap: 14px;
}

.mobile-intro {
    margin: 0;
    color: var(--muted);
}

.mobile-video-wrap {
    aspect-ratio: 9 / 16;
    max-height: 58vh;
}

.mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mobile-actions .ghost-btn {
    grid-column: 1 / -1;
}

.mobile-stats {
    font-size: 0.95rem;
    color: var(--muted);
}

.mobile-button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* INSTALL */
.install-strip {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.install-btn {
    width: min(1180px, 100%);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    :root {
        --header-h: auto;
    }

    .site-header {
        height: auto;
    }

    .header-inner {
        height: auto;
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 10px 0 14px;
        gap: 10px;
    }

    .top-nav {
        justify-content: center;
        gap: 16px;
    }

    body.desktop-home {
        overflow: auto;
    }

    body.desktop-home main {
        height: auto;
        overflow: visible;
    }

    body.desktop-home .site-footer {
        display: block;
    }

    .fullscreen-home,
    .hero-grid,
    .hero-main {
        height: auto;
    }

    .video-wrap--fullscreen {
        width: min(100%, 900px);
        height: auto;
    }

    .hero-buttons {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .video-actions--stack {
        grid-template-columns: 1fr;
    }

    .result-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .result-stats > *:first-child,
    .result-stats > *:nth-child(2),
    .result-stats > *:last-child {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .wrap {
        width: min(100%, calc(100% - 16px));
    }

    .brand-logo {
        width: 68px;
    }

    .brand strong,
    .brand small {
        white-space: normal;
    }

    .top-nav {
        gap: 12px;
    }

    .lang-switch {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .metric-grid,
    .mobile-button-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .hero-buttons {
        grid-template-columns: 1fr !important;
    }

    .mobile-actions {
        grid-template-columns: 1fr;
    }

    .lang-switch a {
        width: 38px;
        height: 38px;
    }
}