@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #060911;
    --card-bg: rgba(14, 19, 31, 0.72);
    --primary-color: #e5a93b; /* Refined cinema amber/gold */
    --primary-glow: rgba(229, 169, 59, 0.28);
    --primary-gradient: linear-gradient(135deg, #e5a93b 0%, #ca8a04 100%);
    --primary-dark: #b45309;
    --text-color: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #828fa3;
    --sidebar-bg: rgba(10, 14, 24, 0.88);
    --item-bg: rgba(16, 22, 35, 0.65);
    --item-hover: rgba(25, 34, 52, 0.85);
    --success: #10b981;
    --glass-bg: rgba(12, 17, 28, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body[data-theme="ocean"] {
    --primary-color: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.28);
    --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}

body[data-theme="purple"] {
    --primary-color: #a78bfa;
    --primary-glow: rgba(167, 139, 250, 0.28);
    --primary-gradient: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

body[data-theme="emerald"] {
    --primary-color: #34d399;
    --primary-glow: rgba(52, 211, 153, 0.28);
    --primary-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Screens */
.screen {
    display: none;
    height: 100vh;
    width: 100vw;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* ---------------- LOGIN SCREEN (Website Style) ---------------- */
#login-screen {
    background: url('https://png.pngtree.com/background/20250110/original/pngtree-fiber-optic-internet-speed-network-background-picture-image_15167767.jpg') center/cover;
    position: relative;
}

.login-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.login-header {
    position: relative;
    z-index: 2;
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.login-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Compact Smart TV User Badge */
.header-smart-tv-badge-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 30px;
    padding: 6px 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s ease;
    cursor: default;
}

.header-smart-tv-badge-compact:hover {
    border-color: #38bdf8;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
}

.compact-tv-icon {
    font-size: 0.95rem;
    color: #38bdf8;
    display: flex;
    align-items: center;
}

.compact-tv-text {
    font-size: 0.78rem;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.compact-tv-text .tag-bold {
    color: #38bdf8;
    font-weight: 700;
}

.compact-tv-text .tag-desc {
    color: #94a3b8;
}

.compact-info-icon {
    color: #64748b;
    font-size: 0.72rem;
    margin-left: 2px;
}

/* Smart TV Browser State */
body.is-smarttv-browser .header-smart-tv-badge-compact {
    border-color: rgba(34, 197, 94, 0.6);
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.4) 0%, rgba(15, 23, 42, 0.95) 100%);
}
body.is-smarttv-browser .compact-tv-icon,
body.is-smarttv-browser .compact-tv-text .tag-bold {
    color: #4ade80;
}

/* Header Download Dropdown Wrap */
.header-download-dropdown-wrap {
    position: relative;
}

/* Header Dedicated iOS Button */
.header-ios-badge-wrap {
    display: inline-flex;
    align-items: center;
}

.btn-header-ios {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 30px;
    padding: 7px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
    text-decoration: none;
}

.btn-header-ios:hover,
.btn-header-ios:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
    box-shadow: 0 4px 18px rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-header-ios i {
    font-size: 0.95rem;
}

.btn-header-download-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.16) 0%, rgba(14, 165, 233, 0.16) 100%);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 30px;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}

.btn-header-download-dropdown:hover,
.btn-header-download-dropdown:focus {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.28) 0%, rgba(14, 165, 233, 0.28) 100%);
    border-color: #22c55e;
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.3);
    transform: translateY(-1px);
}

.btn-header-download-dropdown .drop-arrow {
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.btn-header-download-dropdown[aria-expanded="true"] .drop-arrow {
    transform: rotate(180deg);
    color: #4ade80;
}

.header-download-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: rgba(11, 15, 25, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
    animation: fadeInDropdown 0.18s ease;
}

.header-download-menu.show {
    display: flex;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-download-menu .menu-header {
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 8px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 2px;
}

.download-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.download-menu-item:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
    transform: translateX(3px);
}

.menu-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.menu-item-icon.tv {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.menu-item-icon.mobile {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
}

.menu-item-icon.ios {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.menu-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.menu-item-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.menu-item-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 1px;
}

.menu-action-icon {
    color: #22c55e;
    font-size: 0.9rem;
    opacity: 0.8;
}

.login-logo {
    height: 65px;
    object-fit: contain;
}

.login-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px 50px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 50px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.login-mission {
    max-width: 540px;
    padding: 20px;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(229, 169, 59, 0.12);
    border: 1px solid rgba(229, 169, 59, 0.28);
    color: var(--primary-color);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.login-mission h2 {
    color: #f8fafc;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.login-mission p {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.login-feature-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.login-feature-chips .chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.login-container {
    width: 100%;
    max-width: 440px;
    background: rgba(12, 16, 28, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 45px 40px;
    box-sizing: border-box;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.login-title {
    color: #f8fafc;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.input-group {
    position: relative;
    margin-bottom: 18px;
}
.input-group i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #828fa3;
    font-size: 0.95rem;
}
.input-group .left-icon {
    left: 16px;
}
.input-group .toggle-password {
    right: 16px;
    cursor: pointer;
    transition: color 0.2s;
}
.input-group .toggle-password:hover {
    color: #f8fafc;
}
.input-group input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.25s ease;
}
.input-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-gradient);
    color: #0b0f19;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 14px;
    box-shadow: 0 4px 16px var(--primary-glow);
}
.btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.login-help {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    color: #b3b3b3;
    font-size: 0.85rem;
}
.login-help a {
    color: #b3b3b3;
    text-decoration: none;
}
.login-help a:hover {
    text-decoration: underline;
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Login Page Header APK Link */
.login-header-apk-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #4ade80;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}
.login-header-apk-link:hover {
    background: rgba(34, 197, 94, 0.22);
    border-color: #4ade80;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25);
    color: #fff;
}
.login-header-apk-link i {
    font-size: 1.15rem;
}

/* Streamlined Compact App Download Row (in Login Card) */
.login-downloads-compact {
    margin-top: 14px;
}

.compact-dl-divider {
    display: flex;
    align-items: center;
    margin: 12px 0 10px;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compact-dl-divider::before,
.compact-dl-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.compact-dl-divider span {
    padding: 0 10px;
}

.compact-dl-buttons-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

@media (max-width: 440px) {
    .compact-dl-buttons-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.compact-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 9px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.compact-dl-btn.dl-smarttv {
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
}

.compact-dl-btn.dl-smarttv:hover {
    background: rgba(168, 85, 247, 0.24);
    border-color: #a855f7;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

.compact-dl-btn.dl-tv {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.compact-dl-btn.dl-tv:hover {
    background: rgba(34, 197, 94, 0.24);
    border-color: #22c55e;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.compact-dl-btn.dl-mobile {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.compact-dl-btn.dl-mobile:hover {
    background: rgba(56, 189, 248, 0.24);
    border-color: #38bdf8;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.compact-dl-btn.dl-ios {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #f8fafc;
}

.compact-dl-btn.dl-ios:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Login Divider */
.login-or-divider {
    display: flex;
    align-items: center;
    margin: 22px 0 16px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.login-or-divider::before,
.login-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.09);
}
.login-or-divider span {
    padding: 0 12px;
}

/* Login APK Download Button Card */
.login-apk-download-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: #f8fafc;
    transition: all 0.25s ease;
    cursor: pointer;
}
.login-apk-download-btn:hover,
.login-apk-download-btn:focus-visible {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.25) 0%, rgba(20, 30, 55, 0.8) 100%);
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.2);
}
.apk-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #4ade80;
    flex-shrink: 0;
}
.apk-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
}
.apk-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}
.apk-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 3px;
}
.apk-arrow {
    font-size: 1.1rem;
    color: #4ade80;
    margin-right: 4px;
    transition: transform 0.2s;
}
.login-apk-download-btn:hover .apk-arrow {
    transform: translateY(2px);
}

