:root {
    --bg-1: #120f1b;
    --bg-2: #24192f;
    --card: rgba(17, 14, 24, 0.78);
    --card-border: rgba(255, 255, 255, 0.14);
    --text: #f8f6fb;
    --muted: #d8d0e2;
    --accent: #f3c6d3;
    --accent-strong: #f0a9bf;
    --danger: #ffb5b5;
    --warning: #ffe7b3;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(240, 169, 191, 0.28), transparent 32%),
        radial-gradient(circle at bottom right, rgba(183, 150, 255, 0.22), transparent 30%),
        linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

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

.card {
    position: relative;
    width: min(100%, 1080px);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    background: var(--card);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.login-view,
.video-view {
    position: relative;
    padding: 42px;
    z-index: 1;
}

.login-view {
    display: grid;
    gap: 28px;
}

.login-copy {
    display: grid;
    gap: 18px;
}

.eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.05;
    margin: 0 0 14px;
}

h2 {
    margin: 0;
    font-size: 1.05rem;
}

.lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
    max-width: 680px;
}

.hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.24);
}

.hero-banner-large {
    min-height: clamp(260px, 46vw, 430px);
}

.hero-banner-compact {
    min-height: clamp(180px, 28vw, 250px);
    margin: 0 0 24px;
}

.hero-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
}

.hero-banner-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10, 10, 12, 0.12), rgba(10, 10, 12, 0.42)),
        linear-gradient(25deg, rgba(18, 15, 27, 0.92) 0%, rgba(18, 15, 27, 0.18) 58%, rgba(18, 15, 27, 0.55) 100%);
}

.hero-banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: inherit;
    padding: clamp(20px, 3vw, 34px);
    max-width: min(72%, 640px);
}

.hero-banner-content-compact {
    max-width: 560px;
}

.hero-lead {
    color: rgba(248, 246, 251, 0.92);
    max-width: 42rem;
}

.login-form {
    display: grid;
    gap: 12px;
    max-width: 440px;
    margin-top: 4px;
}

label {
    font-size: 0.94rem;
    color: var(--muted);
}

input[type="password"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 16px 18px;
    font-size: 1rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

input[type="password"]:focus {
    border-color: var(--accent-strong);
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

button,
.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 20px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #231724;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 16px 34px rgba(240, 169, 191, 0.26);
}

button:hover,
.link-button:hover {
    transform: translateY(-1px);
}

.message {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    line-height: 1.5;
}

.error {
    background: rgba(255, 93, 93, 0.12);
    border: 1px solid rgba(255, 125, 125, 0.26);
    color: var(--danger);
}

.warning {
    background: rgba(255, 215, 95, 0.12);
    border: 1px solid rgba(255, 226, 146, 0.25);
    color: var(--warning);
}

.hint {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.96rem;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.video-lead {
    margin-bottom: 24px;
}

.quality-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.quality-panel-header {
    display: grid;
    gap: 6px;
}

.quality-panel-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

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

.quality-option {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.quality-option:hover {
    transform: translateY(-1px);
    border-color: rgba(243, 198, 211, 0.55);
}

.quality-option.is-active {
    background: rgba(243, 198, 211, 0.15);
    border-color: rgba(243, 198, 211, 0.65);
    box-shadow: 0 10px 30px rgba(243, 198, 211, 0.12);
}

.quality-option.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.quality-label {
    font-weight: 700;
    font-size: 1rem;
}

.quality-description {
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.94rem;
}

.video-frame {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

video {
    display: block;
    width: 100%;
    max-height: 78vh;
    background: #000;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    z-index: 0;
}

.glow-one {
    top: -90px;
    left: -70px;
    width: 220px;
    height: 220px;
    background: rgba(243, 198, 211, 0.3);
}

.glow-two {
    right: -80px;
    bottom: -120px;
    width: 260px;
    height: 260px;
    background: rgba(181, 145, 255, 0.24);
}

@media (max-width: 720px) {
    .page-shell {
        padding: 14px;
    }

    .login-view,
    .video-view {
        padding: 24px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-banner-content {
        max-width: 100%;
    }

    .hero-banner-large {
        min-height: 240px;
    }

    .hero-banner-compact {
        min-height: 180px;
    }

    .quality-switch {
        grid-template-columns: 1fr;
    }

    .link-button,
    button {
        width: 100%;
    }

    .video-frame {
        border-radius: 18px;
    }

    video {
        max-height: 62vh;
    }
}
