/* ============================================================
   IPTV Stream Pro — Frontend App CSS
   Dark Premium Theme | Netflix-inspired
   ============================================================ */

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

:root {
    --c-primary:   #8B5CF6;
    --c-secondary: #3B82F6;
    --c-accent:    #10B981;
    --c-bg:        #0B0B0F;
    --c-card:      #17171C;
    --c-card2:     #1E1E26;
    --c-text:      #F1F1F5;
    --c-muted:     #8A8A9A;
    --c-border:    #2D2D36;
    --c-overlay:   rgba(11,11,15,0.85);
    --radius:      10px;
    --sidebar-w:   230px;
    --transition:  .25s cubic-bezier(.4,0,.2,1);
    --glow:        0 0 20px rgba(139,92,246,.6);
}

html, body { height: 100%; overflow: hidden; }

.iiptv-body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

#iiptv-app { width: 100vw; height: 100vh; overflow: hidden; position: relative; }

/* ======= UTILITIES ======= */
.hidden { display: none !important; }
.screen { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ======= SPINNER ======= */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--c-primary); border-radius: 50%; animation: spin .8s linear infinite; }
.spinner-large { width: 64px; height: 64px; border-width: 4px; }

/* ======= SPLASH ======= */
.splash {
    position: fixed; inset: 0; z-index: 999;
    background: var(--c-bg);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px;
}
.splash-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .15; }
.splash-logo { position: relative; z-index: 1; }
.logo-text { font-family: 'Poppins', sans-serif; font-size: 2.8rem; font-weight: 800; color: #fff; }
.logo-text span { color: var(--c-primary); }
/* .logo-img — dimensões controladas via style inline pelo painel Aparência */
.splash-loader { position: relative; z-index: 1; }

@keyframes fadeOut { to { opacity: 0; visibility: hidden; } }
.splash.fade-out { animation: fadeOut .6s forwards; }

/* ======= LOGIN ======= */
.login-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(139,92,246,.18) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 50%, rgba(59,130,246,.12) 0%, transparent 60%),
                var(--c-bg);
}
.login-container {
    position: relative; z-index: 1;
    width: 420px; max-width: 94vw;
    margin: 0 auto;
    top: 50%; transform: translateY(-50%);
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 18px;
    padding: 40px 36px;
    box-shadow: 0 24px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(139,92,246,.1);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-tabs { display: flex; gap: 4px; background: rgba(255,255,255,.04); border-radius: 8px; padding: 4px; margin-bottom: 24px; }
.tab-btn { flex: 1; background: none; border: none; color: var(--c-muted); padding: 9px; border-radius: 6px; cursor: pointer; font-size: .9rem; font-weight: 600; transition: var(--transition); }
.tab-btn.active { background: var(--c-primary); color: #fff; }
.login-tab-content { display: none; }
.login-tab-content.active { display: block; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--c-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.form-input {
    width: 100%; padding: 13px 16px;
    background: rgba(255,255,255,.05); border: 1px solid var(--c-border);
    border-radius: 10px; color: var(--c-text); font-size: .95rem;
    outline: none; transition: var(--transition);
    appearance: none;
}
.form-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(139,92,246,.2); background: rgba(255,255,255,.08); }
.form-input option { background: var(--c-card); }
.hint { font-size:.8rem; color:var(--c-muted); margin:8px 0 6px; }
.password-wrap { position: relative; margin-bottom: 14px; }
.password-wrap .form-input { padding-right: 48px; }
.toggle-pw { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--c-muted); }
.btn-login {
    width: 100%; padding: 14px; border: none; border-radius: 10px;
    background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
    color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: var(--transition); letter-spacing: .05em; margin-top: 8px;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: var(--glow); }
.btn-login:active { transform: translateY(0); }
.login-msg { min-height: 28px; margin-top: 12px; font-size: .9rem; text-align: center; }
.login-msg.error { color: #f87171; }
.login-msg.success { color: var(--c-accent); }

/* ======= MAIN LAYOUT ======= */
#iiptv-main { display: flex; }

/* ======= SIDEBAR ======= */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    height: 100vh;
    background: var(--c-card);
    border-right: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: width var(--transition);
    overflow: hidden;
    z-index: 10;
}
.sidebar-logo { padding: 22px 20px; border-bottom: 1px solid var(--c-border); }
.logo-text-sm { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 1.3rem; }
.logo-text-sm b { color: var(--c-primary); }
.sidebar-nav { list-style: none; padding: 14px 0; flex: 1; overflow-y: auto; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 22px; cursor: pointer;
    border-radius: 0; font-weight: 500; font-size: .93rem;
    transition: var(--transition); color: var(--c-muted);
    border-left: 3px solid transparent;
    outline: none;
}
.nav-item:hover { color: var(--c-text); background: rgba(255,255,255,.04); }
.nav-item.active, .nav-item:focus {
    color: var(--c-text);
    background: rgba(139,92,246,.12);
    border-left-color: var(--c-primary);
}
/* Smart TV focus glow */
.nav-item:focus { box-shadow: inset 0 0 0 2px var(--c-primary); outline: none; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--c-border); }
.user-info { font-size: .82rem; color: var(--c-muted); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-logout { width: 100%; padding: 9px; background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #f87171; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .85rem; transition: var(--transition); }
.btn-logout:hover { background: rgba(239,68,68,.25); }

/* ======= CONTENT AREA ======= */
#content-area {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--c-border) transparent;
}
#content-area::-webkit-scrollbar { width: 6px; }
#content-area::-webkit-scrollbar-track { background: transparent; }
#content-area::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 3px; }

/* ======= VIEWS ======= */
.view { display: none; min-height: 100vh; padding-bottom: 40px; }
.view.active { display: block; }

/* ======= HERO BANNER ======= */
.hero-banner {
    position: relative; height: 460px;
    background: linear-gradient(to right, #0B0B0F, #1a0a2e);
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: .35;
    transition: all .5s;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, rgba(11,11,15,1) 0%, rgba(11,11,15,.5) 50%, transparent 100%),
                linear-gradient(to top, rgba(11,11,15,1) 0%, transparent 50%);
}
.hero-info { position: absolute; bottom: 50px; left: 40px; max-width: 550px; z-index: 2; }
.hero-title { font-family: 'Poppins', sans-serif; font-size: 2.6rem; font-weight: 800; margin-bottom: 12px; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.hero-meta { color: var(--c-muted); font-size: .9rem; margin-bottom: 16px; display: flex; gap: 12px; }
.hero-plot { font-size: .92rem; line-height: 1.6; color: #ccc; margin-bottom: 22px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-btns { display: flex; gap: 12px; }
.hero-btn { padding: 12px 28px; border-radius: 8px; border: none; font-weight: 700; font-size: .95rem; cursor: pointer; transition: var(--transition); }
.hero-btn-play { background: var(--c-primary); color: #fff; }
.hero-btn-play:hover { background: #7c3aed; transform: translateY(-1px); box-shadow: var(--glow); }
.hero-btn-info { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }
.hero-btn-info:hover { background: rgba(255,255,255,.2); }

/* ======= CONTENT ROWS (HOME) ======= */
.content-rows { padding: 24px 30px; }
.row-section { margin-bottom: 36px; }
.row-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; color: var(--c-text); }

/* ======= CAROUSEL ======= */
.carousel {
    display: flex; gap: 12px;
    overflow-x: auto; overflow-y: visible;
    padding: 8px 0 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.carousel::-webkit-scrollbar { display: none; }

/* ======= CARDS ======= */
.card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    background: var(--c-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    border: 1px solid var(--c-border);
    outline: none;
}
.card:hover, .card:focus {
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 0 0 2px var(--c-primary);
    z-index: 2;
}
.card-channel { width: 180px; }
.card-movie   { width: 150px; }
.card-series  { width: 150px; }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--c-card2); display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-poster { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: var(--c-card2); display: flex; align-items: center; justify-content: center; }
.card-poster img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px 12px; }
.card-name { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: .74rem; color: var(--c-muted); margin-top: 3px; }
.card-badge { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.7); color: #fff; font-size: .7rem; padding: 2px 7px; border-radius: 4px; font-weight: 600; }
.card-live-dot { display: inline-block; width: 7px; height: 7px; background: #f00; border-radius: 50%; margin-right: 4px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ======= GRID ======= */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 20px 28px;
}
.grid-movies {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.grid-card { width: 100%; flex: none; }

/* ======= SKELETON ======= */
@keyframes shimmer {
    from { background-position: -400px 0; }
    to   { background-position:  400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--c-card) 25%, var(--c-card2) 50%, var(--c-card) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

/* ======= VIEW HEADER ======= */
.view-header {
    padding: 24px 28px 12px;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.view-header h2 { font-size: 1.5rem; font-weight: 700; }
.view-controls { display: flex; gap: 12px; margin-left: auto; flex-wrap: wrap; }
.filter-select, .search-input {
    padding: 9px 14px;
    background: var(--c-card); border: 1px solid var(--c-border);
    color: var(--c-text); border-radius: 8px; font-size: .88rem; outline: none;
    transition: var(--transition);
}
.filter-select:focus, .search-input:focus { border-color: var(--c-primary); }
.filter-select option { background: var(--c-card); }

/* ======= LOAD MORE ======= */
.load-more-wrap { text-align: center; padding: 20px; }
.btn-load-more { padding: 12px 32px; background: rgba(139,92,246,.15); border: 1px solid var(--c-primary); color: var(--c-primary); border-radius: 8px; cursor: pointer; font-weight: 600; transition: var(--transition); }
.btn-load-more:hover { background: rgba(139,92,246,.3); }
.btn-load-more.hidden { display: none; }

/* ======= SEARCH ======= */
.search-hero { padding: 32px 28px 20px; }
.search-hero-input {
    width: 100%; max-width: 600px;
    padding: 16px 22px;
    background: var(--c-card); border: 1px solid var(--c-border);
    color: var(--c-text); border-radius: 12px; font-size: 1.1rem; outline: none;
    transition: var(--transition);
}
.search-hero-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.search-results-section { padding: 0 28px 20px; }
.search-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .06em; }
.search-empty { padding: 40px 28px; color: var(--c-muted); font-size: 1rem; }

/* ======= EPG ======= */
.epg-container { display: flex; height: calc(100vh - 80px); }
.epg-channels-col { width: 220px; min-width: 220px; border-right: 1px solid var(--c-border); overflow-y: auto; scrollbar-width: thin; }
.epg-channel-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.04); cursor: pointer; }
.epg-channel-row:hover { background: rgba(255,255,255,.04); }
.epg-channel-logo { width: 36px; height: 24px; object-fit: contain; }
.epg-channel-name { font-size: .83rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-timeline { flex: 1; overflow: auto; padding: 12px; }
.epg-program { display: inline-block; background: var(--c-card); border: 1px solid var(--c-border); border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; margin-right: 6px; font-size: .82rem; cursor: pointer; transition: var(--transition); }
.epg-program:hover { background: rgba(139,92,246,.15); border-color: var(--c-primary); }
.epg-program-title { font-weight: 600; }
.epg-program-time { font-size: .75rem; color: var(--c-muted); margin-top: 3px; }
.epg-now { background: rgba(139,92,246,.2); border-color: var(--c-primary); }
.epg-progress { height: 3px; background: var(--c-primary); border-radius: 2px; margin-top: 6px; }

/* ======= DETAIL MODAL ======= */
.modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: flex-end; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.8); backdrop-filter: blur(8px); }
.modal-content {
    position: relative; z-index: 1;
    width: 100%; max-width: 780px;
    max-height: 90vh;
    background: var(--c-card);
    border-radius: 18px 18px 0 0;
    overflow-y: auto;
    scrollbar-width: thin;
    animation: slideUp .3s cubic-bezier(.4,0,.2,1);
}
@keyframes slideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-close { position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,.1); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 1.1rem; cursor: pointer; z-index: 2; transition: var(--transition); }
.modal-close:hover { background: rgba(255,255,255,.2); }
.detail-banner { width: 100%; height: 260px; object-fit: cover; border-radius: 18px 18px 0 0; }
.detail-body { padding: 24px; }
.detail-title { font-family: 'Poppins', sans-serif; font-size: 1.8rem; font-weight: 800; margin-bottom: 10px; }
.detail-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-meta-item { font-size: .85rem; color: var(--c-muted); }
.detail-meta-item span { color: var(--c-text); font-weight: 600; }
.detail-plot { font-size: .92rem; line-height: 1.7; color: #bbb; margin-bottom: 22px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-btn { padding: 13px 28px; border-radius: 10px; border: none; font-weight: 700; font-size: .95rem; cursor: pointer; transition: var(--transition); }
.detail-btn-play { background: var(--c-primary); color: #fff; }
.detail-btn-play:hover { background: #7c3aed; }
.detail-btn-fav { background: rgba(255,255,255,.08); color: var(--c-text); border: 1px solid var(--c-border); }
.detail-btn-fav:hover { background: rgba(255,255,255,.15); }
.detail-btn-fav.active { color: #fbbf24; border-color: #fbbf24; background: rgba(251,191,36,.1); }
/* Seasons/Episodes */
.seasons-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.season-tab { padding: 7px 16px; border-radius: 20px; border: 1px solid var(--c-border); background: none; color: var(--c-muted); cursor: pointer; font-size: .85rem; transition: var(--transition); }
.season-tab.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.episodes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.episode-card { background: var(--c-card2); border-radius: 8px; overflow: hidden; cursor: pointer; border: 1px solid var(--c-border); transition: var(--transition); }
.episode-card:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.episode-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--c-card); }
.episode-info { padding: 10px 12px; }
.episode-num { font-size: .78rem; color: var(--c-muted); }
.episode-title { font-size: .88rem; font-weight: 600; }

/* ======= PLAYER ======= */
.player-overlay {
    position: fixed; inset: 0; z-index: 950;
    background: #000;
    display: flex; flex-direction: column;
}
.iiptv-video { flex: 1; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.player-back-btn {
    position: absolute; top: 16px; left: 16px; z-index: 5;
    background: rgba(0,0,0,.6); border: none; color: #fff;
    padding: 8px 16px; border-radius: 8px; cursor: pointer;
    font-size: .9rem; font-weight: 600; transition: var(--transition);
    backdrop-filter: blur(4px);
}
.player-back-btn:hover { background: rgba(0,0,0,.85); }
.player-title-bar {
    position: absolute; top: 0; left: 0; right: 0; z-index: 4;
    padding: 50px 20px 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,.8), transparent);
    font-size: 1.1rem; font-weight: 700; pointer-events: none;
    opacity: 0; transition: opacity .3s;
}
.player-overlay:hover .player-title-bar { opacity: 1; }
.player-controls {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 5;
    padding: 16px 20px 22px;
    background: linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 100%);
    opacity: 0; transition: opacity .3s; pointer-events: none;
}
.player-overlay:hover .player-controls { opacity: 1; pointer-events: all; }
.player-overlay.controls-visible .player-controls { opacity: 1; pointer-events: all; }
.player-progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.player-seek, .player-volume {
    -webkit-appearance: none; height: 4px;
    background: rgba(255,255,255,.3); border-radius: 2px; cursor: pointer;
    transition: var(--transition); outline: none;
}
.player-seek { flex: 1; }
.player-seek::-webkit-slider-thumb, .player-volume::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px;
    background: var(--c-primary); border-radius: 50%; cursor: pointer;
    box-shadow: 0 0 6px rgba(139,92,246,.8);
}
.player-seek:hover { height: 6px; }
.player-time { font-size: .82rem; color: rgba(255,255,255,.8); min-width: 44px; }
.player-btns { display: flex; align-items: center; gap: 8px; }
.p-btn {
    background: none; border: none; color: #fff; font-size: 1.3rem;
    cursor: pointer; padding: 6px 10px; border-radius: 6px;
    transition: var(--transition);
}
.p-btn:hover { background: rgba(255,255,255,.1); }
.p-btn-play { font-size: 1.6rem; }
.player-vol-wrap { display: flex; align-items: center; gap: 8px; }
.player-volume { width: 80px; }
.player-spacer { flex: 1; }
.player-buffering {
    position: absolute; inset: 0; z-index: 3;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.4); pointer-events: none;
}
.epg-now-bar { font-size: .82rem; color: rgba(255,255,255,.7); margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.1); }

