/* === Professional LiveTV Styles === */

:root {
    --bg-dark: #0d0d12;
    --bg-darker: #08080c;
    --bg-card: #13131a;
    --bg-card-hover: #1a1a24;
    --bg-sidebar: #101015;
    
    --gold: #d4af37;
    --gold-light: #f4d03f;
    --red: #e63946;
    --red-dark: #c1121f;
    --green: #2ecc71;
    --blue: #3498db;
    
    --text-white: #ffffff;
    --text-gray: #9ca3af;
    --text-muted: #6b7280;
    
    --border: #1f1f28;
    --border-light: #2a2a38;
    
    --left-sidebar: clamp(220px, 22vw, 260px);
    --right-sidebar: clamp(240px, 24vw, 280px);
    --center-padding: clamp(10px, 1.5vw, 18px);
    
    /* Eksik değişkenler (önceki sürümlerden kalan referanslar) */
    --bg-main: transparent;
    --accent: var(--gold);
    --accent-primary: var(--red);
    --text-primary: var(--text-white);
    
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-display: 'Bebas Neue', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-darker);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }

/* === App Layout === */
.app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* === Top Banner === */
.top-banner {
    background: linear-gradient(90deg, var(--gold) 0%, #b8860b 50%, var(--gold) 100%);
    padding: clamp(6px, 0.9vw, 10px) clamp(12px, 2vw, 20px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.3s ease;
    flex-shrink: 0;
}

.top-banner:hover {
    filter: brightness(1.1);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 28px);
    max-width: min(1400px, 100%);
    flex-wrap: wrap;
    justify-content: center;
}

.banner-logo {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.2vw, 1.65rem);
    color: var(--bg-dark);
    letter-spacing: 0.5px;
}

.banner-logo .x {
    color: var(--red);
    font-weight: 800;
}

.banner-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bg-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.banner-offer {
    font-size: 0.9rem;
    color: var(--bg-dark);
}

.banner-offer strong {
    font-weight: 800;
    font-size: 1.1rem;
}

.banner-btn {
    background: var(--bg-dark);
    color: var(--gold);
    border: none;
    padding: 8px 20px;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.banner-btn:hover {
    background: var(--text-white);
    color: var(--bg-dark);
    transform: scale(1.05);
}

/* === Main Layout === */
.main-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

/* === Left Sidebar === */
.left-sidebar {
    width: var(--left-sidebar);
    min-width: 200px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Now Playing - Sol Sidebar Alt */
.now-playing-sidebar {
    margin-top: auto;
    padding: 15px;
    background: linear-gradient(180deg, transparent 0%, rgba(255, 59, 48, 0.1) 100%);
    border-top: 1px solid var(--border);
}

.now-playing-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.now-playing-header .live-indicator {
    color: var(--accent-primary);
    animation: pulse 1.5s ease-in-out infinite;
}

.now-playing-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.now-playing-info img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-card);
}

.channel-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.channel-details .channel-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-details .channel-cat {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-header {
    padding: clamp(10px, 1.2vw, 16px) clamp(12px, 1.5vw, 18px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #ff4757 0%, #ff2d3a 50%, #c0392b 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: logoShine 3s infinite;
}

@keyframes logoShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

.logo-text {
    display: flex;
    align-items: baseline;
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo-text .tv {
    color: var(--text-white);
    font-weight: 700;
}

.logo-text .x {
    color: #ff4757;
    font-weight: 900;
    font-size: 1.8rem;
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.6);
    margin: 0 1px;
}

.logo-text .api {
    color: var(--text-white);
    font-weight: 700;
}

/* Eski stil için fallback */
.logo span {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 1px;
}

.logo .accent {
    color: #ff4757;
    font-weight: 900;
    font-size: 1.8rem;
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.6);
}

.search-box {
    padding: 10px clamp(12px, 1.5vw, 18px);
    position: relative;
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 38px 10px 12px;
    color: var(--text-white);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.categories {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.categories h3 {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.6px;
    padding: 8px clamp(12px, 1.5vw, 18px) 6px;
}

.category-accordion,
.channel-list {
    display: flex;
    flex-direction: column;
}

.category-wrapper {
    border-bottom: 1px solid var(--border);
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-gray);
}

.category-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-white);
}

.category-item.active {
    color: var(--red);
    background: rgba(230, 57, 70, 0.1);
}

