/* Страница /stream/tank — в единой стилистике с главной (градиент #667eea → #764ba2) */

:root {
    --ba-purple: #667eea;
    --ba-violet: #764ba2;
    --ba-gradient: linear-gradient(135deg, var(--ba-purple) 0%, var(--ba-violet) 100%);
    --ba-page-bg: #e8ecf3;
    --ba-surface: #ffffff;
}

.ba-navbar-brand-light {
    color: var(--ba-purple) !important;
}

body.tank-stream-page {
    background: linear-gradient(180deg, var(--ba-page-bg) 0%, #dfe4ed 100%);
    color: #2c3e50;
    min-height: 100vh;
}

/* Светлая шапка (как на главной): контраст и отступ под fixed-top */
body.tank-stream-page .navbar-light.fixed-top {
    border-bottom: 1px solid rgba(102, 126, 234, 0.12);
}

body.tank-stream-page .navbar-light .nav-link {
    color: #495057 !important;
    font-weight: 500;
}

body.tank-stream-page .navbar-light .nav-link:hover {
    color: var(--ba-purple) !important;
}

body.tank-stream-page .navbar-light .nav-link.active {
    color: var(--ba-purple) !important;
    font-weight: 600;
}

/* Полноширинная шапка страницы (градиент + полоска), контент видео — уже в колонке */
.stream-page-container--stack {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    width: 100%;
    min-height: calc(100vh - 76px);
    box-sizing: border-box;
}

.stream-page-head-full {
    width: 100%;
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.18);
}

.stream-page-head-full .video-header {
    border-radius: 0;
    padding: 18px clamp(16px, 4vw, 40px);
    background: var(--ba-gradient);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.stream-page-body-narrow {
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 28px);
    width: 100%;
    box-sizing: border-box;
}

.stream-page-main-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.video-section--solo {
    border-radius: 16px;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
    box-shadow:
        0 12px 40px rgba(102, 126, 234, 0.2),
        0 0 0 1px rgba(102, 126, 234, 0.08);
    overflow: hidden;
}

.tank-stream-header.video-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
    position: relative;
}

.tank-stream-header .fullscreen-btn {
    position: static;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.tank-stream-header .fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.tank-stream-header__left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    justify-self: start;
}

.tank-stream-header__left h3 {
    margin: 0;
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tank-stream-header__timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 88px;
    justify-self: center;
}

.tank-timer-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    background: rgba(0, 0, 0, 0.22);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tank-timer-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.tank-timer-digits {
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 1.5ch;
    text-align: center;
}

.tank-timer-digits.is-warm {
    color: #ffe082;
}

.tank-timer-unit {
    font-size: 0.75rem;
    opacity: 0.88;
}

.tank-timer-hint {
    font-size: 0.65rem;
    max-width: 240px;
    text-align: center;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
    min-height: 2.5em;
}

.tank-stream-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 10px;
    flex-shrink: 0;
    justify-self: end;
}

.tank-header-buy-btn {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.18);
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tank-header-buy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff !important;
}

.tank-balance-pill {
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.22);
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tank-login-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.15s ease;
}

.tank-login-link:hover {
    background: rgba(255, 255, 255, 0.32);
    color: #fff !important;
}

.tank-stream-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 12px clamp(16px, 4vw, 40px);
    background: var(--ba-surface);
    color: #495057;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: inset 4px 0 0 var(--ba-purple);
}

.tank-stream-sub a {
    color: var(--ba-purple);
    font-weight: 600;
    text-decoration: none;
}

.tank-stream-sub a:hover {
    text-decoration: underline;
}

/* /stream — центр шапки: индикатор эфира */
.stream-main-live-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stream-main-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5252;
    box-shadow: 0 0 8px rgba(255, 82, 82, 0.75);
    animation: stream-main-live-pulse 2s ease infinite;
}

@keyframes stream-main-live-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.45;
    }
}

.stream-main-live-text {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

a.tank-balance-pill:hover {
    color: #fff;
    filter: brightness(1.08);
}

/* Видео + панель управления */
.tank-main-row {
    width: 100%;
}

.tank-control-shell {
    position: relative;
    min-height: 12rem;
}

.tank-control-veil {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    border-radius: 16px;
    background: rgba(248, 249, 252, 0.94);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.2s ease;
}

.tank-control-veil:hover {
    background: rgba(237, 240, 250, 0.97);
}

.tank-control-veil--hidden {
    display: none !important;
    pointer-events: none;
}

.tank-control-veil__inner {
    max-width: 16rem;
}

.tank-control-veil__icon {
    color: var(--ba-purple);
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.tank-control-veil__title {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
}

.tank-control-veil__hint {
    color: #6c757d;
}

.tank-control-panel__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #2c3e50;
}

.tank-pad {
    display: grid;
    grid-template-columns: repeat(3, 3.5rem);
    grid-template-rows: repeat(3, 3.5rem);
    gap: 8px;
    justify-content: center;
}

.tank-pad__empty {
    visibility: hidden;
    pointer-events: none;
}

.tank-pad__btn:disabled {
    opacity: 0.45;
}

/* Модалка «Купить билет» */
.tank-purchase-modal__error {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .tank-stream-header.video-header {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .tank-stream-header__left,
    .tank-stream-header__timer,
    .tank-stream-header__meta {
        justify-self: stretch;
    }

    .tank-stream-header__meta {
        justify-content: space-between;
    }

    .tank-timer-hint {
        max-width: none;
    }
}