/* ======= FAVORITES / HISTORY ======= */
.progress-bar { height: 3px; background: var(--c-primary); border-radius: 2px; position: absolute; bottom: 0; left: 0; }

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
    :root { --sidebar-w: 60px; }
    .sidebar-nav .nav-item span { display: none; }
    .sidebar-logo .logo-text-sm { font-size: .9rem; }
    .sidebar-footer .btn-logout span { display: none; }
    .hero-banner { height: 280px; }
    .hero-title { font-size: 1.6rem; }
    .hero-info { left: 16px; bottom: 24px; }
    .grid-layout { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); padding: 14px; }
    .content-rows { padding: 14px 16px; }
    .view-header { padding: 16px 14px 8px; flex-direction: column; align-items: flex-start; }
    .view-controls { width: 100%; }
    .modal-content { max-height: 95vh; border-radius: 14px 14px 0 0; }
}

/* ======= SMART TV FOCUS STYLES ======= */
.tv-focus {
    outline: 3px solid var(--c-primary) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 0 24px rgba(139,92,246,.7), var(--glow) !important;
    z-index: 5 !important;
    transition: all .15s !important;
}

/* ======= NEON EFFECTS ======= */
.neon-primary { text-shadow: 0 0 20px var(--c-primary), 0 0 40px rgba(139,92,246,.5); }
.neon-border  { border-color: var(--c-primary) !important; box-shadow: var(--glow); }