.category-item .cat-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    padding: 6px;
    color: var(--text-gray);
}

.category-item .cat-icon svg {
    width: 100%;
    height: 100%;
}

.category-item:hover .cat-icon,
.category-item.active .cat-icon {
    color: var(--red);
    background: rgba(230, 57, 70, 0.15);
}

.category-item .cat-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.category-item .cat-count {
    font-size: 0.75rem;
    background: var(--bg-card);
    padding: 3px 8px;
    border-radius: 10px;
    color: var(--text-muted);
    margin-right: 10px;
}

.category-item .expand-icon {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.category-wrapper.expanded .expand-icon {
    transform: rotate(180deg);
}

.channel-submenu {
    display: none;
    background: var(--bg-darker);
}

.category-wrapper.expanded .channel-submenu {
    display: block;
}

.submenu-channel {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 52px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.submenu-channel:hover {
    background: var(--bg-card);
    color: var(--text-white);
}

.submenu-channel.active {
    color: var(--red);
    background: rgba(230, 57, 70, 0.1);
}

.submenu-channel img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

/* === Direct Channel List === */
.channel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px clamp(12px, 1.5vw, 18px);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border);
}

.channel-item:hover {
    background: var(--bg-card-hover);
}

.channel-item.active {
    background: rgba(230, 57, 70, 0.1);
    border-left: 3px solid var(--red);
    padding-left: 17px;
}

.channel-item img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-card);
    flex-shrink: 0;
}

.channel-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--bg-card);
    flex-shrink: 0;
}

.channel-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
    flex: 1;
}

.channel-item .channel-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-item .channel-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.channel-item.active .channel-name {
    color: var(--red);
    font-weight: 600;
}

.no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* === Center Content === */
.center-content {
    flex: 1;
    min-width: 0;
    padding: var(--center-padding);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.player-wrapper {
    max-width: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
    background: var(--bg-main);
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(6px, 1vw, 12px);
    gap: clamp(6px, 0.8vw, 10px);
}

/* Arka plan reklam linki */
/* Player Üst / Alt / Mobil ara reklam — aynı görünüm */
.player-ad-top,
.player-ad-bottom,
.player-ad-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 728px;
    height: 90px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px dashed var(--border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Ara reklam sadece mobilde */
.player-ad-mobile {
    display: none;
    flex-shrink: 0;
}

.player-ad-top:hover,
.player-ad-bottom:hover,
.player-ad-mobile:hover {
    border-color: var(--accent);
    background: linear-gradient(135deg, #1a1a2e 0%, #1a1a3e 100%);
}

.ad-placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Banner'a resim eklendiğinde */
.player-ad-top img,
.player-ad-bottom img,
.player-ad-mobile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-container {
    position: relative;
    background: #000;
    border-radius: clamp(8px, 1vw, 12px);
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    width: 100%;
    max-width: min(1080px, 100%);
    max-height: min(72vh, calc(100vh - 220px));
    flex-shrink: 0;
}

.player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 5;
}

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

.play-button-large {
    width: 80px;
    height: 80px;
    background: var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 40px rgba(230, 57, 70, 0.4);
}

.play-button-large:hover {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(230, 57, 70, 0.6);
}

.play-button-large svg {
    width: 32px;
    height: 32px;
    margin-left: 4px;
}

.player-overlay p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.loading-spinner {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Player Controls === */
.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    padding: 50px 15px 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 30;
}

.player-container:hover .player-controls,
.player-controls.visible {
    opacity: 1;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ctrl-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrl-btn:hover {
    background: var(--red);
    transform: scale(1.1);
}

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

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--red);
    border-radius: 50%;
    cursor: pointer;
}

.live-badge {
    background: var(--red);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

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

/* === Player Banner === */
.player-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45px;
    background: linear-gradient(90deg, var(--bg-dark) 0%, #1a1a24 50%, var(--bg-dark) 100%);
    border-top: 2px solid var(--red);
    display: flex;
    align-items: center;
    z-index: 20;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.player-banner:hover {
    background: linear-gradient(90deg, #1a1a30 0%, #252535 50%, #1a1a30 100%);
}

.banner-marquee {
    flex: 1;
    overflow: hidden;
    padding: 0 15px;
}

.marquee-track {
    display: flex;
    gap: 50px;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
}

.marquee-track span {
    color: var(--text-gray);
    font-size: 0.8rem;
    font-weight: 500;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.banner-cta {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 15px;
    background: linear-gradient(90deg, transparent, var(--gold));
    height: 100%;
}

.cta-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--bg-dark);
}

.cta-logo span {
    color: var(--red);
}

.cta-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--bg-dark);
    text-transform: uppercase;
}

/* === Now Playing === */
.now-playing {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    margin-top: 15px;
    border-top: 1px solid var(--border);
}

.now-playing img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-card);
}

