/* ============================================
   HotZAP Live - Styles
   ============================================ */

:root {
    --bg:          #0f0f0f;
    --surface:     #1a1a2e;
    --surface-2:   #16213e;
    --accent:      #e94560;
    --accent-glow: rgba(233, 69, 96, 0.3);
    --text:        #eee;
    --text-muted:  #999;
    --chat-bg:     #111;
    --chat-msg-bg: #1e1e2f;
    --radius:      8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ---- TOP BAR ---- */

.top-bar {
    background: var(--surface);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 12px 20px;
}

.top-bar__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar__badge {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
    50%      { box-shadow: 0 0 0 8px transparent; }
}

.top-bar__title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- LIVE CONTAINER (video + chat) ---- */

.live-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    height: calc(100vh - 53px);
}

.video-panel {
    position: relative;
    background: #000;
    display: flex;
    flex-direction: column;
}

.video-panel .video-js {
    flex: 1;
    width: 100%;
}

.viewers-count {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.viewers-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse-badge 2s infinite;
}

/* ---- UNMUTE OVERLAY ---- */

.unmute-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    cursor: pointer;
}

.unmute-overlay.hidden {
    display: none;
}

.unmute-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    animation: pulse-badge 2s infinite;
    transition: transform 0.2s;
}

.unmute-btn:hover {
    transform: scale(1.05);
}

/* ---- CHAT PANEL ---- */

.chat-panel {
    background: var(--chat-bg);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.05);
}

.chat-header {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-header__icon {
    font-size: 16px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.chat-welcome {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 12px;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: var(--radius);
    margin-bottom: 4px;
}

/* ---- CHAT MESSAGE ---- */

.chat-msg {
    display: flex;
    gap: 10px;
    animation: msg-in 0.3s ease-out;
}

@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-msg__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.chat-msg__body {
    flex: 1;
    min-width: 0;
}

.chat-msg__name {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.chat-msg__text {
    font-size: 13px;
    line-height: 1.4;
    color: #ddd;
    word-break: break-word;
}

.chat-msg--user .chat-msg__text {
    color: var(--accent);
}

/* ---- CHAT FORM ---- */

.chat-form {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-form__name {
    background: var(--chat-msg-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-form__name:focus {
    border-color: var(--accent);
}

.chat-form__row {
    display: flex;
    gap: 8px;
}

.chat-form__input {
    flex: 1;
    background: var(--chat-msg-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 8px 12px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-form__input:focus {
    border-color: var(--accent);
}

.chat-form__btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.chat-form__btn:hover {
    opacity: 0.85;
}

/* ---- STATE SCREENS (waiting / ended / not found) ---- */

.state-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 53px);
    padding: 40px 20px;
}

.state-screen__card {
    text-align: center;
    max-width: 480px;
}

.state-screen__icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.state-screen__card h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.state-screen__subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 32px;
}

.state-screen__hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 24px;
}

/* ---- COUNTDOWN ---- */

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.countdown__block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown__number {
    font-size: 48px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    line-height: 1;
}

.countdown__label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.countdown__sep {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 18px;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 900px) {
    .live-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        height: auto;
        min-height: calc(100vh - 53px);
    }

    .video-panel {
        aspect-ratio: 16/9;
    }

    .chat-panel {
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.05);
        min-height: 400px;
    }
}

/* ---- Video.js overrides ---- */

.video-js .vjs-control-bar {
    background: rgba(0,0,0,0.7);
}

.video-js .vjs-play-progress,
.video-js .vjs-volume-level {
    background: var(--accent);
}

.video-js .vjs-big-play-button {
    background: var(--accent);
    border: none;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    line-height: 64px;
}