/* High-End Android Devices Variations */
.login-header-highend-link {
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.35) !important;
    color: #38bdf8 !important;
}
.login-header-highend-link:hover {
    background: rgba(56, 189, 248, 0.22) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25) !important;
    color: #fff !important;
}

.login-apk-highend-btn {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.14) 0%, rgba(15, 23, 42, 0.65) 100%) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}
.login-apk-highend-btn:hover,
.login-apk-highend-btn:focus-visible {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.28) 0%, rgba(20, 30, 55, 0.85) 100%) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.22) !important;
}
.apk-icon-circle.highend-circle {
    background: rgba(56, 189, 248, 0.18) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    color: #38bdf8 !important;
}
.login-apk-highend-btn .apk-arrow {
    color: #38bdf8 !important;
}

/* ---------------- DASHBOARD (TV STYLE) ---------------- */
#dashboard-screen {
    position: relative;
    justify-content: space-between;
    overflow: hidden;
}

.dashboard-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://png.pngtree.com/background/20250110/original/pngtree-fiber-optic-internet-speed-network-background-picture-image_15167767.jpg') center/cover no-repeat;
    z-index: 0;
    overflow: hidden;
}

.dashboard-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.dashboard-overlay-gradient {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 2;
    pointer-events: none;
}

/* ---------------- SMARTONE IPTV DASHBOARD ---------------- */
.smartone-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 35px;
    background: rgba(8, 12, 22, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.smartone-logo {
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.8));
}

.smartone-datetime {
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 15px;
}

.smart-time {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.smart-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smartone-account-badge {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.04);
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.82rem;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-secondary);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
}

.smartone-header-actions {
    display: flex;
    gap: 8px;
}

.smartone-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #e2e8f0;
    padding: 7px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.smartone-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.smartone-btn.btn-logout:hover {
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.32);
    color: #fca5a5;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

/* SmartOne Cards Container */
.smartone-dashboard-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px 35px;
    z-index: 5;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.smartone-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1240px;
    width: 100%;
}

.smartone-card {
    background: linear-gradient(160deg, rgba(20, 26, 42, 0.75) 0%, rgba(9, 13, 23, 0.88) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    min-height: 295px;
}

.smartone-card:hover,
.smartone-card:focus {
    transform: translateY(-5px);
    outline: none;
    border-color: var(--card-accent);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.65), 0 0 20px var(--card-glow);
}

/* Category Accent Colors (Refined Cinema Palette) */
.card-livetv {
    --card-accent: #f43f5e;
    --card-glow: rgba(244, 63, 94, 0.22);
}
.card-movies {
    --card-accent: #0ea5e9;
    --card-glow: rgba(14, 165, 233, 0.22);
}
.card-series {
    --card-accent: #a855f7;
    --card-glow: rgba(168, 85, 247, 0.22);
}

.card-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-badge.live {
    background: rgba(244, 63, 94, 0.14);
    border-color: rgba(244, 63, 94, 0.35);
    color: #fda4af;
}

.card-badge .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f43f5e;
    box-shadow: 0 0 4px #f43f5e;
}

.card-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--card-accent);
    transition: all 0.25s ease;
}

.smartone-card:hover .card-icon-box,
.smartone-card:focus .card-icon-box {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-accent);
    transform: translateY(-2px);
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 10px;
}

.card-meta {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-footer-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.2s ease, transform 0.2s ease;
}

.smartone-card:hover .card-footer-action,
.smartone-card:focus .card-footer-action {
    color: var(--card-accent);
    transform: translateX(3px);
}

/* SmartOne Bottom TV Footer */
.smartone-footer {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 35px;
    background: rgba(6, 9, 16, 0.82);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.server-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px #00e676;
}

.remote-key-guide {
    display: flex;
    gap: 14px;
}

.key-badge kbd {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.75rem;
    margin-right: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-right {
    font-size: 0.75rem;
}

/* SmartOne Settings Modal */
.smartone-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.smartone-modal.active {
    display: flex;
}

.modal-card {
    background: #0b0f1b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    width: 92%;
    max-width: 660px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(14, 19, 33, 0.6);
}

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

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.modal-subtitle {
    font-size: 0.72rem;
    color: #828fa3;
    font-weight: 400;
    display: block;
    margin-top: 2px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Management Tabs Strip */
.mgmt-tab-bar {
    display: flex;
    background: rgba(6, 9, 16, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
}
.mgmt-tab-bar::-webkit-scrollbar {
    display: none;
}
.mgmt-tab {
    flex: 1;
    padding: 11px 12px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #828fa3;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.mgmt-tab:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.04);
}
.mgmt-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(229, 169, 59, 0.07);
}
.mgmt-tab-content {
    display: none;
    animation: fadeIn 0.2s ease;
}
.mgmt-tab-content.active {
    display: block;
}

.modal-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 65vh;
    overflow-y: auto;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.theme-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.theme-btn.active,
.theme-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
}

.theme-preview {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px currentColor;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 5px;
}

.slider-wrapper input[type="range"] {
    flex: 1;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.slider-wrapper span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 40px;
}

.account-summary-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
}

.account-row {
    display: flex;
    justify-content: space-between;
    color: #bbb;
}

.account-row strong {
    color: #fff;
}

.badge-status-ok {
    color: #00e676;
    font-weight: 600;
}

.modal-footer {
    padding: 15px 25px 20px;
    display: flex;
    justify-content: flex-end;
}

.btn-modal-save {
    background: var(--primary-color);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-save:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--primary-glow);
}

/* Item Favorite Star in Content Screen */
.item-fav-star {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #888;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 5;
}

.item-fav-star:hover {
    color: var(--primary-color);
    transform: scale(1.15);
}

.item-fav-star.active {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.85);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ---------------- CONTENT SCREEN (Categories & Streams) ---------------- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    background: rgba(6, 9, 16, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
}

.back-btn, .search-btn, .close-player {
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: all 0.2s ease;
}
.back-btn:hover, .back-btn:focus, .search-btn:hover, .close-player:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
    transform: translateX(-2px);
}

