/**
 * VHP Streams - Dark Theme Styles
 * Стили для страниц трансляций с темной темой
 */

/* ===== ТЕМНАЯ ТЕМА ===== */
.vhp-dark-theme {
    background-color: #0f0f0f;
    color: #f1f1f1;
    min-height: 100vh;
}

.vhp-dark-theme * {
    box-sizing: border-box;
}

/* ===== КОНТЕЙНЕР ===== */
.vhp-streams-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.vhp-streams-header {
    margin-bottom: 32px;
}

.vhp-streams-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.vhp-streams-header p {
    font-size: 14px;
    color: #aaa;
    margin: 0;
}

/* ===== СЕТКА ТРАНСЛЯЦИЙ ===== */
.vhp-streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ===== КАРТОЧКА ТРАНСЛЯЦИИ ===== */
.vhp-stream-card {
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.vhp-stream-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.vhp-stream-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #272727;
    overflow: hidden;
}

.vhp-stream-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* LIVE Badge */
.vhp-live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #cc0000;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.4);
}

.vhp-live-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Viewer Count */
.vhp-viewer-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vhp-viewer-count::before {
    content: '👁';
    font-size: 14px;
}

.vhp-stream-thumbnail .vhp-viewer-count {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vhp-stream-thumbnail .vhp-viewer-count::before {
    content: '👁';
    font-size: 14px;
}

/* Card Info */
.vhp-stream-info {
    padding: 16px;
}

.vhp-stream-channel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.vhp-stream-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #272727;
    overflow: hidden;
    flex-shrink: 0;
}

.vhp-stream-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vhp-stream-channel-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.vhp-stream-title {
    font-size: 16px;
    font-weight: 500;
    color: #f1f1f1;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vhp-stream-meta {
    font-size: 13px;
    color: #aaa;
}

/* ===== EMPTY STATE ===== */
.vhp-streams-empty {
    text-align: center;
    padding: 80px 20px;
}

.vhp-streams-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.vhp-streams-empty h2 {
    font-size: 24px;
    color: #fff;
    margin: 0 0 8px;
}

.vhp-streams-empty p {
    font-size: 14px;
    color: #aaa;
    margin: 0;
}

/* ===== СТРАНИЦА ПРОСМОТРА ТРАНСЛЯЦИИ ===== */
.vhp-stream-page {
    max-width: 1920px;
    margin: 0 auto;
    padding: 24px;
}

.vhp-stream-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
}

/* Player Section */
.vhp-stream-player-section {
    min-width: 0;
}

.vhp-stream-player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vhp-stream-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.vhp-video-player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#vhp-stream-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Stream Info Bar */
.vhp-stream-info-bar {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.vhp-channel-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vhp-channel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #272727;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #3ea6ff;
}

.vhp-channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vhp-channel-details {
    flex: 1;
    min-width: 0;
}

.vhp-channel-details h2 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px;
}

.vhp-viewer-count {
    display: block;
}

.vhp-viewer-count > span {
    display: inline-block;
    vertical-align: middle;
}

.vhp-viewer-text {
    color: #f1f1f1;
    font-weight: 500;
    margin-left: 4px;
}

.vhp-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #cc0000;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vhp-live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.vhp-stream-details {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
}

.vhp-stream-details h1 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px;
}

.vhp-stream-channel-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.vhp-stream-channel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #272727;
    overflow: hidden;
}

.vhp-stream-channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vhp-stream-channel-text h2 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}

.vhp-stream-channel-text p {
    font-size: 13px;
    color: #aaa;
    margin: 0;
}

/* ===== ЧАТ ===== */
.vhp-stream-chat-section {
    background: #1a1a1a;
    border-radius: 12px;
    height: calc(100vh - 48px);
    max-height: 900px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 24px;
}

.vhp-chat-container {
    background: #1a1a1a;
    border-radius: 12px;
    height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vhp-chat-header {
    padding: 20px;
    border-bottom: 2px solid #272727;
    background: #1f1f1f;
}

.vhp-chat-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vhp-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0f0f0f;
}

.vhp-chat-messages::-webkit-scrollbar {
    width: 10px;
}

.vhp-chat-messages::-webkit-scrollbar-track {
    background: #0f0f0f;
}

.vhp-chat-messages::-webkit-scrollbar-thumb {
    background: #3f3f3f;
    border-radius: 5px;
}

