/* ═══════════════════════════════════════════════════════════════════════════
   WATCH PAGE — watch.css
   Styles exclusive to the /watch page. Loaded only by watch.html.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Watch Grid Layout ──────────────────────────────────────────────────── */
.watch-grid {
    display: grid;
    grid-template-columns: 70px 1fr 340px;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 1.5rem auto;
    padding: 10px 1.5rem 1.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .watch-grid {
        grid-template-columns: 1fr;
    }
    .watch-left-sidebar {
        display: none !important;
    }
    .watch-sidebar {
        order: 5;
    }
    .player-column {
        order: 1;
    }
}

.player-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

/* ── Watch Left Sidebar (Actions) ────────────────────────────────────────── */
.watch-left-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: 110px;
    padding-top: 1rem;
}

.watch-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	margin-top: 10px;
}

.watch-action-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.watch-share-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.watch-action-btn.btn-back:hover { background: rgba(59, 130, 246, 0.15); border-color: rgba(59, 130, 246, 0.3); color: var(--accent-blue); }
.watch-action-btn.btn-twitter:hover { background: rgba(29, 161, 242, 0.15); border-color: rgba(29, 161, 242, 0.3); color: #1da1f2; }
.watch-action-btn.btn-facebook:hover { background: rgba(66, 103, 178, 0.15); border-color: rgba(66, 103, 178, 0.3); color: #4267b2; }
.watch-action-btn.btn-telegram:hover { background: rgba(0, 136, 204, 0.15); border-color: rgba(0, 136, 204, 0.3); color: #0088cc; }
.watch-action-btn.btn-copy:hover { background: rgba(16, 185, 129, 0.15); border-color: rgba(16, 185, 129, 0.3); color: #10b981; }
.watch-action-btn.btn-report:hover { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); color: var(--accent-red); }

/* ── Player ─────────────────────────────────────────────────────────────── */
.player-container {
    position: relative;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
}

.player-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    z-index: 10;
    pointer-events: none;
}

.player-header-overlay h2 { margin: 0; font-size: 1.2rem; font-weight: 700; color: #fff; }
.player-header-overlay p { margin: 4px 0 0; font-size: 0.85rem; color: rgba(255,255,255,0.6); font-weight: 600; }

.premium-player-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

#video-player {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    border-radius: 8px;
    overflow: hidden;
}

.iframe-player {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* ── Loading Overlay ─────────────────────────────────────────────────────── */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* ── Horizontal Stream Sources (Pills) ──────────────────────────────────── */
.watch-sources-container {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1.1rem;
}

.sources-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.sources-header h2 {
    margin: 0;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.source-scroll-wrapper {
    position: relative;
    width: 100%;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    padding: 0;
}

.scroll-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-btn.scroll-left {
    left: -8px;
}

.scroll-btn.scroll-right {
    right: -8px;
}

.scroll-btn svg {
    width: 18px;
    height: 18px;
}

.source-list-horizontal {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.2rem 0.1rem 0.5rem;
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
    width: 100%;
}

.source-list-horizontal::-webkit-scrollbar { display: none; }

.source-pill {
    flex: 0 0 auto;
    padding: 0.2rem 0.65rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 700;
}

.source-pill wa-icon {
    font-size: 11px;
}

.source-pill:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.source-pill.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* ── Match Description Block ────────────────────────────────────────────── */
.match-description-block {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.match-description-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-blue);
    opacity: 0.5;
}

.match-description-block h3 {
    margin-top: 0;
    margin-bottom: 0.85rem;
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.2px;
}

.match-description-block p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    text-wrap: balance;
}

/* ── Watch Sidebar ───────────────────────────────────────────────────────── */
.watch-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sources-count {
    background: rgba(16,185,129,0.1);
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ── Sidebar Footer ──────────────────────────────────────────────────────── */
.sidebar-footer { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.sidebar-footer p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; margin: 0; font-style: italic; }

/* ── Related Match Cards (Self-contained sidebar card) ───────────────────── */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Override global match-card entirely for sidebar context */
.related-list .match-card {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    padding: 0.8rem 0.9rem 0 !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255,255,255,0.07) !important;
    background: linear-gradient(135deg, rgba(30,41,59,0.5) 0%, rgba(15,23,42,0.9) 100%) !important;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    box-sizing: border-box;
}

.related-list .match-card:hover {
    border-color: rgba(255,255,255,0.15) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.related-list .match-card.is-live {
    border-color: rgba(239,68,68,0.25) !important;
}

.related-list .team-logo-container {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-list .team-logo-container img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.related-list .team-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    min-height: unset;
}

.related-list .match-card-logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.5rem 0 0.4rem;
    gap: 6px;
}

.related-list .team-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.related-list .match-score-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-list .live-score-val {
    font-size: 1rem;
    font-weight: 900;
    color: var(--accent-red);
    padding: 2px 6px;
}

.related-list .watch-title-vs {
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255,255,255,0.3);
    letter-spacing: 2px;
}

.related-list .upcoming-time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.04);
    padding: 3px 7px;
    border-radius: 6px;
}

.related-list .time-date {
    font-size: 0.58rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.related-list .time-clock {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-primary);
}

