* {
    box-sizing: border-box;
}

:root {
    --primary: #6d28d9;
    --secondary: #0f172a;
    --accent: #22d3ee;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --card: rgba(15, 23, 42, 0.82);
    --border: rgba(148, 163, 184, 0.22);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 28%, transparent), transparent 32rem),
                linear-gradient(135deg, var(--secondary), #020617 70%);
    color: var(--text);
}

a {
    color: inherit;
}

.site-shell {
    min-height: 100vh;
}

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(120deg, rgba(15,23,42,.95), rgba(15,23,42,.72));
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 10px;
}

.brand-row {
    display: grid;
    grid-template-columns: minmax(100px, 150px) 1fr minmax(100px, 150px);
    grid-template-areas: "client title company";
    align-items: center;
    gap: 14px;
}

.brand-client {
    grid-area: client;
}

.brand-company {
    grid-area: company;
}

.event-title-block {
    grid-area: title;
    text-align: center;
}

.brand-card {
    min-height: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: none;
}

.brand-card img {
    max-width: 100%;
    max-height: 70px;
    width: auto;
    object-fit: contain;
}

.brand-client img,
.brand-company img {
    width: auto;
}

.video-header h2 {
    margin: 8px 0 0;
    font-size: clamp(1.7rem, 2.8vw, 2.35rem);
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 2px;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
}

.small-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(255,255,255,.08);
    border: 1px solid var(--border);
    color: #e2e8f0;
    font-weight: 700;
}

.brand-card span,
.brand-card strong {
    letter-spacing: .08em;
    text-transform: uppercase;
}

.brand-card small {
    margin-left: 6px;
    color: var(--muted);
}


.event-title-block h1 {
    margin: 6px 0 4px;
    font-size: clamp(1.9rem, 3.5vw, 3rem);
    line-height: 1;
    letter-spacing: -.05em;
}

.event-title-block p {
    max-width: 720px;
    margin: 0 auto;
    color: #cbd5e1;
    font-size: clamp(0.95rem, 1.1vw, 1.04rem);
}

.event-date {
    display: inline-flex;
    margin-top: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255,255,255,.06);
    font-size: .9rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15,23,42,.7);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.status-pill span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--warning);
    box-shadow: 0 0 20px currentColor;
}

.status-live span {
    background: var(--success);
    animation: pulse 1.4s infinite;
}

.status-ended span {
    background: var(--muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.72); }
}

.content-wrap {
    width: min(1120px, calc(100% - 32px));
    margin: 18px auto;
}

.video-card {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(2,6,23,.88));
    box-shadow: 0 34px 90px rgba(0,0,0,.35);
    overflow: hidden;
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.video-header h2 {
    margin: 4px 0 0;
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: .16em;
    font-weight: 800;
    font-size: .76rem;
}

.small-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #dbeafe;
    text-decoration: none;
    background: rgba(255,255,255,.06);
    white-space: nowrap;
}

.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame iframe,
.video-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    display: grid;
    place-content: center;
    text-align: center;
    padding: 24px;
    background: radial-gradient(circle, rgba(109,40,217,.28), transparent 40%), #020617;
}

.video-placeholder h3 {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 3rem);
}

.video-placeholder p {
    margin: 0;
    color: var(--muted);
}

.support-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px 20px;
}

.support-box p {
    margin: 6px 0 0;
    color: var(--muted);
}

.support-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 72%, var(--accent)));
    color: #fff;
    box-shadow: 0 16px 30px color-mix(in srgb, var(--primary) 26%, transparent);
}

.btn-secondary {
    background: rgba(255,255,255,.08);
    border-color: var(--border);
    color: #e2e8f0;
}

.full {
    width: 100%;
}

.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 34px;
    color: var(--muted);
    text-align: center;
}

.site-footer p {
    margin: 0 0 8px;
}

.admin-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #020617, #111827);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card,
.admin-panel {
    border: 1px solid var(--border);
    background: rgba(15,23,42,.86);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(0,0,0,.34);
}

.login-card {
    width: min(440px, 100%);
    padding: 28px;
}