.split-view {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Category Sidebar */
.categories-sidebar {
    width: 240px;
    min-width: 240px;
    max-width: 260px;
    background: rgba(8, 12, 22, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.category-item {
    padding: 13px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.86rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding-left: 24px;
}
.category-item.active {
    background: rgba(229, 169, 59, 0.12);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* Stream Items Grid */
.items-view {
    flex: 1;
    padding: 22px 24px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: grid;
    align-content: start;
    background: rgba(4, 7, 14, 0.55);
}

/* VOD Grid (Movies & Series): 2:3 Tall Cinema Posters */
.items-view.vod-grid {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 20px;
}

/* Live TV Grid: 16:10 Channel Logos */
.items-view.live-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 16px;
}

/* Stream Item Card */
.stream-item {
    background: linear-gradient(160deg, rgba(20, 26, 42, 0.7) 0%, rgba(10, 14, 25, 0.85) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    user-select: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.stream-item:hover,
.stream-item:focus {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
    border-color: var(--primary-color);
    background: rgba(30, 41, 59, 0.95);
    outline: none;
    z-index: 10;
}

/* Poster Container (Enforces 2:3 Aspect Ratio regardless of image load status) */
.poster-container {
    width: 100%;
    aspect-ratio: 2 / 3;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-item.live-item .poster-container {
    aspect-ratio: 16 / 10;
    background: rgba(15, 23, 42, 0.85);
    padding: 8px;
}

.poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.stream-item.live-item .poster-container img {
    object-fit: contain;
}

.stream-item:hover .poster-container img,
.stream-item:focus .poster-container img {
    transform: scale(1.05);
    filter: brightness(0.85);
}

/* Fallback Icon when poster is missing or broken */
.poster-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: var(--primary-color);
}
.poster-fallback .stream-icon {
    font-size: 2.4rem;
    opacity: 0.85;
}

/* Poster Play Badge (Hover / Focus) */
.poster-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.75);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.05rem;
    opacity: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.stream-item:hover .poster-play-badge,
.stream-item:focus .poster-play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    background: var(--primary-color);
    color: #000000;
}

/* Favorite Star Chip on Poster */
.item-fav-star {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}
.item-fav-star:hover {
    color: var(--primary-color);
    transform: scale(1.15);
}
.item-fav-star.active {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.88);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Stream Title & Metadata */
.stream-info {
    width: 100%;
    padding: 8px 4px 4px;
    text-align: center;
}
.stream-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
    word-break: break-word;
}

/* ---------------- EPISODES OVERLAY ---------------- */
#episodes-overlay {
    z-index: 1500;
    background: var(--bg-color);
}

/* ---------------- PLAYER OVERLAY ---------------- */
.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #000;
    z-index: 1000;
    flex-direction: column;
}
.overlay.active {
    display: flex;
}
#player-overlay {
    z-index: 2000;
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 30px;
    background: linear-gradient(to bottom, rgba(5, 8, 16, 0.96) 0%, rgba(5, 8, 16, 0.7) 60%, transparent 100%);
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2005;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

.player-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
    margin-right: 18px;
}

.player-back-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.player-back-btn:hover,
.player-back-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
    color: #fff;
    transform: scale(1.06);
}

.player-title-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-badge-tag {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 2px;
}

#player-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.player-header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}

/* Glassmorphism Player Action Buttons */
.player-action-btn {
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    padding: 8px 14px;
    border-radius: 11px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.player-action-btn:hover,
.player-action-btn:focus {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.player-action-btn.active,
.player-action-btn.fav-active {
    background: rgba(229, 169, 59, 0.18);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.player-action-btn.fav-active i {
    color: var(--primary-color);
}

/* Sleep Countdown Badge Pill */
.sleep-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 20px;
    background: rgba(147, 51, 234, 0.25);
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #d8b4fe;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
    transition: all 0.2s ease;
}
.sleep-countdown-badge:hover {
    background: rgba(147, 51, 234, 0.38);
    border-color: #c084fc;
    color: #fff;
    transform: scale(1.04);
}

/* Close Player Button */
#player-overlay .close-player {
    background: rgba(220, 53, 69, 0.85);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#player-overlay .close-player:hover {
    background: #ff3333;
    transform: scale(1.08);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.6);
}

/* Dropdown Popover Menus (Tracks & Sleep Timer) */
.player-dropdown-wrap {
    position: relative;
}

.player-popover-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 260px;
    max-width: 320px;
    max-height: 420px;
    overflow-y: auto;
    background: rgba(10, 14, 25, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85);
    padding: 8px;
    z-index: 2010;
    animation: fadeInPlayerMenu 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInPlayerMenu {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.popover-section-header {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.08em;
    padding: 8px 10px 4px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 6px;
}
.popover-section-header:first-child {
    border-top: none;
    margin-top: 0;
}

.popover-options-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.popover-item {
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.popover-item:hover,
.popover-item:focus {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.popover-item.active {
    background: rgba(229, 169, 59, 0.18);
    color: var(--primary-color);
    font-weight: 700;
}
.popover-item.active::after {
    content: '✓';
    font-weight: 900;
    margin-left: 8px;
    color: var(--primary-color);
}

/* Video Container & Dynamic Aspect Ratios */
.video-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    position: relative;
    overflow: hidden;
}

video {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    transition: object-fit 0.2s ease;
}

video.aspect-fit {
    object-fit: contain !important;
}

video.aspect-zoom {
    object-fit: cover !important;
}

video.aspect-stretch {
    object-fit: fill !important;
}

/* Hide native browser Download and Picture-in-Picture buttons */
video::-internal-media-controls-download-button,
#video-player::-internal-media-controls-download-button,
video::-webkit-media-controls-download-button,
#video-player::-webkit-media-controls-download-button {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

video::-webkit-media-controls-picture-in-picture-button,
#video-player::-webkit-media-controls-picture-in-picture-button {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* HUD Toast Notification */
.player-toast {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f8fafc;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(229, 169, 59, 0.25);
    z-index: 2004;
    pointer-events: none;
    animation: toastFadeIn 0.2s ease;
}

@keyframes toastFadeIn {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* TV Sleep Screen (Active when countdown finishes) */
.player-sleep-overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 15, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 2020;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: sleepScreenFade 0.6s ease;
}

@keyframes sleepScreenFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sleep-screen-card {
    padding: 40px 32px;
    max-width: 480px;
    background: rgba(14, 19, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.sleep-icon-moon {
    font-size: 3.8rem;
    color: #c084fc;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 16px rgba(192, 132, 252, 0.5));
}

.sleep-screen-card h2 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 800;
}

.sleep-screen-card p {
    font-size: 0.92rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 24px;
}

.btn-wake-up {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 12px;
    color: #000;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(229, 169, 59, 0.35);
    transition: all 0.2s ease;
}
.btn-wake-up:hover,
.btn-wake-up:focus {
    transform: scale(1.04);
    box-shadow: 0 8px 25px rgba(229, 169, 59, 0.5);
}

.sleep-wake-tip {
    display: block;
    margin-top: 14px;
    font-size: 0.78rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .player-header {
        padding: 10px 14px;
    }
    .player-action-btn .btn-text {
        display: none;
    }
    .player-action-btn {
        padding: 8px 10px;
    }
    .player-title-box h3 {
        font-size: 0.95rem;
        max-width: 140px;
    }
    .player-popover-menu {
        right: -10px;
        min-width: 220px;
    }
}

/* ---------------- COMPREHENSIVE RESPONSIVE SUITE (TABLET & MOBILE) ---------------- */

/* Tablets & Small Laptops (769px to 1050px) */
@media (max-width: 1050px) {
    .smartone-cards-grid {
        gap: 20px;
    }
    .smartone-card {
        min-height: 270px;
        padding: 22px 18px;
    }
    .categories-sidebar {
        width: 200px;
        min-width: 200px;
    }
    .items-view.vod-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 16px !important;
        padding: 16px !important;
    }
    .items-view.live-grid {
        grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)) !important;
        gap: 14px !important;
        padding: 16px !important;
    }
}

