/* ============================================================
   VIDIO – Premium Stremio-Style Web Player CSS
   ============================================================ */

/* ---- CSS Variables / Design Tokens ---- */
:root {
    --bg-body: #0a0a0f;
    --bg-surface: #141420;
    --bg-card: #1a1a2e;
    --bg-overlay: rgba(10, 10, 15, .92);
    --bg-glass: rgba(20, 20, 32, .75);

    --accent: #7b68ee;
    --accent-glow: rgba(123, 104, 238, .35);
    --accent-dark: #5a4ac5;

    --text-primary: #f0f0f5;
    --text-secondary: #9898a8;
    --text-muted: #606070;

    --gold: #f5c518;
    --success: #00c853;
    --danger: #ff5252;

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: .25s cubic-bezier(.4, 0, .2, 1);

    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --sidebar-width: 260px;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button {
    font-family: inherit;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .12);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .25);
}

/* ---- Layout ---- */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---- Top Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 32px;
    background: linear-gradient(180deg, rgba(10, 10, 15, .95) 0%, transparent 100%);
    z-index: 500;
    transition: background var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, .97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.navbar__logo {
    display: flex;
    align-items: center;
    margin-right: 40px;
    text-decoration: none;
}

.navbar__logo img {
    height: 32px;
    object-fit: contain;
}

.navbar__search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

.navbar__search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: .92rem;
    transition: all var(--transition);
}

.navbar__search input:focus {
    outline: none;
    background: rgba(255, 255, 255, .12);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.navbar__search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.navbar__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar__actions a {
    color: var(--text-secondary);
    font-size: .9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.navbar__actions a:hover {
    color: var(--text-primary);
}

/* ---- Main Content ---- */
.main-content {
    padding-top: 0;
}

/* ---- Hero Banner ---- */
.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
    margin-bottom: 8px;
}

.hero__backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    transition: opacity 1s ease;
}

.hero__gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, var(--bg-body) 0%, transparent 45%),
        linear-gradient(90deg, rgba(10, 10, 15, .85) 0%, transparent 60%),
        linear-gradient(180deg, rgba(10, 10, 15, .4) 0%, transparent 30%);
}

.hero__content {
    position: absolute;
    bottom: 60px;
    left: 48px;
    max-width: 550px;
    z-index: 2;
}

.hero__title {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, .6);
    letter-spacing: -1px;
}

.hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: .88rem;
    color: var(--text-secondary);
}

.hero__meta .imdb {
    background: var(--gold);
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: .78rem;
}

.hero__genres {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.hero__genres span {
    padding: 4px 14px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    font-size: .78rem;
    color: var(--text-secondary);
}

.hero__desc {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
}

.hero__actions {
    display: flex;
    gap: 12px;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-play:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.hero__dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.hero__dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .3);
    cursor: pointer;
    transition: all var(--transition);
}

.hero__dots span.active {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* ---- Search Results Overlay (Modal) ---- */
.search-results {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
    animation: fadeIn .3s ease;
}

.search-results.active {
    display: flex;
}

.search-results__panel {
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 1100px;
    min-height: 300px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
    margin-top: 40px;
}

.search-results__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.08);
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.search-results__close:hover {
    background: rgba(255,255,255,.15);
}

.search-results__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-right: 40px;
}

.search-results__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

@media (min-width: 768px) {
    .search-results__grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* ---- Catalog Rows ---- */
.catalog-section {
    padding: 0 32px;
    margin-bottom: 36px;
}

.catalog-section__header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}

.catalog-section__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.catalog-section__addon {
    font-size: .78rem;
    color: var(--text-muted);
}

.catalog-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.catalog-row__scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding-bottom: 16px; /* Nagyobb padding, hogy kilogjon a box, és a scroller ne lógjon rá */
    margin-bottom: 5px;
    scrollbar-width: thin; /* Firefox vékony scroller */
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(255, 255, 255, 0.05); /* Firefox scroller colors */
}