.vhp-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.vhp-chat-message {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.vhp-chat-message:hover {
    background: #1a1a1a;
}

.vhp-chat-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #272727;
    overflow: hidden;
    flex-shrink: 0;
}

.vhp-chat-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vhp-chat-message-content {
    flex: 1;
    min-width: 0;
}

.vhp-chat-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.vhp-chat-message-username {
    font-size: 14px;
    font-weight: 700;
    color: #3ea6ff;
}

.vhp-chat-message-time {
    font-size: 11px;
    color: #666;
}

.vhp-chat-message-text {
    font-size: 14px;
    color: #f1f1f1;
    line-height: 1.5;
    word-wrap: break-word;
}

.vhp-chat-message-actions {
    display: none;
    gap: 4px;
}

.vhp-chat-message:hover .vhp-chat-message-actions {
    display: flex;
}

.vhp-chat-message-action {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    transition: background 0.2s, color 0.2s;
}

.vhp-chat-message-action:hover {
    background: #3f3f3f;
    color: #fff;
}

/* Chat Input */
.vhp-chat-input-wrapper {
    padding: 16px;
    border-top: 2px solid #272727;
    background: #1f1f1f;
}

.vhp-chat-input-form {
    display: flex;
    gap: 10px;
}

.vhp-chat-input {
    flex: 1;
    background: #272727;
    border: 2px solid #3f3f3f;
    border-radius: 8px;
    padding: 12px 16px;
    color: #f1f1f1;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.vhp-chat-input:focus {
    border-color: #3ea6ff;
    background: #2a2a2a;
}

.vhp-chat-input::placeholder {
    color: #666;
}

.vhp-chat-send-btn {
    background: #3ea6ff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vhp-chat-send-btn:hover {
    background: #2d8fd8;
    transform: translateY(-1px);
}

.vhp-chat-send-btn:active {
    transform: translateY(0);
}

.vhp-chat-send-btn:disabled {
    background: #3f3f3f;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.vhp-chat-login-message {
    text-align: center;
    padding: 12px;
    color: #aaa;
    font-size: 14px;
}

.vhp-chat-login-message a {
    color: #3ea6ff;
    text-decoration: none;
    font-weight: 600;
}

.vhp-chat-login-message a:hover {
    text-decoration: underline;
}

/* Chat Empty State */
.vhp-chat-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.vhp-chat-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.vhp-chat-empty p {
    font-size: 14px;
    margin: 0;
}

/* ===== OFFLINE STATE ===== */
.vhp-stream-offline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    background: #1a1a1a;
}

.vhp-stream-offline-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.vhp-stream-offline-title {
    font-size: 24px;
    color: #fff;
    margin: 0 0 8px;
}

.vhp-stream-offline-text {
    font-size: 14px;
    color: #aaa;
    margin: 0 0 24px;
}

.vhp-stream-offline-btn {
    display: inline-block;
    background: #3ea6ff;
    color: #fff;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.vhp-stream-offline-btn:hover {
    background: #2d8fd8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .vhp-stream-layout {
        grid-template-columns: 1fr 350px;
    }
    
    .vhp-stream-chat-section {
        max-height: 800px;
    }
}

@media (max-width: 968px) {
    .vhp-stream-layout {
        grid-template-columns: 1fr;
    }
    
    .vhp-stream-chat-section {
        height: 500px;
        max-height: 500px;
        position: static;
    }
}