/* Mobile Devices & Phones (max-width: 768px) */
@media (max-width: 768px) {
    /* Top Header Bar */
    .smartone-header {
        padding: 8px 12px;
        gap: 8px;
    }
    .smartone-brand {
        gap: 10px;
    }
    .smartone-logo {
        height: 32px;
    }
    .smartone-datetime {
        padding-left: 8px;
        border-left: 1px solid rgba(255, 255, 255, 0.12);
    }
    .smart-time {
        font-size: 0.95rem;
    }
    .smart-date {
        display: none; /* Hide date on mobile screens to preserve space */
    }
    .smartone-account-badge {
        display: none;
    }
    .smartone-header-actions {
        gap: 6px;
    }
    .smartone-btn {
        padding: 7px 10px;
        font-size: 0.85rem;
        border-radius: 12px;
        gap: 0;
    }
    .smartone-btn span {
        display: none; /* Icon-only buttons for mobile screen fit */
    }
    .smartone-btn i {
        font-size: 0.95rem;
    }

    /* Main Center Dashboard & Horizontal 3-Card Layout on Mobile */
    .smartone-dashboard-container {
        padding: 8px 10px;
        align-items: center;
        justify-content: center;
    }
    .smartone-cards-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        max-width: 960px;
        width: 100%;
        margin: 0 auto;
        gap: 10px;
        padding-bottom: 5px;
    }
    .smartone-card {
        min-height: 145px;
        height: auto;
        padding: 14px 8px;
        border-radius: 14px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center;
        gap: 6px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    }
    .smartone-card:hover,
    .smartone-card:focus {
        transform: translateY(-3px) scale(1.02);
    }
    .smartone-card .card-badge {
        top: 6px;
        right: 6px;
        font-size: 0.56rem;
        padding: 2px 5px;
        letter-spacing: 0.04em;
    }
    .smartone-card .card-icon-box {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 12px;
        font-size: 1.25rem;
        margin: 2px auto 4px;
    }
    .smartone-card .card-body {
        width: 100%;
        min-width: 0;
        text-align: center;
    }
    .smartone-card .card-title {
        font-size: 0.98rem;
        margin-bottom: 2px;
        font-weight: 800;
        letter-spacing: 0.02em;
    }
    .smartone-card .card-desc {
        font-size: 0.66rem;
        margin-bottom: 0;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: var(--text-muted);
    }
    .smartone-card .card-meta {
        display: none !important;
    }
    .smartone-card .card-footer-action {
        display: none !important;
    }
    .smartone-card::after {
        display: none !important;
    }

    /* Bottom TV Footer */
    .smartone-footer {
        padding: 6px 12px;
        font-size: 0.72rem;
    }
    .remote-key-guide {
        display: none;
    }

    /* Content Screen (Mobile Split View -> Horizontal Scroll Strip + 2-Col Grid) */
    .top-bar {
        padding: 8px 12px;
        gap: 8px;
    }
    .back-btn {
        font-size: 0.92rem;
        white-space: nowrap;
    }
    #section-title {
        font-size: 1.05rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 130px;
    }
    .search-container {
        margin-left: auto;
    }
    #search-input {
        width: 100px !important;
        padding: 6px 10px 6px 28px !important;
        font-size: 0.78rem !important;
        border-radius: 16px;
        transition: width 0.25s ease;
    }
    #search-input:focus {
        width: 150px !important;
    }
    .search-container i {
        left: 9px !important;
        font-size: 0.75rem;
    }

    .split-view {
        flex-direction: column;
    }
    .categories-sidebar {
        width: 100% !important;
        height: auto !important;
        max-height: 48px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 6px 10px !important;
        gap: 8px !important;
        background: rgba(10, 14, 24, 0.96) !important;
    }
    .categories-sidebar::-webkit-scrollbar {
        display: none !important;
    }
    .category-item {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 6px 14px !important;
        border-radius: 20px !important;
        font-size: 0.8rem !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-bottom: none !important;
        background: rgba(255, 255, 255, 0.05) !important;
        color: #bbb !important;
        cursor: pointer;
    }
    .category-item:hover {
        padding-left: 14px !important;
    }
    .category-item.active {
        background: var(--primary-color) !important;
        color: #000 !important;
        font-weight: 700 !important;
        border-color: var(--primary-color) !important;
        border-left: 1px solid var(--primary-color) !important;
        box-shadow: 0 2px 10px var(--primary-glow) !important;
    }

    /* Responsive Stream Grid on Phone & Mobile */
    .items-view.vod-grid {
        padding: 10px !important;
        gap: 10px !important;
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
    }
    .items-view.live-grid {
        padding: 10px !important;
        gap: 8px !important;
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)) !important;
    }
    .stream-item {
        padding: 5px !important;
        border-radius: 10px !important;
    }
    .stream-title {
        font-size: 0.74rem !important;
        line-height: 1.2 !important;
    }
    .poster-play-badge {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.88rem !important;
    }
    .item-fav-star {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.68rem !important;
        top: 4px !important;
        right: 4px !important;
    }

    /* Player & Episodes Overlay */
    .player-header {
        padding: 12px 16px;
    }
    #player-overlay .close-player {
        width: 38px;
        height: 38px;
        font-size: 1.15rem;
    }
    #player-title {
        font-size: 0.95rem;
        max-width: 75%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .episodes-container {
        padding: 12px !important;
    }

    /* Settings Modal Mobile View */
    .modal-card {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px;
    }
    .modal-header {
        padding: 14px 18px;
    }
    .modal-body {
        padding: 16px 18px;
        gap: 16px;
    }
    .theme-options {
        grid-template-columns: 1fr;
    }
}

/* Direct Login & Responsive View */
.mobile-only {
    display: none !important;
}