.admin-brand {
    font-size: .9rem;
    font-weight: 900;
    letter-spacing: .16em;
    color: #fff;
}

.admin-brand span {
    color: var(--accent);
}

.login-card h1,
.admin-panel h2 {
    margin: 14px 0 8px;
}

.login-card p {
    color: var(--muted);
    margin: 0 0 18px;
}

.admin-form,
.settings-grid {
    display: grid;
    gap: 16px;
}

.admin-form label,
.admin-panel label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(2,6,23,.64);
    color: #fff;
    padding: 12px 13px;
    font: inherit;
    outline: none;
}

input[type="color"] {
    height: 48px;
    padding: 6px;
}

input[type="file"] {
    padding: 10px;
}

textarea {
    resize: vertical;
}

label small,
.admin-panel small {
    color: var(--muted);
    font-weight: 500;
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.alert-error {
    background: rgba(239,68,68,.12);
    color: #fecaca;
    border-color: rgba(239,68,68,.35);
}

.alert-success {
    background: rgba(34,197,94,.12);
    color: #bbf7d0;
    border-color: rgba(34,197,94,.35);
}

.back-link {
    display: inline-block;
    margin-top: 18px;
    color: var(--muted);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(2,6,23,.86);
    backdrop-filter: blur(12px);
}

.admin-topbar small {
    color: var(--muted);
}

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

.admin-topbar nav a {
    color: #dbeafe;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.admin-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 48px;
}

.settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.admin-panel {
    padding: 22px;
    display: grid;
    gap: 15px;
}

.admin-panel h2 {
    margin-top: 0;
    font-size: 1.16rem;
}

.upload-grid,
.color-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.current-img {
    width: 130px;
    max-height: 80px;
    object-fit: contain;
    padding: 8px;
    border-radius: 12px;
    background: rgba(255,255,255,.08);
    border: 1px solid var(--border);
}

.current-img.wide {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
}

.current-img.tiny {
    width: 56px;
    height: 56px;
}

.mini-preview {
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
}

.mini-preview code {
    white-space: normal;
    word-break: break-all;
    color: #bae6fd;
}

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

.checkbox-label {
    display: flex !important;
    grid-template-columns: auto 1fr;
    flex-direction: row;
    align-items: center;
    gap: 10px !important;
}

.checkbox-label input {
    width: auto;
}

.actions-panel {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
}

@media (max-width: 860px) {
    .hero-inner {
        width: min(1180px, calc(100% - 20px));
        padding: 10px 0 8px;
    }

    .brand-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "title title"
            "client company";
        gap: 8px 18px;
    }

    .brand-card {
        min-height: auto;
        padding: 0;
    }

    .brand-card img {
        max-height: 42px;
    }

    .event-title-block {
        margin-bottom: 2px;
    }

    .event-title-block h1 {
        margin: 8px 0 4px;
        font-size: clamp(1.65rem, 7vw, 2.35rem);
    }

    .event-title-block p {
        max-width: 340px;
        font-size: .95rem;
    }

    .event-date {
        margin-top: 7px;
        font-size: .84rem;
    }

    .content-wrap {
        width: min(1120px, calc(100% - 20px));
        margin: 14px auto;
    }

    .video-header,
    .support-box,
    .admin-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .video-header {
        padding: 16px 18px;
    }

    .support-box {
        padding: 16px 18px 18px;
    }

    .support-actions {
        justify-content: stretch;
    }

    .support-actions .btn,
    .small-link {
        width: 100%;
    }

    .settings-grid,
    .upload-grid,
    .color-grid {
        grid-template-columns: 1fr;
    }

    .actions-panel {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .hero-inner {
        width: calc(100% - 20px);
        padding: 10px 0 8px;
    }

    .brand-row {
        gap: 8px 12px;
    }

    .brand-card img {
        max-height: 38px;
    }

    .status-pill {
        padding: 6px 10px;
        font-size: .68rem;
    }

    .video-card {
        border-radius: 22px;
    }

    .video-header h2 {
        font-size: 1.2rem;
    }

    .site-footer {
        width: calc(100% - 20px);
        padding: 16px 0 28px;
    }
}