/* Chrome/Safari scroller styling */
.catalog-row__scroll::-webkit-scrollbar {
    height: 8px; /* Látható scroller magasság */
    display: block; /* Visszaállítjuk, mert eddig none volt */
}
.catalog-row__scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.catalog-row__scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.catalog-row__scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lazy-loading-box {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ---- Poster Card ---- */
.poster-card {
    flex-shrink: 0;
    width: 150px;
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform var(--transition);
    user-select: none; /* Kijelölés tiltása húzáskor */
    -webkit-user-drag: none;
}

.poster-card--load-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 225px; /* Ugyanaz mint a poster img */
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.4) 0%, rgba(26, 26, 46, 0.9) 100%);
    border: 1px solid rgba(123, 104, 238, 0.3);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    padding: 15px;
    transition: all var(--transition);
}
.poster-card--load-more:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(123, 104, 238, 0.6) 0%, rgba(26, 26, 46, 0.9) 100%);
    box-shadow: 0 8px 24px rgba(123, 104, 238, 0.4);
    z-index: 2;
}
.poster-card--load-more svg {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
    fill: currentColor;
}

.poster-card:hover {
    transform: scale(1.08);
    z-index: 2;
}

.poster-card__img {
    width: 150px;
    height: 225px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-card);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
    transition: box-shadow var(--transition);
}

.poster-card:hover .poster-card__img {
    box-shadow: 0 8px 30px rgba(123, 104, 238, .25);
}

.poster-card__title {
    margin-top: 8px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poster-card__year {
    font-size: .72rem;
    color: var(--text-muted);
}

/* ---- Detail Modal / Overlay ---- */
.detail-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 40px;
    animation: fadeIn .3s ease;
}

.detail-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.detail-panel {
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    display: flex;
    gap: 32px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
    animation: slideUp .35s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
}

.detail-panel__left {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.detail-panel__poster {
    width: 180px;
    height: 270px;
    border-radius: var(--radius);
    object-fit: cover;
    float: left;
    margin-right: 24px;
    margin-bottom: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
}

.detail-panel__title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px;
}

.detail-panel__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: .85rem;
    color: var(--text-secondary);
}

.detail-panel__meta .imdb {
    background: var(--gold);
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800;
    font-size: .78rem;
}

.detail-panel__genres {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.detail-panel__genres span {
    padding: 3px 12px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 16px;
    font-size: .75rem;
    color: var(--text-secondary);
}

.detail-panel__desc {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    clear: both;
}

.detail-panel__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, .1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background var(--transition);
    z-index: 10;
}

.detail-panel__close:hover {
    background: rgba(255, 255, 255, .2);
}

/* ---- Streams Sidebar (right side of detail) ---- */
.detail-panel__right {
    width: 380px;
    background: rgba(0, 0, 0, .3);
    padding: 32px 24px;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    flex-direction: column;
}

.streams-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.streams-loading {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
}

/* Season Picker Header */
.season-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, .05);
    padding: 10px 16px;
    border-radius: 24px;
    margin-bottom: 20px;
}

.season-picker button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 800;
    transition: color var(--transition);
}

.season-picker button:hover {
    color: var(--text-primary);
}

.season-picker select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: .95rem;
    width: 140px;
    text-align: center;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%239898a8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 10px auto;
    padding-right: 25px;
}

.season-picker select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* Episode Item 2.0 (Redesigned) */
.episode-panel2 {
    display: flex;
    flex-direction: column;
}

.episode-list2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ep2-item {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
    border: 1px solid transparent;
}

.ep2-item:hover {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .08);
}

.ep2-thumb {
    width: 130px;
    height: 75px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.ep2-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.ep2-item:hover .ep2-thumb img {
    transform: scale(1.05);
}

.ep2-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ep2-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.ep2-date {
    font-size: .78rem;
    color: var(--text-muted);
}

/* Return Button */
.btn-back {
    background: rgba(255, 255, 255, .08);
    border: none;
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-back:hover {
    background: rgba(123, 104, 238, .3);
    color: #fff;
}

/* Stream Card */
.stream-group, .stream-card {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, .04);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all var(--transition);
    cursor: pointer;
}

.stream-card:hover {
    background: rgba(123, 104, 238, .12);
    border-color: var(--accent);
}

.stream-card-title {
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    word-break: break-word;
}

.stream-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stream-duration {
    font-size: .8rem;
    color: var(--text-muted);
}

.stream-quality-wrap {
    display: flex;
    align-items: center;
}

.stream-quality-select {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 10px auto;
    padding-right: 28px;
    transition: background var(--transition);
}
.stream-quality-select:hover {
    background-color: rgba(255, 255, 255, .15);
}
.stream-quality-select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.stream-quality-badge {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
}

/* ---- Embedded Video Player ---- */
.player-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    z-index: 300;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.player-overlay.active {
    display: flex;
}

.player-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 16px 60px rgba(0, 0, 0, .8);
}