/* ======= TOAST ======= */
#iiptv-toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
    background: var(--c-card); border: 1px solid var(--c-border);
    color: var(--c-text); padding: 12px 24px; border-radius: 10px;
    font-size: .9rem; font-weight: 500; z-index: 1000;
    transition: transform .3s, opacity .3s;
    opacity: 0; pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    white-space: nowrap;
}
#iiptv-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ===== IPTV Stream Pro v1.3 — patch de imagens ===== */
/* Novos seletores gerados pelo makeImg() em app.js v1.3 */
.card-img img,
.card-landscape-img { width:100%;height:100%;object-fit:cover; }
.card-poster img,
.card-poster-img    { width:100%;height:100%;object-fit:cover; }

/* Wrapper para o banner do modal (evita <img> sem wrapper quebrando layout) */
.detail-banner-wrap { width:100%; }
.detail-banner-wrap .detail-banner { display:block; }

/* Garante que imagens com src="" não mostrem ícone de imagem quebrada */
img[src=""], img:not([src]) { visibility:hidden; }

/* Logo EPG menor e contido */
.epg-channel-logo { width:36px;height:24px;object-fit:contain;flex-shrink:0; }

/* ===== IEJA TV v1.4.0 — Font Awesome 7 patch ===== */

/* Ícones FA dentro dos botões do player */
.p-btn i { font-size: 1.1rem; pointer-events: none; }
.p-btn-play i { font-size: 1.3rem; }