/* Hide all APK download targets when running inside the installed APK */
body.is-apk-client .apk-download-target,
body.is-apk-client .login-header-apps,
body.is-apk-client .login-downloads-section,
body.is-apk-client .login-or-divider {
    display: none !important;
}
@media (max-width: 850px) {
    #login-screen {
        overflow-y: auto;
    }
    .login-header {
        padding: 14px 18px;
    }
    .login-header-right {
        justify-content: center;
        width: 100%;
    }
    .header-smart-tv-badge {
        max-width: 100%;
        padding: 8px 12px;
    }
    .header-tv-title {
        font-size: 0.8rem;
    }
    .header-tv-desc {
        font-size: 0.7rem;
    }
    .login-logo {
        height: 48px;
    }
    .login-header-apk-link {
        padding: 6px 12px;
        font-size: 0.78rem;
    }
    .login-content {
        gap: 20px;
        padding: 10px 16px 40px;
        flex-direction: column;
        justify-content: flex-start;
    }
    .login-container {
        order: 1; /* Shows username & password form immediately at the top! */
        padding: 24px 20px;
        margin-bottom: 15px;
        max-width: 100%;
    }
    .login-mission {
        order: 2;
        max-width: 100%;
        padding: 10px 5px;
        text-align: center;
    }
    .login-mission h2 {
        font-size: 1.8rem;
    }
    .login-mission p {
        font-size: 0.95rem;
    }
    .login-feature-chips {
        justify-content: center;
    }
    .login-title {
        cursor: default;
        margin-bottom: 18px;
        display: block;
        border-bottom: none;
        padding-bottom: 0;
        text-align: center;
    }
    #login-form-wrapper {
        display: block !important;
        margin-top: 0;
    }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- SMART TV REMOTE NAVIGATION FOCUS & OSD ---------------- */
:focus-visible,
.smartone-card:focus,
.category-item:focus,
.stream-item:focus,
.smartone-btn:focus,
.mgmt-tab:focus,
.theme-btn:focus,
.btn-modal-save:focus,
.tv-focused {
    outline: 3px solid var(--primary-color) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 20px var(--primary-glow) !important;
    transform: scale(1.025);
    z-index: 100;
}

/* Live TV Channel Surfing On-Screen Display (OSD) */
.channel-osd-banner {
    position: fixed;
    top: 35px;
    left: 50%;
    transform: translateX(-50%) translateY(-25px);
    background: rgba(10, 14, 25, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--primary-color);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 20px var(--primary-glow);
    padding: 12px 24px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.channel-osd-banner.show,
.channel-osd-banner.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.channel-osd-banner .osd-tag {
    background: var(--primary-color);
    color: #000;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.channel-osd-banner .osd-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f8fafc;
}

/* ---------------- MASTER SECURITY DEVICE LOCKOUT SCREEN ---------------- */
.lockout-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #080c14;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lockout-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(239, 68, 68, 0.15) 0%, rgba(8, 12, 20, 0.98) 70%);
}

.lockout-card {
    position: relative;
    background: rgba(18, 24, 38, 0.95);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 20px;
    padding: 40px;
    max-width: 580px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(239, 68, 68, 0.2);
}

.lockout-icon-box {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #ef4444;
    margin: 0 auto 20px;
}

.lockout-badge {
    display: inline-block;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 14px;
    border-radius: 30px;
    margin-bottom: 12px;
}

.lockout-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
}

.lockout-desc {
    font-size: 0.95rem;
    color: #94a3b8;
    line-height: 1.55;
    margin-bottom: 24px;
}

.lockout-info-box {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 22px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Spotlight MAC Card in Lockout */
.mac-spotlight-card {
    background: linear-gradient(135deg, rgba(20, 26, 42, 0.9) 0%, rgba(12, 16, 28, 0.95) 100%);
    border: 1px solid rgba(229, 169, 59, 0.45);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(229, 169, 59, 0.08);
}
.mac-spotlight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.mac-spotlight-label {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-copy-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f1f5f9;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}
.btn-copy-chip:hover,
.btn-copy-chip:active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}
.mac-spotlight-value {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-align: center;
    padding: 6px 0 4px;
    text-shadow: 0 0 14px rgba(229, 169, 59, 0.4);
    user-select: all;
    -webkit-user-select: all;
}
.device-details-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.device-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    gap: 10px;
}
.device-detail-row .detail-label {
    color: #64748b;
    white-space: nowrap;
    font-size: 0.74rem;
}
.device-detail-row .detail-value {
    color: #cbd5e1;
    font-family: monospace;
    font-size: 0.78rem;
    word-break: break-all;
    text-align: right;
}

/* Device MAC Badge on Login Screen */
.login-device-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 0.78rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}
.login-device-badge:hover {
    border-color: var(--primary-color);
    background: rgba(229, 169, 59, 0.08);
}
.login-device-badge-text strong {
    color: var(--primary-color);
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin-left: 3px;
}
.badge-copy-hint {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.7rem;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-lockout-retry {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 13px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-lockout-retry:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.lockout-footer-note {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 24px;
}

/* Mobile Responsiveness for Lockout */
@media (max-width: 768px) {
    .lockout-card {
        padding: 24px 18px !important;
        max-width: 94vw !important;
        border-radius: 16px !important;
    }
    .lockout-icon-box {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.8rem !important;
        margin-bottom: 14px !important;
    }
    .lockout-title {
        font-size: 1.35rem !important;
    }
    .lockout-desc {
        font-size: 0.85rem !important;
        margin-bottom: 18px !important;
    }
    .mac-spotlight-value {
        font-size: 1.15rem !important;
    }
}

/* Landscape Phone Optimization (Height <= 500px, e.g. 740x380) */
@media (orientation: landscape) and (max-height: 520px) {
    .smartone-header {
        padding: 6px 16px !important;
        gap: 8px !important;
    }
    .smartone-logo {
        height: 28px !important;
    }
    .smartone-dashboard-container {
        padding: 4px 14px !important;
        align-items: center !important;
    }
    .smartone-cards-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        max-width: 860px !important;
        width: 100% !important;
        padding-bottom: 0 !important;
    }
    .smartone-card {
        min-height: 140px !important;
        max-height: 185px !important;
        padding: 10px 8px !important;
    }
    .smartone-card .card-icon-box {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem !important;
        margin: 2px auto !important;
    }
    .smartone-card .card-title {
        font-size: 0.95rem !important;
    }
    .smartone-card .card-desc {
        font-size: 0.64rem !important;
    }
    .smartone-footer {
        padding: 4px 16px !important;
        font-size: 0.68rem !important;
    }

    /* Content Screen Landscape Optimization */
    .split-view {
        flex-direction: row !important;
    }
    .categories-sidebar {
        width: 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
        height: auto !important;
        max-height: 100% !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
        border-bottom: none !important;
    }
    .category-item {
        padding: 9px 14px !important;
        font-size: 0.75rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        border-left: 3px solid transparent !important;
    }
    .category-item.active {
        border-left-color: var(--primary-color) !important;
        border-bottom-color: rgba(255, 255, 255, 0.04) !important;
    }
    .items-view.vod-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
        gap: 10px !important;
        padding: 10px !important;
    }
    .items-view.live-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)) !important;
        gap: 8px !important;
        padding: 10px !important;
    }
}

