/* ========================================
   প্রিমিয়াম IPTV স্টাইল - Bangla TV
   ======================================== */

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

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2332;
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-glass: rgba(255, 255, 255, 0.06);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-1: #f59e0b;
    --accent-2: #ef4444;
    --accent-gradient: linear-gradient(135deg, #f59e0b, #ef4444);
    --radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== টপ বার ===== */
.top-bar-full {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-glass);
    padding: 12px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 28px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand h1 {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.live-badge {
    background: #ef4444;
    color: #fff;
    padding: 2px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 50px;
    padding: 6px 16px;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-1);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 180px;
}

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

.search-icon {
    color: var(--text-muted);
    font-size: 14px;
}

.fullscreen-header-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.fullscreen-header-btn:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

/* ===== মেইন কন্টেইনার ===== */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* ===== প্লেয়ার ===== */
.player-section {
    margin-bottom: 28px;
}

.player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow);
}

#videoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-1);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.player-watermark {
    position: absolute;
    top: 16px;
    left: 20px;
    z-index: 5;
    background: rgba(239, 68, 68, 0.9);
    padding: 3px 14px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    animation: pulse-dot 2s infinite;
}

.fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* ===== চ্যানেল ইনফো বার ===== */
.channel-info-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    margin-top: 14px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
}

.current-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-card);
    padding: 6px;
    object-fit: contain;
}

.current-meta h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

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

/* ===== চ্যানেল গ্রিড ===== */
.channels-section {
    margin-top: 8px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-btn {
    padding: 5px 16px;
    border-radius: 50px;
    border: 1px solid var(--border-glass);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.75rem;
    font-weight: 500;
}

.filter-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
}

/* ===== চ্যানেল কার্ড ===== */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.channel-card {
    background: var(--bg-glass);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.channel-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.channel-card.active {
    background: rgba(245, 158, 11, 0.08);
    border-color: var(--accent-1);
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.06);
}

.channel-card img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-card);
    padding: 4px;
    object-fit: contain;
}

.channel-card span {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ===== ফুটার ===== */
.main-footer {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== ফুলস্ক্রিন মোড ===== */
.player-wrapper.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #000;
    padding-top: 0 !important;
    border-radius: 0 !important;
}

.player-wrapper.fullscreen-mode #videoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== রেসপনসিভ ===== */
@media (max-width: 768px) {
    .top-bar-full { padding: 10px 16px; }
    .main-container { padding: 12px 16px; }
    .search-box input { width: 120px; }
    .channel-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .channel-card { padding: 12px 10px; }
    .channel-card img { width: 32px; height: 32px; }
    .channel-card span { font-size: 0.75rem; }
    .brand h1 { font-size: 1rem; }
    .brand-icon { font-size: 22px; }
}

@media (max-width: 480px) {
    .top-bar-inner { flex-direction: column; align-items: stretch; }
    .header-actions { justify-content: space-between; }
    .search-box input { width: 100%; }
    .channel-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .channel-card { flex-direction: column; text-align: center; padding: 12px 8px; }
    .channel-card img { width: 36px; height: 36px; }
    .channel-info-bar { flex-direction: column; text-align: center; }
    .section-header { flex-direction: column; align-items: stretch; }
    .filter-tabs { justify-content: center; }
}