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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    color: #fff;
    cursor: none;
}

body.waiting {
    cursor: default;
}

/* ── Video container ── */

#videoContainer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 1;
}

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

/* ── Waiting overlay ── */

#waitingOverlay {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(20, 68, 90, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(31, 111, 150, 0.20) 0%, transparent 50%),
        linear-gradient(180deg, #080e13 0%, #0d1a24 50%, #080e13 100%);
    opacity: 1;
    transition: opacity 0.6s ease;
    pointer-events: auto;
}

#waitingOverlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.waiting-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
    padding: 24px;
}

/* ── Pulse ring animation ── */

.pulse-ring {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(31, 111, 150, 0.9);
    position: relative;
    box-shadow: 0 0 20px rgba(31, 111, 150, 0.4);
}

.pulse-ring::before,
.pulse-ring::after {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(31, 111, 150, 0.5);
    animation: pulse-expand 2.4s ease-out infinite;
}

.pulse-ring::after {
    animation-delay: 1.2s;
}

@keyframes pulse-expand {
    0% {
        inset: -4px;
        opacity: 0.8;
    }
    100% {
        inset: -36px;
        opacity: 0;
    }
}

/* ── Text ── */

.waiting-text {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
}

.waiting-hint {
    font-size: clamp(0.78rem, 1.8vw, 0.92rem);
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
}

.waiting-hint strong {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

/* ── QR code ── */

#qrCode {
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 24px 64px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(31, 111, 150, 0.12);
    line-height: 0;
}

#qrCode img,
#qrCode canvas {
    display: block;
    image-rendering: pixelated;
}