/* ---------------- FOOTER LICENSE BADGE (WEB & APK) ---------------- */
.license-by-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(229, 169, 59, 0.12);
    border: 1px solid rgba(229, 169, 59, 0.35);
    padding: 3px 12px;
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.login-footer-license {
    margin-top: 18px;
    text-align: center;
    font-size: 0.82rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.login-footer-license strong {
    color: var(--primary-color);
}

.content-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px;
    background: rgba(10, 14, 26, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: #94a3b8;
    z-index: 10;
}
.content-bottom-left kbd {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 7px;
    border-radius: 4px;
    color: #fff;
    font-size: 0.75rem;
}
.content-bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================================
   LIVE REAL-TIME BROADCAST MARQUEE TICKER (Web & Android)
   ============================================================ */
.broadcast-ticker-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 46px;
    background: linear-gradient(90deg, rgba(11, 15, 25, 0.98) 0%, rgba(20, 27, 45, 0.96) 50%, rgba(11, 15, 25, 0.98) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid rgba(229, 169, 59, 0.8);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(229, 169, 59, 0.35);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 9999999;
    overflow: hidden;
    animation: tickerSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tickerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ticker-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e5a93b 0%, #b45309 100%);
    color: #0b0f19;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(229, 169, 59, 0.4);
    flex-shrink: 0;
}

.ticker-badge.targeted {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
}

.ticker-track {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    margin: 0 16px;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeScroll 25s linear infinite;
    font-size: 0.96rem;
    font-weight: 600;
    color: #f8fafc;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    border-radius: 20px;
    margin-right: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticker-timer i {
    color: #e5a93b;
}

.ticker-close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ticker-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .broadcast-ticker-banner {
        height: 40px;
        padding: 0 10px;
    }
    .ticker-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    .ticker-content {
        font-size: 0.85rem;
    }
    .ticker-timer {
        font-size: 0.7rem;
        padding: 3px 8px;
        margin-right: 6px;
    }
}

/* ============================================================
   SMART TV BROWSER GUIDE CARD (SAMSUNG TIZEN, LG WEBOS, ETC.)
   ============================================================ */
.smart-tv-guide-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0 8px 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.tv-guide-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.tv-guide-info {
    flex: 1;
}

.tv-guide-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 3px;
}

.tv-guide-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.45;
}

.tv-guide-desc strong {
    color: var(--primary-color);
}

/* Adaptive state: When detected running directly inside a Smart TV browser */
body.is-smarttv-browser .apk-download-target {
    display: none !important;
}

body.is-smarttv-browser .smart-tv-guide-card {
    border-color: rgba(34, 197, 94, 0.6);
    background: linear-gradient(135deg, rgba(20, 83, 45, 0.35) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 4px 22px rgba(34, 197, 94, 0.25);
}

body.is-smarttv-browser .smart-tv-guide-card .tv-guide-icon {
    background: rgba(34, 197, 94, 0.25);
    color: #22c55e;
}

body.is-smarttv-browser .smart-tv-guide-card .tv-guide-title {
    color: #4ade80;
}

/* ==========================================================================
   THEME 2: HOTEL IPTV SOLUTION (HOSPITALITY LUXURY EDITION)
   ========================================================================== */

.theme-dashboard-layout {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.theme2-layout {
    background-color: #060911;
}

/* Wallpaper Background */
.hotel-theme-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    transform: scale(1.02);
    transition: transform 12s ease-out;
}

.hotel-theme-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 35%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.65) 100%),
                linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 28%, rgba(0,0,0,0.7) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Header */
.hotel-theme-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 32px 55px 10px 55px;
}

.hotel-brand-wrap {
    display: flex;
    flex-direction: column;
}

.hotel-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hotel-equalizer-badge {
    border: 2px solid #22c55e;
    border-radius: 8px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.hotel-equalizer-badge .eq-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 4px;
}

.hotel-equalizer-badge .eq-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 2px;
}

.hotel-equalizer-badge .eq-line {
    width: 2px;
    height: 12px;
    background: #22c55e;
    border-radius: 1px;
}

.hotel-brand-text {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
    line-height: 1;
    display: flex;
    align-items: baseline;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.hotel-solution-subtitle {
    font-size: 2.2rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-top: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

/* Big Digital Clock */
.hotel-clock-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    text-shadow: 0 3px 12px rgba(0,0,0,0.8);
}

.hotel-date-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}

.hotel-full-date {
    font-size: 1.25rem;
    font-weight: 500;
    color: #f1f5f9;
}

.hotel-day-name {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.hotel-big-time {
    font-size: 5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 0.9;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

/* Main Container */
.hotel-main-container {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 55px;
}

.hotel-grid-wrapper {
    display: flex;
    gap: 16px;
    max-width: 1420px;
    width: 100%;
    align-items: stretch;
}

/* Spotlight Card: ROOM 102 */
.hotel-spotlight-card {
    flex: 0 0 280px;
    height: 336px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hotel-spotlight-card:hover,
.hotel-spotlight-card:focus {
    transform: scale(1.035);
    border-color: #22c55e;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(34, 197, 94, 0.4);
}

.spotlight-header-overlay {
    padding: 18px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 65%, transparent 100%);
    z-index: 3;
}

.spotlight-room-number {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}

.spotlight-room-sub {
    font-size: 0.95rem;
    color: #cbd5e1;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.spotlight-footer-hint {
    padding: 12px 18px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cluster of Center & Right Tiles */
.hotel-tiles-cluster {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    justify-content: center;
}

.hotel-tiles-row {
    display: flex;
    gap: 14px;
    height: 161px;
}

/* Hotel Standard Tile */
.hotel-tile {
    flex: 1;
    background: rgba(12, 17, 28, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    outline: none;
    text-align: center;
}

.hotel-tile:hover,
.hotel-tile:focus {
    transform: scale(1.05);
    border-color: #38bdf8;
    background: rgba(22, 32, 52, 0.85);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.7), 0 0 22px rgba(56, 189, 248, 0.35);
}

.hotel-tile .tile-icon-holder {
    font-size: 2.35rem;
    color: #ffffff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
}

.hotel-tile:hover .tile-icon-holder,
.hotel-tile:focus .tile-icon-holder {
    transform: scale(1.1);
}

.hotel-tile .tile-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* Photo Tiles */
.hotel-tile.tile-photo {
    background-size: cover;
    background-position: center;
    justify-content: flex-end;
    padding-bottom: 14px;
}

.hotel-tile .tile-photo-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.15) 50%, transparent 100%);
    z-index: 1;
}

.hotel-tile.tile-photo .tile-label {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px #000;
}

.hotel-tile.tile-series:hover,
.hotel-tile.tile-series:focus {
    border-color: #a855f7;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.7), 0 0 24px rgba(168, 85, 247, 0.5);
}

/* Wide Tiles (DINING and ROOM SERVICES) */
.hotel-tile.tile-wide {
    flex: 1.85;
}

/* Footer */
.hotel-theme-footer {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 55px 22px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    font-size: 0.85rem;
    color: #94a3b8;
}

.hotel-footer-left {
    display: flex;
    align-items: center;
}

.hotel-status-pip {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    margin-right: 8px;
}

.hotel-key-tip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 4px 10px;
    margin: 0 4px;
    color: #cbd5e1;
    font-size: 0.8rem;
}

.hotel-key-tip kbd {
    color: #38bdf8;
    font-weight: 700;
}

.hotel-license {
    color: #e5a93b;
    font-weight: 600;
}

/* Responsive adjustments for screens */
@media (max-width: 1024px) {
    .hotel-theme-header {
        padding: 20px 25px 8px;
    }
    .hotel-solution-subtitle {
        font-size: 1.7rem;
    }
    .hotel-big-time {
        font-size: 3.8rem;
    }
    .hotel-main-container {
        padding: 10px 25px;
    }
    .hotel-spotlight-card {
        flex: 0 0 220px;
        height: 290px;
    }
    .hotel-tiles-row {
        height: 138px;
    }
    .hotel-theme-footer {
        padding: 10px 25px 16px;
    }
}