.player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* GPU compositing kikényszerítése – tearing fix gyors mozgásnál */
    will-change: transform;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.player-title {
    margin-top: 16px;
    font-size: .95rem;
    color: var(--text-secondary);
    text-align: center;
}

.player-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background var(--transition);
    z-index: 10;
}

.player-close:hover {
    background: rgba(255, 255, 255, .15);
}

.player-next-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: .95rem;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition);
}

.player-next-btn:hover {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255,255,255,.3);
}

.player-external-btn {
    position: absolute;
    top: 12px;
    right: 65px;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: .95rem;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.player-external-btn:hover {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255,255,255,.3);
    color: #fff;
}

/* ---- Autoplay Toggle ---- */
.autoplay-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
    margin-right: 20px;
}

.autoplay-wrap label {
    font-size: .85rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.autoplay-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.autoplay-switch input { display: none; }

.autoplay-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.12);
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition);
}

.autoplay-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition);
}

.autoplay-switch input:checked + .autoplay-slider {
    background: var(--accent);
}

.autoplay-switch input:checked + .autoplay-slider::before {
    transform: translateX(18px);
}

.autoplay-next-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: .95rem;
    z-index: 1100;
    animation: toastIn .4s ease;
    border: 1px solid rgba(255,255,255,.1);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- Loading Spinner ---- */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, .1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 40px auto;
}

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

/* ---- Utility ---- */
.hidden {
    display: none !important;
}

