/* =========================================================
   SK PLAY WEBPLAYER - COMBINED RESPONSIVE DESIGN SYSTEM
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Inter:wght@400;600;700&display=swap');

:root {
    --primary-color: #00D5FF;
    --primary-hover: #0055FF;
    --bg-dark: #050b14;
    --text-light: #ffffff;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.15);
    --focus-border: #00D5FF;
    --box-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Outfit', 'Inter', sans-serif;
}

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

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-family);
    overflow: hidden;
    user-select: none;
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
}

.screen {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
}

.screen.hidden, .hidden {
    display: none !important;
}

/* =========================================================
   LOGIN SCREEN
   ========================================================= */
#login-screen {
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, rgba(13, 27, 62, 0.9) 0%, rgba(5, 11, 20, 0.98) 100%), url('/background.jpg');
    background-size: cover;
    background-position: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo {
    max-width: 220px;
    max-height: 80px;
    margin-bottom: 12px;
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(0, 213, 255, 0.4));
}

.login-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 0.5px;
}

.login-box {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 36px 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.input-group {
    margin-bottom: 18px;
    width: 100%;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #AFC1D9;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus, .input-group input.focused {
    border-color: var(--focus-border);
    background: rgba(0, 213, 255, 0.08);
    box-shadow: 0 0 15px rgba(0, 213, 255, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    margin-bottom: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.btn-primary:hover, .btn-primary.focused {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 213, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--input-border);
    color: #AFC1D9;
}

.btn-secondary:hover, .btn-secondary.focused {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    transform: translateY(-2px);
}

.divider {
    text-align: center;
    position: relative;
    margin: 16px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--input-border);
}

.divider span {
    background: #0B1120;
    padding: 0 12px;
    position: relative;
    color: #64748B;
    font-size: 13px;
}

/* =========================================================
   DASHBOARD / HOME SCREEN
   ========================================================= */
.header {
    padding: 24px 40px 10px 40px;
    background: linear-gradient(180deg, rgba(5, 11, 20, 0.95) 0%, rgba(10, 5, 20, 0.8) 100%);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.user-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.provider-tag {
    background: rgba(0, 213, 255, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(0, 213, 255, 0.3);
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.clock-tag {
    color: #94A3B8;
    font-weight: 700;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--box-border);
    color: white;
    font-size: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover, .icon-btn.focused {
    border-color: var(--primary-color);
    background: rgba(0, 213, 255, 0.2);
}

.menu-row {
    display: flex;
    gap: 14px;
    width: 100%;
}

.menu-btn {
    flex: 1;
    height: 110px;
    background: rgba(27, 19, 47, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 10px;
    color: #c9c3e0;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.menu-btn .icon {
    font-size: 32px;
}

.menu-btn:hover, .menu-btn.focused {
    background: #2a1b4d;
    border-color: #00D5FF;
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 213, 255, 0.3);
}

.menu-btn.active-tab {
    background: linear-gradient(135deg, #4c1d95, #2563EB);
    border-color: #00D5FF;
    color: white;
}

.content-area {
    flex: 1;
    padding: 0 40px 40px 40px;
    overflow-y: auto;
    position: relative;
}

.rail-container {
    margin-top: 25px;
    margin-bottom: 30px;
}

.rail-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    color: #ffffff;
}

.rail-items {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 16px 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 213, 255, 0.4) transparent;
}

.poster {
    width: 170px;
    flex-shrink: 0;
    background: #1b152d;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
}

.poster:hover, .poster.focused {
    border-color: var(--primary-color);
    transform: translateY(-4px) scale(1.03);
    z-index: 10;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8);
}

.poster-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: #110c1f;
    display: block;
}

.poster-info {
    padding: 10px 8px;
    background: #231c38;
    text-align: center;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-title {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}

.poster-badge {
    position: absolute;
    top: 0; right: 0;
    background: #EF4444;
    color: white;
    font-weight: 800;
    padding: 3px 8px;
    font-size: 11px;
    border-bottom-left-radius: 8px;
}

/* =========================================================
   VOD SCREEN (GRID)
   ========================================================= */
#vod-screen {
    background: #050b14;
}

.vod-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--box-border);
}

.vod-header h1 {
    font-size: 24px;
    font-weight: 800;
}

.vod-search-container input {
    width: 260px;
    padding: 10px 16px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--input-border);
    color: white;
    outline: none;
    font-size: 14px;
}

.vod-search-container input:focus, .vod-search-container input.focused {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 213, 255, 0.3);
}

.vod-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.vod-sidebar {
    width: 280px;
    background: rgba(10, 15, 30, 0.9);
    border-right: 1px solid var(--box-border);
    overflow-y: auto;
    padding: 15px 10px;
}

.vod-cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vod-cat-item {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #AFC1D9;
    cursor: pointer;
    transition: all 0.2s;
}

.vod-cat-item:hover, .vod-cat-item.focused {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.vod-cat-item.selected {
    background: var(--primary-color);
    color: white;
}

.vod-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 30px;
    overflow-y: auto;
}

.vod-content-header {
    margin-bottom: 16px;
    font-size: 14px;
    color: #94A3B8;
    font-weight: 600;
}

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

.vod-poster-card {
    background: #1b152d;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    position: relative;
}