/* ---------------- APPLE iOS INSTALLATION & SETUP MODAL ---------------- */
.ios-modal-tabs {
    display: flex;
    background: rgba(14, 19, 33, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    gap: 8px;
}

.ios-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.ios-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.ios-tab-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.ios-tab-badge {
    font-size: 0.65rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #000;
    padding: 2px 7px;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ios-tab-pane {
    display: none;
    animation: fadeInTab 0.2s ease;
}

.ios-tab-pane.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.ios-feature-banner {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.ios-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.ios-steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ios-step-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 12px 14px;
    transition: all 0.2s ease;
}

.ios-step-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.ios-step-item .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

.ios-step-item .step-content {
    flex: 1;
}

.ios-step-item .step-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.ios-step-item .step-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.35;
}

.btn-apple-store-download {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #000000;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 14px;
    padding: 12px 28px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    user-select: none;
}

.btn-apple-store-download:hover {
    border-color: #ffffff;
    background: #0d0d0d;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

#ios-auto-dl-notice {
    animation: fadeInNotice 0.3s ease;
}

@keyframes fadeInNotice {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.ios-credentials-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ios-cred-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.ios-cred-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 7px 12px;
}

.ios-cred-row .cred-label {
    font-size: 0.76rem;
    color: #94a3b8;
    width: 80px;
    flex-shrink: 0;
}

.ios-cred-row .cred-val {
    font-size: 0.82rem;
    color: #38bdf8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-copy-chip.sm {
    padding: 4px 10px;
    font-size: 0.72rem;
    border-radius: 6px;
}

/* ---------------- LIVE TV CONTINUOUS BROADCAST MODE (NO PAUSE / NO SEEKBAR) ---------------- */
.live-stream-active #video-player::-webkit-media-controls-timeline,
.live-stream-active #video-player::-webkit-media-controls-play-button,
.live-stream-active #video-player::-webkit-media-controls-seek-back-button,
.live-stream-active #video-player::-webkit-media-controls-seek-forward-button {
    display: none !important;
}

/* ---------------- IN-PLAYER MINI CHANNEL DRAWER (QUICK ZAP LIST) ---------------- */
.player-mini-channel-drawer {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 360px;
    max-width: 86vw;
    background: rgba(8, 12, 24, 0.94);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 0, 0, 0.5);
    z-index: 2010;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: miniDrawerSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes miniDrawerSlideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mini-drawer-header {
    padding: 18px 20px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-drawer-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mini-drawer-badge-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(202, 138, 4, 0.15));
    border: 1px solid rgba(234, 179, 8, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #facc15;
    font-size: 1rem;
}

.mini-drawer-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    margin: 0;
    letter-spacing: -0.01em;
}

.mini-drawer-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
    display: block;
    margin-top: 1px;
}

.mini-drawer-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mini-drawer-close-btn:hover,
.mini-drawer-close-btn:focus {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.mini-drawer-cat-wrap {
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 23, 42, 0.4);
}

.mini-drawer-cat-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mini-drawer-cat-select {
    width: 100%;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f8fafc;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.mini-drawer-cat-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.mini-drawer-search-wrap {
    position: relative;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-drawer-search-wrap .search-icon {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.8rem;
}

.mini-drawer-search-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border-radius: 20px;
    padding: 7px 32px 7px 34px;
    font-size: 0.8rem;
    outline: none;
    transition: all 0.2s ease;
}

.mini-drawer-search-input:focus {
    background: rgba(15, 23, 42, 0.9);
    border-color: #eab308;
    box-shadow: 0 0 12px rgba(234, 179, 8, 0.2);
}

.mini-drawer-search-clear {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px;
}

.mini-drawer-channels-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
}

.mini-channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.18s ease;
    outline: none;
    user-select: none;
}

.mini-channel-item:hover,
.mini-channel-item:focus {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.5);
    transform: translateX(4px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.mini-channel-item.active {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.22), rgba(16, 185, 129, 0.1));
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.2);
}

.mini-channel-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    min-width: 22px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.mini-channel-item.active .mini-channel-num {
    color: #4ade80;
}

.mini-channel-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    object-fit: contain;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mini-channel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mini-channel-thumb-placeholder {
    color: #94a3b8;
    font-size: 0.95rem;
}

.mini-channel-info {
    flex: 1;
    overflow: hidden;
}

.mini-channel-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-channel-meta {
    font-size: 0.68rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.mini-channel-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    display: inline-block;
}

.mini-channel-playing-tag {
    font-size: 0.62rem;
    font-weight: 800;
    color: #4ade80;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mini-drawer-footer {
    padding: 10px 16px;
    background: rgba(10, 15, 29, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: #64748b;
}

.mini-drawer-footer kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.68rem;
    color: #e2e8f0;
    font-family: inherit;
}

/* ==========================================================================
   FLOATER AI ASSISTANT (FLOATING ORB & CHAT DRAWER)
   ========================================================================== */
/* Hide Floater AI Assistant completely during video playback (Live TV, Movies, Series) */
#player-overlay.active ~ #floater-ai-container,
body.player-is-active #floater-ai-container {
    display: none !important;
}

.floater-ai-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Floating Orb Trigger */
.floater-ai-orb {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d9488 0%, #06b6d4 50%, #3b82f6 100%);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 26px rgba(13, 148, 136, 0.45), 0 0 16px rgba(6, 182, 212, 0.35);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.floater-ai-orb:hover,
.floater-ai-orb:focus-visible {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 32px rgba(13, 148, 136, 0.65), 0 0 24px rgba(6, 182, 212, 0.55);
    border-color: #ffffff;
}

.floater-ai-orb:active {
    transform: scale(0.95);
}

.floater-ai-orb-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.floater-ai-icon {
    font-size: 1.55rem;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: floater-ai-bob 3s ease-in-out infinite;
}

.floater-ai-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45));
    animation: floater-ai-bob 3s ease-in-out infinite;
    pointer-events: none;
    user-select: none;
}

.floater-ai-avatar-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
    user-select: none;
}

@keyframes floater-ai-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Pulse Beacon */
.floater-ai-ping {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #2dd4bf;
    animation: floater-ai-pulse 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes floater-ai-pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    70% { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1.4); opacity: 0; }
}

.floater-ai-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #eab308, #f59e0b);
    color: #0f172a;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 8px;
    border: 1.5px solid #0f172a;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Floating Chat Window */
.floater-ai-window {
    position: absolute;
    bottom: 74px;
    right: 0;
    width: 385px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: rgba(11, 17, 32, 0.94);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65), 0 0 35px rgba(13, 148, 136, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: floater-ai-appear 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

@keyframes floater-ai-appear {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Window Header */
.floater-ai-header {
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.floater-ai-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.floater-ai-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0d9488, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.floater-ai-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

.floater-ai-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
}

.floater-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    display: inline-block;
}

.floater-ai-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    outline: none;
}

