/* ================================
   LiveTV Center – Dark UI (FULL)
================================ */

/* Reset */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0d0d0d;
    color: #f5f5f5;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =========================
   NAVBAR
========================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 14px 32px;
    height: 60px;
    background: #101010;
    border-bottom: 2px solid #c40000;
}

.nav-left {
    font-size: 26px;
    font-weight: 700;
    color: #ff3b3b;
    letter-spacing: 0.5px;
}

.nav-left span {
    color: #ffffff;
}

/* Category toggle button */
#catToggle {
    margin-left: auto;
    background: #181818;
    color: #ffffff;
    border: 1px solid #262626;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

#catToggle:hover {
    background: #262626;
    border-color: #ff3b3b;
}

/* =========================
   LAYOUT
========================= */

.layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* =========================
   SIDEBAR (CATEGORIES)
========================= */

.sidebar {
    width: 230px;
    background: #111111;
    border-right: 1px solid #202020;
    padding: 20px 18px;
    position: sticky;
    top: 60px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #ff5757;
    margin-bottom: 10px;
}

.sidebar-item {
    display: block;
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 8px;
    background: #181818;
    color: #dddddd;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #262626;
    transition: background 0.2s, transform 0.15s, border-color 0.2s;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: #282828;
    border-color: #ff3b3b;
    transform: translateX(2px);
}

/* Utility */
.hidden {
    display: none;
}

/* =========================
   MAIN CONTENT
========================= */

.content {
    flex: 1;
    padding: 26px 40px;
}

.page-title {
    font-size: 30px;
    font-weight: 600;
    margin: 0 0 14px 0;
}

.page-desc {
    color: #bbbbbb;
    margin-bottom: 18px;
}

/* =========================
   SEARCH INPUT
========================= */

.search-input {
    width: 100%;
    max-width: 320px;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid #333333;
    background: #181818;
    color: #f5f5f5;
    margin-bottom: 18px;
}

/* =========================
   COUNTRY GRID (INDEX)
========================= */

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px;
}

.country-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    border-radius: 12px;
    background: #151515;
    border: 1px solid #222222;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.country-card:hover {
    background: #222222;
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.country-flag {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 7px;
    margin-bottom: 10px;
}

.country-name {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

/* =========================
   CHANNEL CARDS (CHANNELS)
========================= */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.channel-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px 14px;
    border-radius: 12px;
    background: #151515;
    border: 1px solid #222222;
    text-decoration: none;
    color: #ffffff;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.channel-card:hover {
    background: #222222;
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
}

/* =========================
   WATCH PAGE LAYOUT
========================= */

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 300px;
    gap: 20px;
    align-items: stretch;
}

/* Player full height */
.player-wrapper {
    width: 100%;
    height: calc(100vh - 160px);
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #222222;
}

#player {
    width: 100%;
    height: 100%;
}

/* Right channel list */
.side-right {
    background: #151515;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #222222;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

.side-item {
    display: block;
    padding: 8px 10px;
    margin-bottom: 6px;
    background: #1b1b1b;
    border-radius: 6px;
    border: 1px solid #222222;
    text-decoration: none;
    color: #eeeeee;
    transition: background 0.2s, transform 0.15s;
}

.side-item:hover {
    background: #2b2b2b;
    transform: translateX(3px);
}

/* =========================
   FOOTER
========================= */

.footer {
    padding: 16px 40px 26px;
    color: #777777;
    font-size: 13px;
    border-top: 1px solid #222222;
    text-align: center;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        max-height: none;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #202020;
    }

    .content {
        padding: 20px;
    }

    .watch-layout {
        grid-template-columns: 1fr;
    }

    .player-wrapper,
    .side-right {
        height: auto;
        max-height: none;
    }
}
/* =========================
   CHANNEL CARD META (BADGE + FLAG)
   ========================= */

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.badge {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 999px;
    background: #262626;
    color: #cccccc;
}

.country-block {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #bbbbbb;
}

.flag-small {
    width: 18px;
    height: 14px;
    object-fit: cover;
    border-radius: 3px;
}
/* Watch sidebar channel item */

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

.side-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.side-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.side-name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-badge {
    display: inline-block;
    width: fit-content;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 999px;
    background: #262626;
    color: #cccccc;
}
/* ===============================
   CLAPPR VISIBILITY FIX
=============================== */

.player-wrapper {
    position: relative;
    width: 100%;
    min-height: 220px; /* fallback */
    background: #000;
}

#player {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Mobil üçün daha təhlükəsiz ölçü */
@media (max-width: 900px) {
    .player-wrapper {
        aspect-ratio: 16 / 9;
        min-height: 200px;
    }
}
.player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

#player,
#player video,
.player-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.page-desc {
  color: #bbb;
  margin-bottom: 20px;
  max-width: 900px;
}

.seo-text {
  margin-top: 50px;
  color: #aaa;
  font-size: 15px;
  line-height: 1.7;
  max-width: 900px;
}

.seo-text h2 {
  color: #fff;
  margin-bottom: 15px;
}
/* =========================
   NAVBAR LOGO LINK
========================= */
.nav-left,
.nav-left:hover,
.nav-left:focus,
.nav-left:active {
  text-decoration: none !important;
  color: #ffffff;
  cursor: pointer;
}

/* LIVE TV vurğusu */
.nav-left span {
  color: #ff3b3b;
}
/* =========================
   RESPONSIVE HEADINGS
========================= */

/* Desktop default */
.page-title,
h1 {
  font-size: 2.2rem;
  line-height: 1.3;
}

/* Tablet */
@media (max-width: 992px) {
  .page-title,
  h1 {
    font-size: 1.8rem;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .page-title,
  h1 {
    font-size: 1.4rem;
    line-height: 1.25;
  }
}