.channel-info h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.channel-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Right Sidebar === */
.right-sidebar {
    width: var(--right-sidebar);
    min-width: 200px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: clamp(10px, 1.2vw, 14px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-header-right .live-dot {
    width: 10px;
    height: 10px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.sidebar-header-right h3 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-white);
}

.match-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 10px 10px;
}

/* === Match List === */
.match-item {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.match-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
    transform: translateX(-3px);
}

.match-item.live {
    border-left: 3px solid var(--red);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.match-league {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-time {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    color: var(--text-gray);
}

.match-time.live {
    background: var(--red);
    color: white;
    animation: pulse 2s infinite;
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-dark);
}

.team-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
}

.team-score {
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

.loading-matches,
.no-matches {
    text-align: center;
    padding: 30px 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.loading-matches::before {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    border: 2px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

/* === Quick Channels === */
.quick-channel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-channel:hover {
    background: var(--bg-card-hover);
    transform: translateX(-3px);
}

.quick-channel.active {
    border-left: 3px solid var(--red);
    background: rgba(230, 57, 70, 0.1);
}

.quick-channel img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
}

.quick-channel .ch-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
}

.quick-channel .ch-status {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

/* === Bottom Banner === */
.bottom-banner {
    background: linear-gradient(90deg, var(--gold) 0%, #b8860b 50%, var(--gold) 100%);
    padding: clamp(8px, 1vw, 12px) clamp(12px, 2vw, 20px);
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: filter 0.3s ease;
    flex-shrink: 0;
}

.bottom-banner:hover {
    filter: brightness(1.1);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 24px);
    max-width: min(1400px, 100%);
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--bg-dark);
}

.footer-logo .x {
    color: var(--red);
}

.footer-text {
    font-size: clamp(0.65rem, 1.1vw, 0.8rem);
    color: var(--bg-dark);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.35;
    max-width: 52ch;
}

.footer-btn {
    background: var(--bg-dark);
    color: var(--gold);
    border: none;
    padding: 8px 25px;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.footer-btn:hover {
    background: var(--text-white);
    color: var(--bg-dark);
}

/* === Error Modal === */
.error-modal {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--red);
    border-radius: 10px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}

.error-modal.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.error-icon {
    font-size: 1.5rem;
}

.error-content p {
    font-size: 0.9rem;
    color: var(--text-white);
}

/* === Fullscreen Styles === */
.player-container:fullscreen,
.player-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.player-container:fullscreen .player-controls,
.player-container:-webkit-full-screen .player-controls {
    position: fixed;
    bottom: 0;
    z-index: 2147483647;
}

.player-container:fullscreen .player-banner,
.player-container:-webkit-full-screen .player-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2147483646;
}

/* === Responsive === */
/* Laptop: daha dar yan sütunlar */
@media (max-width: 1366px) {
    :root {
        --left-sidebar: clamp(200px, 20vw, 240px);
        --right-sidebar: clamp(220px, 22vw, 260px);
    }
}

/* Orta genişlik: yan sütun dar, maç paneli gizli — sadece kanal listesi + oynatıcı */
@media (max-width: 1100px) {
    .right-sidebar {
        display: none;
    }
    
    .left-sidebar {
        width: clamp(200px, 30vw, 250px);
        min-width: 180px;
    }
}