.floater-ai-close-btn:hover,
.floater-ai-close-btn:focus-visible {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}

/* Chat Messages */
.floater-ai-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.floater-ai-messages::-webkit-scrollbar {
    width: 5px;
}
.floater-ai-messages::-webkit-scrollbar-track {
    background: transparent;
}
.floater-ai-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.floater-ai-msg-wrap {
    display: flex;
    flex-direction: column;
    max-width: 86%;
    animation: floater-msg-in 0.22s ease-out;
}

@keyframes floater-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.floater-ai-msg-wrap.bot {
    align-self: flex-start;
}

.floater-ai-msg-wrap.user {
    align-self: flex-end;
}

.floater-msg-sender {
    font-size: 0.68rem;
    color: #64748b;
    margin-bottom: 3px;
    font-weight: 600;
}

.floater-ai-msg-wrap.user .floater-msg-sender {
    text-align: right;
    color: #38bdf8;
}

.floater-msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.83rem;
    line-height: 1.45;
    word-break: break-word;
}

.floater-ai-msg-wrap.bot .floater-msg-bubble {
    background: rgba(30, 41, 59, 0.85);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.floater-ai-msg-wrap.user .floater-msg-bubble {
    background: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.floater-msg-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 3px;
    align-self: flex-end;
}

/* Typing Indicator */
.floater-typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 6px 4px;
}

.floater-typing-dots span {
    width: 6px;
    height: 6px;
    background: #2dd4bf;
    border-radius: 50%;
    animation: floater-dot-pulse 1.4s infinite ease-in-out both;
}

.floater-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.floater-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes floater-dot-pulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Suggestion Pills */
.floater-ai-suggestions {
    padding: 8px 14px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.45);
    flex-shrink: 0;
}

.floater-ai-suggestions::-webkit-scrollbar {
    height: 3px;
}
.floater-ai-suggestions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.floater-pill {
    padding: 5px 11px;
    background: rgba(13, 148, 136, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.3);
    color: #5eead4;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    flex-shrink: 0;
    outline: none;
}

.floater-pill:hover,
.floater-pill:focus-visible {
    background: rgba(20, 184, 166, 0.28);
    border-color: #2dd4bf;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

/* Input Form */
.floater-ai-input-wrap {
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.floater-ai-input {
    flex: 1;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 9px 13px;
    font-size: 0.84rem;
    color: #f8fafc;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.floater-ai-input:focus {
    border-color: #2dd4bf;
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.2);
}

.floater-ai-input::placeholder {
    color: #64748b;
    font-size: 0.82rem;
}

.floater-ai-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #0d9488, #06b6d4);
    border: none;
    color: #ffffff;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s, box-shadow 0.18s;
    flex-shrink: 0;
    outline: none;
}

.floater-ai-send-btn:hover,
.floater-ai-send-btn:focus-visible {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.45);
}

.floater-ai-send-btn:active {
    transform: scale(0.94);
}

@media (max-width: 480px) {
    .floater-ai-container {
        bottom: 16px;
        right: 16px;
    }
    .floater-ai-orb {
        width: 52px;
        height: 52px;
    }
    .floater-ai-icon {
        font-size: 1.4rem;
    }
    .floater-ai-window {
        width: calc(100vw - 32px);
        height: 480px;
        bottom: 66px;
    }
}

/* ==============================================================
   FLASH ADS & SPONSORED AUTO-CLOSE OVERLAY
   ============================================================== */
.flash-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.flash-ad-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.flash-ad-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.flash-ad-dialog {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 620px;
    background: #0f172a;
    border: 2px solid rgba(245, 158, 11, 0.45);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.85), 0 0 30px rgba(245, 158, 11, 0.2);
    transform: scale(0.92);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.flash-ad-overlay.active .flash-ad-dialog {
    transform: scale(1);
}

.flash-ad-header {
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.flash-ad-tag {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 6px;
}

.flash-ad-close-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    outline: none;
    transition: all 0.2s ease;
}

.flash-ad-close-badge:hover,
.flash-ad-close-badge:focus-visible {
    background: rgba(239, 68, 68, 0.35);
    border-color: #ef4444;
    color: #ffffff;
    transform: scale(1.05);
}

.flash-ad-body {
    background: #000000;
    min-height: 200px;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.flash-ad-body img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.flash-ad-body video {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.flash-ad-footer {
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.flash-ad-title-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flash-ad-scan-pill {
    flex-shrink: 0;
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid rgba(20, 184, 166, 0.35);
    color: #2dd4bf;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.flash-ad-progress-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.flash-ad-progress-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

@media (max-width: 600px) {
    .flash-ad-dialog {
        width: 95%;
        border-radius: 12px;
    }
    .flash-ad-body {
        max-height: 280px;
    }
}

/* ==========================================================================
   SUBSCRIPTION EXPIRATION WARNING TOAST & BANNER (TV & WEB)
   ========================================================================== */
.expiry-warning-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.94) 100%);
    border: 1.5px solid rgba(245, 158, 11, 0.85);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(245, 158, 11, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 99999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(110%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.expiry-warning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.expiry-warning-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 800;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expiry-warning-badge {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
}

.expiry-warning-badge.critical {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
    color: #fca5a5;
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.expiry-warning-body {
    font-size: 0.84rem;
    color: #e2e8f0;
    line-height: 1.45;
}

.expiry-warning-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.expiry-warning-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expiry-warning-btn:hover, .expiry-warning-btn:focus {
    background: #f59e0b;
    color: #0f172a;
    border-color: #f59e0b;
    outline: none;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

/* ==========================================================================
   FULLSCREEN MAINTENANCE OVERLAY SCREEN (TV & WEB)
   ========================================================================== */
.maintenance-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1e293b 0%, #060911 100%);
    z-index: 999999999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.maintenance-card {
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid rgba(245, 158, 11, 0.5);
    border-radius: 20px;
    padding: 36px 40px;
    max-width: 580px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(245, 158, 11, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: fadeInScale 0.4s ease;
}

.maintenance-icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 2px solid rgba(245, 158, 11, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #fbbf24;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
}

.maintenance-pill {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fde68a;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 9999px;
}

.maintenance-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.maintenance-desc {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
}

.maintenance-btn-retry {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.92rem;
    padding: 12px 28px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.maintenance-btn-retry:hover, .maintenance-btn-retry:focus {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
    outline: none;
}

/* ==========================================================================
   BROADCAST IN-APP POPUP MODAL (TV & WEB)
   ========================================================================== */
.broadcast-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInScale 0.3s ease;
}

.broadcast-modal-box {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid rgba(56, 189, 248, 0.6);
    border-radius: 18px;
    max-width: 520px;
    width: 100%;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.3);
    text-align: center;
}

.broadcast-modal-icon {
    font-size: 2.2rem;
    color: #38bdf8;
    margin-bottom: 12px;
}

.broadcast-modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.broadcast-modal-content {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 20px;
}

.broadcast-modal-close-btn {
    background: #0284c7;
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.broadcast-modal-close-btn:hover, .broadcast-modal-close-btn:focus {
    background: #38bdf8;
    color: #0f172a;
    outline: none;
}