/* ---- Nav Login / User Button ---- */
.nav-login-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-size: .9rem;
}
.nav-login-btn:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.nav-user-btn {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--text-primary);
    padding: 6px 16px;
    border-radius: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    transition: all var(--transition);
}
.nav-user-btn:hover {
    background: rgba(255,255,255,.12);
    border-color: var(--accent);
}
.nav-user-rank { font-size: .7rem; padding: 2px 8px; border-radius: 10px; }
.badge-inactive { background: #333; color: #888; }
.badge-user { background: #1e3a5f; color: #5dade2; }
.badge-elite { background: #1e5f3a; color: #2ecc71; }
.badge-premium { background: #5f4a1e; color: #f39c12; }
.badge-admin { background: #5f1e1e; color: #e74c3c; }

/* ---- Auth Modal ---- */
.auth-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(8px);
    z-index: 250;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.auth-overlay.active { display: flex; }
.auth-modal {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: slideUp .3s ease;
}
.auth-modal__close {
    position: absolute; top: 12px; right: 12px;
    background: none; border: none; color: #fff;
    font-size: 1.4rem; cursor: pointer; opacity: .5;
}
.auth-modal__close:hover { opacity: 1; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-form h2 { margin-bottom: 20px; font-size: 1.4rem; }
.auth-form input {
    width: 100%; padding: 12px 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-sm);
    color: #fff; font-size: .95rem;
    margin-bottom: 12px;
    transition: border-color var(--transition);
}
.auth-form input:focus { outline: none; border-color: var(--accent); }
.auth-form input::placeholder { color: var(--text-muted); }
.auth-btn {
    width: 100%; padding: 14px;
    background: var(--accent);
    color: #fff; border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem; font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 4px;
}
.auth-btn:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.auth-switch { text-align: center; margin-top: 16px; color: var(--text-muted); font-size: .85rem; }
.auth-switch a { color: var(--accent); cursor: pointer; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.auth-error { color: var(--danger); text-align: center; margin-bottom: 12px; font-size: .9rem; min-height: 0; }
.auth-success { color: var(--success); text-align: center; margin-bottom: 12px; font-size: .9rem; padding: 12px; border: 1px solid var(--success); border-radius: var(--radius-sm); }

/* ---- User Menu Panel ---- */
.user-menu-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
    z-index: 600;
    display: none;
    justify-content: flex-end;
}
.user-menu-overlay.active { display: flex; }
.user-menu-panel {
    width: 380px; max-width: 90vw;
    background: var(--bg-surface);
    height: 100%; overflow-y: auto;
    padding: 32px 24px;
    position: relative;
    animation: slideLeft .3s ease;
}
@keyframes slideLeft { from { transform: translateX(100%); } to { transform: translateX(0); } }
.user-menu-close {
    position: absolute; top: 12px; right: 12px;
    background: none; border: none; color: #fff;
    font-size: 1.3rem; cursor: pointer; opacity: .5;
}
.user-menu-close:hover { opacity: 1; }
.um-header h2 { font-size: 1.3rem; margin-bottom: 4px; }
.um-rank { font-size: .75rem; padding: 3px 10px; border-radius: 12px; display: inline-block; margin-bottom: 8px; }
.um-email { color: var(--text-muted); font-size: .85rem; }
.um-verified { color: var(--success); font-size: .8rem; }
.um-unverified { color: var(--danger); font-size: .8rem; }
.um-divider { border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 20px 0; }
.um-section { margin-bottom: 20px; }
.um-section h3 { font-size: .95rem; margin-bottom: 10px; color: var(--text-primary); }
.um-section h4 { font-size: .85rem; margin: 12px 0 8px; color: var(--text-secondary); }
.um-section-sub { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.05); }
.um-input {
    width: 100%; padding: 10px 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-sm);
    color: #fff; font-size: .9rem;
    margin-bottom: 10px;
}
.um-input:focus { outline: none; border-color: var(--accent); }
.um-btn {
    display: block; width: 100%;
    padding: 10px 16px;
    background: var(--accent); color: #fff;
    border: none; border-radius: var(--radius-sm);
    font-weight: 600; cursor: pointer;
    font-size: .9rem;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
}
.um-btn:hover { background: var(--accent-dark); }
.um-logout-btn { background: var(--danger); }
.um-logout-btn:hover { background: #c0392b; }
.um-admin-btn { background: #2d3748; }
.um-admin-btn:hover { background: #4a5568; }
.um-msg { margin-top: 8px; font-size: .85rem; min-height: 0; }
.um-msg.success { color: var(--success); }
.um-msg.error { color: var(--danger); }
.um-invite-list { max-height: 200px; overflow-y: auto; }
.um-invite-item { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: .8rem; }
.um-invite-code { font-family: monospace; color: var(--accent); font-weight: 700; user-select: all; }
.um-invite-used { color: var(--success); }
.um-invite-free { color: var(--text-muted); }
.um-invite-date { color: var(--text-muted); margin-left: auto; }

/* Sidebar minimal action buttons */
.um-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.um-settings-btn {
    background: linear-gradient(135deg, rgba(123,104,238,.2), rgba(123,104,238,.05)) !important;
    border: 1px solid rgba(123,104,238,.3) !important;
    color: var(--text-primary) !important;
}
.um-settings-btn:hover {
    background: linear-gradient(135deg, rgba(123,104,238,.35), rgba(123,104,238,.1)) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* ---- User Settings Full-Screen Overlay ---- */
.us-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-body);
    z-index: 610;
    display: none;
    overflow-y: auto;
    animation: usFadeIn .3s ease;
}
.us-overlay.active { display: block; }
@keyframes usFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.us-panel {
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.us-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.us-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}
.us-back-btn {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: 24px;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.us-back-btn:hover {
    background: rgba(255,255,255,.12);
    border-color: var(--accent);
}

.us-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
    margin-bottom: 28px;
}
.us-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), rgba(123,104,238,.4));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.us-username {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.us-email {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.us-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.us-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color var(--transition);
}
.us-card:hover {
    border-color: rgba(255,255,255,.12);
}
.us-card h3 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
}

/* Manifest links in settings */
.us-manifest-item {
    margin-bottom: 14px;
}
.us-manifest-item:last-child { margin-bottom: 0; }
.us-manifest-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.us-manifest-url {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.us-manifest-url .um-input {
    flex: 1;
    font-family: monospace;
    user-select: all;
}

/* Responsive */
@media (max-width: 640px) {
    .us-panel { padding: 20px 16px 60px; }
    .us-header h2 { font-size: 1.1rem; }
    .us-user-info { flex-direction: column; text-align: center; }
}

/* ---- Catalog Row (app.js layout) ---- */
.catalog-row {
    padding: 0 32px;
    margin-bottom: 28px;
}
.catalog-row__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.catalog-row__scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.catalog-row__scroll::-webkit-scrollbar { display: none; }

/* Poster card name (app.js uses poster-card__name) */
.poster-card__name {
    margin-top: 8px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Detail Info (app.js generated) ---- */
.detail-bg {
    width: 100%; height: 280px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}
.detail-info { padding: 0; }
.detail-title { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.detail-meta { display: flex; gap: 10px; margin-bottom: 10px; color: var(--text-secondary); font-size: .85rem; align-items: center; }
.detail-meta .imdb { background: var(--gold); color: #000; padding: 2px 8px; border-radius: 4px; font-weight: 800; font-size: .78rem; }
.detail-genres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.genre-tag { padding: 3px 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 16px; font-size: .75rem; color: var(--text-secondary); }
.detail-desc { font-size: .9rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.detail-cast { font-size: .85rem; color: var(--text-muted); margin-bottom: 6px; }
.detail-cast strong { color: var(--text-secondary); }

/* ---- Episode Panel (app.js generated) ---- */
.episode-panel { padding: 0; }
.season-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,.1); flex-wrap: wrap; }
.season-tab {
    padding: 8px 18px; background: none; border: none;
    color: var(--text-muted); font-weight: 600; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition); font-size: .85rem;
}
.season-tab:hover { color: var(--text-primary); }
.season-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.ep-number { font-size: .75rem; color: var(--accent); font-weight: 700; min-width: 50px; }
.ep-title { flex: 1; font-size: .85rem; font-weight: 500; }
.ep-desc { font-size: .75rem; color: var(--text-muted); display: block; margin-top: 2px; }

/* ---- Stream List (app.js generated) ---- */
.stream-list h3, .stream-list h4 { margin-bottom: 12px; }
.stream-ep-title { color: var(--accent); font-size: .95rem; margin-bottom: 8px; }
.stream-btn {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 12px 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer; margin-bottom: 8px;
    transition: all var(--transition);
    text-align: left;
}
.stream-btn:hover {
    background: rgba(123,104,238,.12);
    border-color: var(--accent);
}
.stream-title { font-weight: 600; font-size: .9rem; }
.stream-addon { font-size: .75rem; color: var(--text-muted); }
.stream-loading { text-align: center; padding: 40px 0; color: var(--text-muted); }
.no-streams { text-align: center; padding: 40px 20px; color: var(--text-muted); }

/* ---- Auth Required Message ---- */
.auth-required {
    text-align: center;
    padding: 40px 20px;
}
.auth-required h3 { margin-bottom: 12px; color: var(--text-primary); }
.auth-required p { margin-bottom: 20px; color: var(--text-secondary); font-size: .9rem; }
.auth-required .auth-btn { max-width: 200px; margin: 0 auto; display: block; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero {
        height: 360px;
    }

    .hero__title {
        font-size: 1.8rem;
    }

    .hero__content {
        left: 24px;
        bottom: 40px;
        max-width: 90%;
    }

    .catalog-section {
        padding: 0 16px;
    }

    .navbar {
        padding: 0 16px;
    }

    .navbar__search {
        max-width: 100%;
    }

    .detail-overlay {
        padding: 16px;
    }

    .detail-panel {
        flex-direction: column;
        max-height: 95vh;
    }

    .detail-panel__right {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, .06);
    }

    .detail-panel__poster {
        width: 120px;
        height: 180px;
    }

    .player-overlay {
        padding: 16px;
    }
}

/* ============================================================
   IPTV VIEW — Content Tabs + Live Channel Browser
   ============================================================ */

/* Content Type Tabs (Filmek / Sorozatok / IPTV) */
.content-tabs {
    display: flex;
    gap: 4px;
    padding: 0 32px;
    margin-bottom: 8px;
    position: relative;
    z-index: 10;
}

.content-tab {
    padding: 10px 28px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    color: var(--text-secondary);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-tab:hover {
    background: rgba(255, 255, 255, .1);
    color: var(--text-primary);
}

.content-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.content-tab__icon {
    font-size: 1.1rem;
}

/* IPTV Main Layout */
.iptv-view {
    display: flex;
    gap: 0;
    padding: 0 32px;
    min-height: 70vh;
}

/* Left: Channel List */
.iptv-sidebar {
    width: 420px;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding-right: 16px;
    border-right: 1px solid rgba(255,255,255,.06);
}

.iptv-category {
    margin-bottom: 8px;
}

.iptv-category__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,.04);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}

.iptv-category__header:hover {
    background: rgba(255,255,255,.08);
}

.iptv-category__icon {
    font-size: 1.2rem;
}

.iptv-category__name {
    font-weight: 700;
    font-size: .95rem;
    flex: 1;
}

.iptv-category__count {
    font-size: .78rem;
    color: var(--text-muted);
    background: rgba(255,255,255,.06);
    padding: 2px 10px;
    border-radius: 12px;
}

.iptv-category__arrow {
    color: var(--text-muted);
    font-size: .8rem;
    transition: transform var(--transition);
}

.iptv-category.open .iptv-category__arrow {
    transform: rotate(180deg);
}

.iptv-category__list {
    display: none;
    flex-direction: column;
    padding: 4px 0 4px 8px;
}

.iptv-category.open .iptv-category__list {
    display: flex;
}

/* Channel Item */
.iptv-channel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    position: relative;
}

.iptv-channel:hover {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.08);
}

.iptv-channel.active {
    background: rgba(123, 104, 238, .12);
    border-color: var(--accent);
}

.iptv-channel__logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: contain;
    background: #111;
    flex-shrink: 0;
}

