/* ========================= BASE ========================= */
body.body {
    margin: 0;
    padding: 0;
    min-height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(60% 45% at 50% 15%, rgba(255,255,255,0.10), transparent 60%),
                radial-gradient(45% 35% at 15% 85%, rgba(255,45,85,0.08), transparent 60%),
                radial-gradient(45% 35% at 85% 85%, rgba(0,180,255,0.06), transparent 60%),
                linear-gradient(180deg, #15111f 0%, #06060a 60%, #000 100%);
}

/* ========================= CONTAINER ========================= */
.container {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #121212, #090909);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 18px 70px rgba(0,0,0,0.75),
                inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ========================= VIDEO HEAD ========================= */
.video-head {
    padding: 14px 16px 10px;
}

.video-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.video-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: rgba(255,255,255,.7);
    margin-bottom: 8px;
}

.meta-live {
    color: #ff375f;
    font-weight: 700;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.video-tags span {
    background: rgba(255,255,255,.08);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: #fff;
}

/* ========================= MAIN PLAYER ========================= */
.main-player {
    position: relative;
    margin: 14px;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06),
                0 10px 30px rgba(0,0,0,0.6);
}

/* subtle "alive" glow */
.main-player::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient( circle at 50% 40%, rgba(255,255,255,0.06), transparent 60% );
    opacity: 0;
    animation: playerGlow 3.6s infinite;
    pointer-events: none;
}

@keyframes playerGlow {
    0% { opacity: 0; }
    40% { opacity: 0.25; }
    70% { opacity: 0.15; }
    100% { opacity: 0; }
}

/* preview */
.main-player .thumbnail {
    width: 100%;
    height: 100%;
    background: #000 center / cover no-repeat;
}

/* play button (main) */
.main-player .play-button {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.main-player .play-button::after {
    content: '';
    border-left: 26px solid rgba(255,255,255,0.95);
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.7));
    animation: playPulse 2.8s infinite;
}

/* мягкий, нативный пульс */
@keyframes playPulse {
    0% {
        transform: scale(1);
        opacity: 0.95;
        filter: drop-shadow(0 6px 18px rgba(0,0,0,0.7));
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
        filter: drop-shadow(0 10px 28px rgba(0,0,0,0.9));
    }
    100% {
        transform: scale(1);
        opacity: 0.95;
        filter: drop-shadow(0 6px 18px rgba(0,0,0,0.7));
    }
}

/* ========================= PROGRESS BAR ========================= */
.progress-bar {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    padding-left: 14px;
    padding-right: 56px;
    box-sizing: border-box;
    background: linear-gradient(
        0deg,
        rgba(0,0,0,0.85),
        rgba(0,0,0,0.2) 60%,
        transparent
    );
}

.play-icon {
    width: 0;
    height: 0;
    border-left: 9px solid rgba(255,255,255,0.95);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    opacity: 0.9;
}

.progress {
    flex: 1;
    height: 5px;
    margin: 0 12px;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    position: relative;
}

.progress-filled {
    width: 35%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    border-radius: 3px;
}

.progress-knob {
    position: absolute;
    top: -4px;
    left: 35%;
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    transform: translateX(-50%);
}

.duration {
    position: absolute;
    right: 14px;
    bottom: 9px;
    font-size: 14px;
    color: #fff;
    opacity: 0.92;
    pointer-events: none;
}

/* ========================= VIDEO ACTIONS ========================= */
.video-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 6px 14px;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: linear-gradient(180deg, #111, #0b0b0b);
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: rgba(255,255,255,.75);
    cursor: default;
}

.action-item span {
    font-size: 12px;
    opacity: .85;
}

/* ========================= PLAYLIST ========================= */
.playlist {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* card */
.video-item {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06),
                0 6px 18px rgba(0,0,0,0.55);
    transition: transform .18s ease, box-shadow .18s ease;
}

.video-item:hover {
    transform: scale(1.035);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08),
                0 12px 30px rgba(0,0,0,0.75);
}

.video-item .thumbnail {
    width: 100%;
    height: 100%;
    background: #111 center / cover no-repeat;
}

/* overlay */
.video-item .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.12) 0%,
        rgba(0,0,0,0.48) 100%
    );
}

/* play small */
.video-item .overlay .play-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-item .overlay .play-button::after {
    content: '';
    margin-left: 3px;
    border-left: 14px solid rgba(255,255,255,0.95);
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
}

/* info badges */
.info {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #fff;
}

.lock, .views, .hd-badge {
    background: rgba(0,0,0,0.62);
    padding: 3px 7px;
    border-radius: 6px;
    font-weight: 600;
}

.new-badge {
    background: #ff2d55;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
}

/* ========================= VIDEO DESCRIPTION ========================= */
.video-description {
    padding: 14px 16px 10px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

/* ========================= MODAL (HIDDEN) ========================= */
.xh-modal {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
}

.main-player.is-playing::before {
    content: '▶ Tap to continue';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    background: radial-gradient( circle at center, rgba(0,0,0,0.25), rgba(0,0,0,0.55) );
    opacity: 0;
    animation: tapHint 2.6s infinite;
    pointer-events: none;
}

@keyframes tapHint {
    0% { opacity: 0; }
    40% { opacity: 0.55; }
    70% { opacity: 0.35; }
    100% { opacity: 0; }
}