/* Ícones FA na sidebar */
.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Ícones FA nos títulos de seção */
.row-title i, .view-header h2 i { margin-right: 6px; opacity: .85; }

/* Ícones FA nos botões de login */
.btn-login i { margin-right: 6px; }

/* Ícones FA nos meta-dados do modal */
.detail-meta-item i { width: 18px; text-align: center; opacity: .7; }

/* Botão voltar do player */
.player-back-btn i { margin-right: 6px; }

/* Botão sair */
.btn-logout i { margin-right: 6px; }

/* Botão fechar modal */
.modal-close i { font-size: 1rem; }

/* Ícone de episódio */
.episode-thumb i { font-size: 1.4rem; opacity: .6; }

/* Ícones nos estados vazios */
#home-rows i.fa-inbox,
#home-rows i.fa-triangle-exclamation,
.modal i.fa-magnifying-glass { font-size: 3rem; opacity: .5; }

/* Logo text IEJA TV */
.logo-text { font-family: 'Poppins', sans-serif; font-size: 1.8rem; font-weight: 800; color: #fff; }
.logo-text span { color: var(--c-primary); }
.logo-text-sm { font-family: 'Poppins', sans-serif; font-size: 1.1rem; font-weight: 800; color: #fff; }
.logo-text-sm b { color: var(--c-primary); }

/* Logo na tela de login — respeita dimensões do style inline */
.login-logo img { display: block; margin: 0 auto; }