@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Kanallar - Üstte Horizontal Slider */
    .left-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        order: 1;
        overflow: hidden;
    }
    
    .sidebar-header {
        padding: 8px 12px;
    }
    
    .logo {
        gap: 6px;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .logo span {
        font-size: 1.2rem;
    }
    
    .search-box {
        display: none;
    }
    
    .categories {
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
    }
    
    .categories h3 {
        padding: 8px 12px 4px;
        font-size: 0.6rem;
        letter-spacing: 1.5px;
    }
    
    #categoryList {
        display: flex;
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    #categoryList::-webkit-scrollbar {
        display: none;
    }
    
    .channel-item {
        flex: 0 0 100px;
        flex-direction: column;
        padding: 8px;
        border-bottom: none;
        border: 1px solid var(--border);
        border-radius: 8px;
        gap: 6px;
        scroll-snap-align: start;
        min-height: auto;
        background: var(--bg-card);
    }
    
    .channel-item img,
    .channel-placeholder {
        width: 45px;
        height: 45px;
        margin: 0 auto;
        border-radius: 6px;
    }
    
    .channel-info {
        text-align: center;
        gap: 2px;
    }
    
    .channel-item .channel-name {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.1;
    }
    
    .channel-item .channel-category {
        font-size: 0.6rem;
        letter-spacing: 0.3px;
    }
    
    .channel-item.active {
        border-color: var(--red);
        background: rgba(230, 57, 70, 0.1);
        border-width: 2px;
        padding: 7px;
    }
    
    .now-playing-sidebar {
        display: none;
    }
    
    /* Player - Ortada */
    .center-content {
        padding: 8px;
        order: 2;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-height: 0;
    }
    
    /* Üst + alt ara reklam: web ile aynı kutu (kanallar — player — maçlar arası) */
    .player-ad-top {
        display: flex;
        max-width: 100%;
        width: 100%;
        height: 90px;
        flex-shrink: 0;
        align-self: center;
    }
    
    .player-ad-mobile {
        display: flex;
        max-width: 100%;
        width: 100%;
        height: 90px;
        margin-top: 0;
        align-self: center;
    }
    
    .player-ad-top .ad-placeholder,
    .player-ad-mobile .ad-placeholder {
        font-size: 11px;
        letter-spacing: 1.2px;
        padding: 0 8px;
        text-align: center;
    }
    
    /* Canlı Maçlar - Altta Horizontal Slider */
    .right-sidebar {
        display: block;
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--border);
        order: 3;
        overflow: hidden;
    }
    
    .sidebar-header-right {
        padding: 8px 12px;
    }
    
    .sidebar-header-right h3 {
        font-size: 0.6rem;
        letter-spacing: 1.5px;
    }
    
    .match-list {
        display: flex;
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .match-list::-webkit-scrollbar {
        display: none;
    }
    
    .match-item {
        flex: 0 0 200px;
        margin-bottom: 0;
        padding: 10px;
        border-radius: 8px;
        scroll-snap-align: start;
    }
    
    .match-header {
        margin-bottom: 6px;
    }
    
    .match-league {
        font-size: 0.65rem;
    }
    
    .match-time {
        font-size: 0.65rem;
    }
    
    .team-row {
        padding: 4px 0;
    }
    
    .team-name {
        font-size: 0.75rem;
    }
    
    .team-score {
        font-size: 0.9rem;
    }
    
    .loading-matches,
    .no-matches {
        flex: 0 0 200px;
        font-size: 0.75rem;
        padding: 20px 10px;
    }
    
    .top-banner .banner-content {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 8px 10px;
    }
    
    .banner-logo {
        font-size: 1.4rem;
    }
    
    .banner-offer {
        font-size: 0.8rem;
    }
    
    .banner-offer strong {
        font-size: 0.95rem;
    }
    
    .banner-btn {
        padding: 6px 15px;
        font-size: 0.7rem;
    }
    
    .banner-text {
        display: none;
    }
    
    .player-wrapper {
        padding: 5px;
        gap: 8px;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        flex: 0 1 auto;
        min-height: 0;
    }
    
    /* Oynatıcı: yatayda ortalı, dar ekranda tam genişlik */
    .player-container {
        max-height: min(56vh, calc(100vh - 340px));
        border-radius: 10px;
        width: 100%;
        max-width: min(100%, 720px);
        margin-left: auto;
        margin-right: auto;
        align-self: center;
    }
    
    /* Çift reklam kutusu oynatıcı genişliğine hizalı */
    .player-ad-top,
    .player-ad-mobile {
        max-width: min(100%, 720px);
    }
    
    /* Üst/alt web placeholder — mobilde alttakini gizle (ara kutu player dışında kalıyor) */
    .player-ad-bottom {
        display: none !important;
    }
    
    /* Alt sarı SMSXAPI şeridi — mobilde gösterme */
    .bottom-banner {
        display: none !important;
    }
}

/* Notch / güvenli alan (mobil) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left, 0px));
        padding-right: max(0px, env(safe-area-inset-right, 0px));
    }
}