.iptv-channel__info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.iptv-channel__name {
    font-weight: 600;
    font-size: .88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.iptv-channel__now {
    font-size: .78rem;
    color: var(--success);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.iptv-channel__next {
    font-size: .72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* EPG Progress Bar (tiny inline) */
.iptv-progress {
    width: 50px;
    height: 3px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
    flex-shrink: 0;
}

.iptv-progress__bar {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 1s linear;
}

/* Right: EPG Detail + Streams */
.iptv-detail {
    flex: 1;
    padding: 0 0 0 24px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.iptv-detail__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-muted);
    text-align: center;
    gap: 12px;
}

.iptv-detail__empty-icon {
    font-size: 3rem;
    opacity: .4;
}

/* Channel Header in Detail */
.iptv-detail__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.iptv-detail__logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: contain;
    background: #111;
}

.iptv-detail__name {
    font-size: 1.4rem;
    font-weight: 800;
}

/* EPG Program List */
.iptv-epg-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 24px;
}

.iptv-epg-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background var(--transition);
    font-size: .88rem;
}

.iptv-epg-item:hover {
    background: rgba(255,255,255,.04);
}

.iptv-epg-item.current {
    background: rgba(123, 104, 238, .1);
    border-left: 3px solid var(--accent);
}

.iptv-epg-item__time {
    width: 80px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 500;
    padding-top: 1px;
}

