:root {
    color-scheme: dark;
    --bg: #0b0d12;
    --panel: #151923;
    --panel-2: #1b2130;
    --text: #f3f5f8;
    --muted: #aab1c0;
    --line: rgba(255,255,255,.1);
    --accent: #6e7cff;
    --danger: #ff6b7d;
    --success: #55d6a3;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    overflow-x: hidden;
}

button,
input,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.page-shell {
    width: min(960px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 100px;
}

.notice-card {
    background: linear-gradient(135deg, #20263a, #171b28);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,.24);
}

.notice-badge {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(110,124,255,.18);
    color: #cbd1ff;
    font-weight: 700;
    font-size: 13px;
}

.notice-content {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.75;
    word-break: break-word;
}

.notice-content p {
    margin: .35em 0;
}

.notice-content a {
    color: #bfc6ff;
}

.hero {
    text-align: center;
    padding: 22px 8px 12px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(28px, 6vw, 48px);
    letter-spacing: -.03em;
}

.video-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.28);
}

.video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 14px;
}

video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 4px 3px;
}

.primary-button,
.secondary-button {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
}

.primary-button {
    width: 100%;
    background: var(--accent);
    color: white;
}

.secondary-button {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
}

.unlocked-state {
    color: var(--success);
    font-weight: 700;
}

.lock-notice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 10px 4px 4px;
    padding: 13px 15px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.lock-icon {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1.5;
}

.lock-notice-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.5;
}

.lock-notice-text strong {
    color: var(--text);
    font-size: 15px;
}

.lock-notice-text span {
    color: var(--muted);
    font-size: 13px;
}

.empty-state {
    min-height: 240px;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.contact-float {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 30;
    max-width: min(240px, calc(100vw - 36px));
    padding: 13px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 14px 35px rgba(42,55,160,.5);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(0,0,0,.72);
}

.modal-card {
    position: relative;
    width: min(420px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 24px 80px rgba(0,0,0,.5);
}

.modal-card h2 {
    margin: 0 0 8px;
}

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

.modal-card input {
    width: 100%;
    min-height: 48px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #0f1219;
    color: var(--text);
    padding: 0 14px;
    font-size: 16px;
    outline: none;
}

.modal-card input:focus {
    border-color: var(--accent);
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 26px;
    cursor: pointer;
}

.form-message {
    min-height: 22px;
    margin-top: 10px;
    color: var(--danger);
    font-size: 14px;
}

.hidden {
    display: none !important;
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 20px, 960px);
        padding-top: 10px;
    }

    .notice-card {
        border-radius: 15px;
        padding: 15px;
    }

    .video-card {
        padding: 8px;
        border-radius: 16px;
    }

    .video-wrap {
        border-radius: 11px;
    }

    .video-actions {
        padding: 12px 2px 2px;
    }

    .lock-notice {
        margin: 8px 0 2px;
        padding: 12px;
    }

    .lock-notice-text strong {
        font-size: 14px;
    }

    .lock-notice-text span {
        font-size: 12px;
    }

    .contact-float {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
        max-width: calc(100vw - 24px);
    }
}