@media (max-width: 768px) {
    .vhp-streams-container {
        padding: 12px;
    }
    
    .vhp-streams-header {
        margin-bottom: 20px;
    }
    
    .vhp-streams-header h1 {
        font-size: 24px;
    }
    
    .vhp-streams-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .vhp-stream-page {
        padding: 12px;
    }
    
    .vhp-stream-layout {
        gap: 16px;
    }
    
    .vhp-stream-player-wrapper,
    .vhp-video-player-wrapper {
        border-radius: 8px;
        margin-bottom: 12px;
    }
    
    .vhp-stream-chat-section {
        height: 400px;
        max-height: 400px;
    }
    
    .vhp-chat-header {
        padding: 12px 16px;
    }
    
    .vhp-chat-messages {
        padding: 12px;
    }
    
    .vhp-chat-input-wrapper {
        padding: 12px;
    }
    
    .vhp-channel-avatar {
        width: 48px;
        height: 48px;
    }
    
    .vhp-channel-details h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .vhp-streams-container {
        padding: 8px;
    }
    
    .vhp-streams-header h1 {
        font-size: 20px;
    }
    
    .vhp-streams-header p {
        font-size: 13px;
    }
    
    .vhp-stream-page {
        padding: 8px;
    }
    
    .vhp-stream-layout {
        gap: 12px;
    }
    
    .vhp-stream-player-wrapper,
    .vhp-video-player-wrapper {
        border-radius: 0;
        margin-bottom: 8px;
    }
    
    .vhp-stream-info-bar {
        padding: 12px;
    }
    
    .vhp-channel-avatar {
        width: 40px;
        height: 40px;
    }
    
    .vhp-channel-details h2 {
        font-size: 16px;
    }
    
    .vhp-stream-chat-section {
        height: 350px;
        max-height: 350px;
        border-radius: 8px;
    }
    
    .vhp-chat-header h3 {
        font-size: 14px;
    }
    
    .vhp-chat-messages {
        padding: 8px;
        gap: 8px;
    }
    
    .vhp-chat-message {
        padding: 6px;
    }
    
    .vhp-chat-message-avatar {
        width: 28px;
        height: 28px;
    }
    
    .vhp-chat-message-username {
        font-size: 12px;
    }
    
    .vhp-chat-message-text {
        font-size: 13px;
    }
    
    .vhp-chat-input-wrapper {
        padding: 8px;
    }
    
    .vhp-chat-input {
        font-size: 13px;
        padding: 8px 14px;
        border-radius: 20px;
    }
    
    .vhp-chat-send-btn {
        font-size: 13px;
        padding: 8px 16px;
        border-radius: 20px;
    }
    
    .vhp-stream-card {
        border-radius: 8px;
    }
    
    .vhp-stream-info {
        padding: 12px;
    }
    
    .vhp-stream-avatar {
        width: 36px;
        height: 36px;
    }
}

/* ===== VIDEO.JS OVERRIDES ===== */
.video-js {
    width: 100%;
    height: 100%;
}

.video-js .vjs-big-play-button {
    border: none;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-size: 48px;
}

.video-js .vjs-big-play-button:hover {
    background-color: rgba(62, 166, 255, 0.9);
}

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

.video-js .vjs-progress-control .vjs-play-progress {
    background-color: #cc0000;
}

.video-js .vjs-volume-level {
    background-color: #cc0000;
}

/* ===== TV CHANNEL CARDS (vhp-tv) ===== */
.vhp-tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.vhp-tv-card { background: #1a1a1a; border-radius: 8px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; text-decoration: none; color: inherit; display: block; }
.vhp-tv-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.vhp-tv-thumb { position: relative; width: 100%; padding-top: 52%; background: #272727; overflow: hidden; }
.vhp-tv-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.vhp-tv-info { padding: 8px 10px; }
.vhp-tv-name { font-size: 13px; font-weight: 700; margin: 0 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vhp-tv-status { font-size: 11px; color: #aaa; margin: 0; }.vhp-streams-empty-sub { margin: 8px 0 0; }

/* ===== CHAT ROLE BADGES & MOD ACTIONS ===== */
.vhp-chat-badge { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; font-size: 10px; font-weight: 800; margin-right: 4px; vertical-align: middle; color: #fff; line-height: 16px; }
.vhp-badge-admin { background: #d63638; }
.vhp-badge-sitemoder { background: #2271b1; }
.vhp-badge-channelmoder { background: #2e7d32; }
.vhp-name-admin { color: #ff6b6b !important; }
.vhp-name-sitemoder { color: #4d9fff !important; }
.vhp-name-channelmoder { color: #66d17a !important; }
.vhp-chat-actions { margin-left: 6px; white-space: nowrap; }
.vhp-mod-btn { background: #333; border: none; border-radius: 4px; cursor: pointer; font-size: 11px; padding: 2px 6px; opacity: 0.85; color: #ddd; margin-left: 4px; }
.vhp-mod-btn:hover { opacity: 1; background: #444; color: #fff; }
.vhp-mod-btn[data-act='ban'] { background: #5a2020; color: #ff9b9b; }
.vhp-mod-btn[data-act='ban']:hover { background: #7a2a2a; }