.iptv-epg-item.current .iptv-epg-item__time {
    color: var(--accent);
    font-weight: 700;
}

.iptv-epg-item__title {
    flex: 1;
    color: var(--text-secondary);
}

.iptv-epg-item.current .iptv-epg-item__title {
    color: var(--text-primary);
    font-weight: 600;
}

.iptv-epg-item__progress {
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,.1);
    border-radius: 2px;
    margin-top: 8px;
    flex-shrink: 0;
}

.iptv-epg-item__progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}

/* Two-column layout in IPTV Detail */
.iptv-detail__columns {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    align-items: flex-start;
}

.iptv-detail__epg-col {
    flex: 6;
    min-width: 0;
}

.iptv-detail__streams-col {
    flex: 4;
    min-width: 250px;
    padding-left: 24px;
    border-left: 1px solid rgba(255,255,255,.08);
}

.iptv-streams__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.iptv-stream-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 8px;
    text-align: left;
    font-family: var(--font);
    font-size: .88rem;
}

.iptv-stream-btn:hover {
    background: rgba(123, 104, 238, .15);
    border-color: var(--accent);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.iptv-stream-btn__icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.iptv-stream-btn__info {
    flex: 1;
}

.iptv-stream-btn__title {
    font-weight: 600;
}

.iptv-stream-btn__quality {
    font-size: .75rem;
    color: var(--text-muted);
}

/* IPTV Responsive */
@media (max-width: 900px) {
    .iptv-view {
        flex-direction: column;
        padding: 0 16px;
    }
    .iptv-sidebar {
        width: 100%;
        max-height: 50vh;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.06);
        padding-right: 0;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    .iptv-detail {
        padding: 0;
    }
    .content-tabs {
        padding: 0 16px;
        overflow-x: auto;
    }
}