.vod-poster-card:hover, .vod-poster-card.focused {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

.vod-poster-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
}

.vod-poster-card .title {
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   LIVE TV SCREEN
   ========================================================= */
#live-screen {
    display: flex;
    flex-direction: row;
    background: #050b14;
    overflow: hidden;
}

.live-sidebar {
    width: 280px;
    background: rgba(10, 15, 30, 0.95);
    border-right: 1px solid var(--box-border);
    display: flex;
    flex-direction: column;
}

.live-sidebar-header {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid var(--box-border);
}

.btn-back {
    background: transparent;
    border: 1px solid var(--input-border);
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.btn-back:hover, .btn-back.focused {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

.search-box {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--input-border);
    color: white;
    outline: none;
    font-size: 13px;
}

.live-category-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.live-cat-item {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #AFC1D9;
    cursor: pointer;
    margin-bottom: 4px;
}

.live-cat-item:hover, .live-cat-item.focused {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.live-cat-item.selected {
    background: var(--primary-color);
    color: white;
}

.live-channel-list-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--box-border);
    padding: 20px;
    overflow: hidden;
}

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

.live-channel-info {
    font-size: 12px;
    color: #64748B;
    margin-bottom: 14px;
}

.live-channels {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.live-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.live-channel-item:hover, .live-channel-item.focused {
    background: rgba(0, 213, 255, 0.12);
    border-color: var(--primary-color);
}

.live-channel-item.selected {
    background: linear-gradient(90deg, rgba(0, 213, 255, 0.25), rgba(37, 99, 235, 0.25));
    border-color: var(--primary-color);
}

.live-channel-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    background: #000;
}

.live-channel-name {
    font-size: 15px;
    font-weight: 700;
    flex: 1;
}

.live-fav-btn {
    font-size: 18px;
    color: #F59E0B;
    cursor: pointer;
}

.live-preview-container {
    width: 380px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: rgba(10, 15, 30, 0.9);
}

.live-mini-player {
    width: 100%;
    height: 215px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--box-border);
}

.live-epg-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.live-epg-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.epg-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.epg-time {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 700;
}

.epg-title {
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
}

/* =========================================================
   DETAILS SCREEN
   ========================================================= */
#details-screen {
    position: relative;
    overflow: hidden;
}

.details-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    z-index: 1;
    filter: blur(10px);
}

.details-layout {
    position: relative;
    z-index: 2;
    display: flex;
    padding: 80px 60px 40px 60px;
    gap: 50px;
}

.details-left {
    width: 260px;
    flex-shrink: 0;
}

.details-main-poster {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

.details-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.details-right h1 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 8px;
}

.details-category {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.details-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #AFC1D9;
    margin-bottom: 30px;
    max-width: 700px;
}

.details-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
}

.btn-pill {
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pill:hover, .btn-pill.focused {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 213, 255, 0.4);
}

.btn-pill-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.details-related-section {
    position: relative;
    z-index: 2;
    padding: 0 60px 40px 60px;
}

.details-related-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.details-related-rail {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
}

/* =========================================================
   PLAYER CONTAINER NATIVO (Idêntico ao projeto funcional)
   ========================================================= */
.player-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: black;
    z-index: 9999;
    display: none;
}
.player-container.active {
    display: flex;
    flex-direction: column;
}
.close-player {
    position: absolute;
    top: 20px; right: 30px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
}
.close-player:hover {
    color: #f44336;
}
#videoPlayer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}




.player-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.player-center-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.player-center-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.player-center-btn:hover, .player-center-btn.focused {
    background: rgba(0, 213, 255, 0.25);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.player-btn-main {
    width: 80px;
    height: 80px;
    font-size: 30px;
    background: var(--primary-color);
}

.player-controls-wrapper {
    width: 100%;
}

.player-progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    font-weight: 700;
}

.progress-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
}

/* =========================================================
   SETTINGS SCREEN
   ========================================================= */
.settings-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 20px;
    border: 1px solid var(--box-border);
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.settings-account-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.settings-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-btn {
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--box-border);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.settings-btn:hover, .settings-btn.focused {
    background: rgba(0, 213, 255, 0.15);
    border-color: var(--primary-color);
}

.btn-danger {
    color: #EF4444;
}

.btn-danger:hover, .btn-danger.focused {
    background: rgba(239, 68, 68, 0.15);
    border-color: #EF4444;
}

/* =========================================================
   RESPONSIVITY FOR MOBILE & TABLETS
   ========================================================= */
@media (max-width: 900px) {
    .menu-row {
        flex-wrap: wrap;
    }
    .menu-btn {
        flex: 1 1 45%;
        height: 80px;
    }
    #live-screen {
        flex-direction: column;
        overflow-y: auto;
    }
    .live-sidebar, .live-channel-list-container, .live-preview-container {
        width: 100%;
        border-right: none;
    }
    .details-layout {
        flex-direction: column;
        padding: 40px 20px;
    }
    .details-left {
        width: 180px;
        margin: 0 auto;
    }
}

/* Ocultar scrollbars */
::-webkit-scrollbar {
    width: 0px !important;
    background: transparent !important;
    display: none !important;
}
::-webkit-scrollbar-thumb {
    background: transparent !important;
}
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