.related-list .match-card-action-row {
    margin-left: -0.9rem !important;
    margin-right: -0.9rem !important;
    margin-top: auto;
    width: calc(100% + 1.8rem) !important;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.related-list .watch-now-btn,
.related-list .upcoming-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 7px 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.related-list .watch-now-btn {
    color: var(--accent-red);
}

.related-list .upcoming-btn {
    color: var(--text-secondary);
}

.related-list .match-card:hover .watch-now-btn {
    color: #fff;
    background: rgba(239,68,68,0.1);
}

.related-list .card-league-header {
    margin: 0.3rem 0 0.2rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.related-list .card-league-top {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.related-list .match-card-single-event {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0.5rem 6px 0.3rem;
    gap: 4px;
}

.related-list .team-name-centered {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}

/* ── Header Override (watch page uses positioned header) ─────────────────── */
.app-header.watch-header-override {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    margin: 1.2rem auto 2rem auto;
    width: calc(100% - (var(--container-padding) * 2));
    z-index: 1000;
}

/* ── ════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .watch-grid {
        grid-template-columns: 1fr;
    }

    .watch-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .watch-sidebar > .sidebar-card:last-child {
        grid-column: 1 / -1;
    }
	.player-column .breadcrumb-nav {
		text-align:center;
	}
}

@media (max-width: 768px) {
    .watch-grid {
        padding: 20px 1rem 1rem;
        gap: 1.25rem;
        margin-top: 2rem;
    }

    .watch-sidebar {
        display: flex;
        flex-direction: column;
    }

    .app-header.watch-header-override {
        margin: 0;
        width: 100%;
        position: fixed;
        top: 0;
        left: 0;
        border-radius: 0;
    }
    
    .player-title-block {
         padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .watch-grid { padding: 75px 0.75rem 1rem; }
}

/* ════════════════════════════════════════════════════════════════════════════
   LIGHT MODE OVERRIDES
   ════════════════════════════════════════════════════════════════════════════ */

html.light-mode .sidebar-card {
    background: rgba(255,255,255,0.92);
    border-color: rgba(0,0,0,0.08);
}

html.light-mode .sidebar-header h3 { color: #0f172a; }
html.light-mode .sidebar-footer p { color: #64748b; }
html.light-mode .sources-count { background: rgba(16,185,129,0.12); color: #059669; }


html.light-mode .source-card:hover {
    background: rgba(59,130,246,0.08);
    border-color: var(--accent-blue);
}

html.light-mode .source-card.active {
    background: rgba(59,130,246,0.14);
    border-color: var(--accent-blue);
    color: #0f172a;
}
html.light-mode .source-pill {
	border:1px solid rgb(0 0 0 / 27%);
}
html.light-mode .source-pill:hover {
	border:1px solid rgb(0 0 0 / 27%);
}

html.light-mode .source-icon { color: #475569; }
html.light-mode .source-info h4 { color: #0f172a; }

html.light-mode .share-adaptive-panel {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.08);
}

html.light-mode .social-btn {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
    color: #475569;
}

html.light-mode .social-btn:hover { color: #fff; }

html.light-mode .social-btn.btn-twitter:hover { border-color: rgba(29,161,242,0.5); background: rgba(29,161,242,0.08); }
html.light-mode .social-btn.btn-facebook:hover { border-color: rgba(66,103,178,0.5); background: rgba(66,103,178,0.08); }
html.light-mode .social-btn.btn-telegram:hover { border-color: rgba(0,136,204,0.5); background: rgba(0,136,204,0.08); }
html.light-mode .social-btn.btn-copy:hover { border-color: rgba(16,185,129,0.5); background: rgba(16,185,129,0.08); }

html.light-mode .rmc-title { color: #0f172a; }

html.light-mode .related-match-card {
    background: rgba(255,255,255,0.9);
    border-color: rgba(0,0,0,0.08);
}

html.light-mode .related-match-card:hover {
    background: #fff;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    border-color: rgba(0,0,0,0.14);
}

html.light-mode .loading-overlay { background: #fefefe; border-radius: 12px; }
html.light-mode .loading-overlay p { color: rgba(0,0,0,0.5); }

html.light-mode .player-container {
    background: #fefefe;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(15,23,42,0.25);
    outline: 1px solid rgba(0,0,0,0.18);
}

html.light-mode #player-wrapper,
html.light-mode .premium-player-wrapper {
    background: #fefefe;
    border-radius: 12px;
    overflow: hidden;
}

html.light-mode .stream-info h2 { color: #0f172a; }
html.light-mode #match-title { color: #0f172a; }

/* ── New Premium Watch Header ── */
.player-title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.2rem;
}

.match-meta-info-row {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 0.5rem;
}

.watch-title-container {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: center;
    width: 100%;
}

#match-title {
    font-size: clamp(1.2rem, 2vw, 2rem);
    font-weight: 950;
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.watch-title-score {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--accent-red);
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    padding: 2px 10px;
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    -webkit-text-fill-color: var(--accent-red);
	letter-spacing: 3px;
}

.watch-title-vs {
    font-size: 0.5em;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.3);
}

.watch-title-logo {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.watch-title-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

/* Removed match-meta-stack as per layout change */

.match-league-tag {
    font-size: 0.68rem;
    font-weight: 900;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.9;
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.05);
}

#match-sport {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-blue);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .watch-title-container {
        flex-direction: row;
        gap: 12px;
    }
    .match-meta-stack {
        align-items: flex-start;
    }
	.breadcrumb-nav {
		display:none;
	}
	.player-column {
		text-align:center;
	}
	#match-title {
		font-size:0.9rem;
	}
	.watch-title-logo {
		width:35px;
		height:35px;
	}
	.watch-title-logo img {
		width:23px;
		height:23px;
	}
	.watch-title-score {
		font-size:0.9rem;
	}
}
