/* ================================================= */
/* 1. Login & Registration Page Styles (auth-page)   */
/* ================================================= */
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,800');

body.auth-page { background: #f6f5f7; display: flex; justify-content: center; align-items: center; flex-direction: column; font-family: 'Montserrat', sans-serif; height: 100vh; margin: 0; }
.auth-page h1 { font-weight: bold; margin: 0; }
.auth-page p { font-size: 14px; font-weight: 100; line-height: 20px; letter-spacing: 0.5px; margin: 20px 0 30px; }
.auth-page a { color: #333; font-size: 14px; text-decoration: none; margin: 15px 0; }
.auth-page button { border-radius: 20px; border: 1px solid #FF4B2B; background-color: #FF4B2B; color: #FFFFFF; font-size: 12px; font-weight: bold; padding: 12px 45px; letter-spacing: 1px; text-transform: uppercase; transition: transform 80ms ease-in; cursor: pointer; }
.auth-page button:active { transform: scale(0.95); }
.auth-page button:focus { outline: none; }
.auth-page button.ghost { background-color: transparent; border-color: #FFFFFF; }
.auth-page form { background-color: #FFFFFF; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 0 50px; height: 100%; text-align: center; }
.auth-page input { background-color: #eee; border: none; padding: 12px 15px; margin: 8px 0; width: 100%; border-radius: 8px; }
.auth-page .remember-me { align-self: flex-start; margin: -5px 0 15px 0; font-size: 13px; color: #555; display: flex; align-items: center; }
.auth-page .remember-me input[type="checkbox"] { width: auto; margin: 0 5px 0 0; }
.auth-page form h1 { margin-bottom: 20px; }
.auth-page form button { margin-top: 15px; }

/* Desktop Animated Container */
.desktop-view .container { background-color: #fff; border-radius: 10px; box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); position: relative; overflow: hidden; width: 1024px; max-width: 100%; min-height: 600px; }
.desktop-view .form-container { position: absolute; top: 0; height: 100%; transition: all 0.6s ease-in-out; }
.desktop-view .sign-in-container { left: 0; width: 50%; z-index: 2; }
.desktop-view .container.right-panel-active .sign-in-container { transform: translateX(100%); }
.desktop-view .sign-up-container { left: 0; width: 50%; opacity: 0; z-index: 1; }
.desktop-view .container.right-panel-active .sign-up-container { transform: translateX(100%); opacity: 1; z-index: 5; animation: show 0.6s; }
@keyframes show { 0%, 49.99% { opacity: 0; z-index: 1; } 50%, 100% { opacity: 1; z-index: 5; } }
.desktop-view .overlay-container { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; overflow: hidden; transition: transform 0.6s ease-in-out; z-index: 100; }
.desktop-view .container.right-panel-active .overlay-container{ transform: translateX(-100%); }
.desktop-view .overlay { background: #FF416C; background: linear-gradient(to right, #FF4B2B, #FF416C); color: #FFFFFF; position: relative; left: -100%; height: 100%; width: 200%; transform: translateX(0); transition: transform 0.6s ease-in-out; }
.desktop-view .container.right-panel-active .overlay { transform: translateX(50%); }
.desktop-view .overlay-panel { position: absolute; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 0 10px; text-align: center; top: 0; height: 100%; width: 50%; transform: translateX(0); transition: transform 0.6s ease-in-out; }
.desktop-view .overlay-panel p { font-size: 13.5px; font-weight: 100; line-height: 1.4; letter-spacing: 0.5px; margin: 15px 0 20px; }
.desktop-view .overlay-panel h1 { font-size: 28px; }
.desktop-view .overlay-left { transform: translateX(-20%); }
.desktop-view .container.right-panel-active .overlay-left { transform: translateX(0); }
.desktop-view .overlay-right { right: 0; transform: translateX(0); }
.desktop-view .container.right-panel-active .overlay-right { transform: translateX(20%); }
.desktop-view .form-container .error, .desktop-view .form-container .success { font-size: 14px; font-weight: bold; margin: -5px 0 10px 0; width: 100%; text-align: center; }
.desktop-view .form-container .error { color: #FF4B2B; }
.desktop-view .form-container .success { color: #4CAF50; }

/* Mobile Only Auth Page Styles */
.mobile-device .mobile-container { background: #FFFFFF; padding: 3rem 2rem; border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); width: 90%; max-width: 440px; box-sizing: border-box; text-align: center; }
.mobile-device .mobile-container h1 { margin-bottom: 2rem; }
.mobile-device .mobile-container form { padding: 0; }
.mobile-device .mobile-container .mobile-switch { margin-top: 25px; font-size: 14px; }
.mobile-device .mobile-container .mobile-switch a { color: #FF4B2B; font-weight: bold; }
.mobile-device .mobile-container form button { margin-top: 15px; }
.mobile-device .mobile-container .remember-me { display: flex; justify-content: flex-start; align-items: center; margin: 0 0 15px 0; font-size: 13px; color: #555; }
.mobile-device .mobile-container .error { color: #FF4B2B; font-size: 14px; font-weight: bold; margin-bottom: 15px;}
.mobile-device .mobile-container .success { color: #4CAF50; font-size: 14px; font-weight: bold; margin-bottom: 15px; }
.mobile-device .container { display: none; }
body:not(.mobile-device) .mobile-container { display: none; }


/* ================================================= */
/* 2. Dashboard Page Styles (dashboard-page)         */
/* ================================================= */
.dashboard-page { margin: 0; background-color: #f0f2f5; font-family: 'Montserrat', sans-serif; }
.dashboard-page .dashboard-container { display: flex; min-height: 100vh; }
.dashboard-page .dashboard-sidebar { width: 260px; background: #ffffff; box-shadow: 2px 0 10px rgba(0,0,0,0.05); display: flex; flex-direction: column; padding: 2rem 1.5rem; box-sizing: border-box; }
.dashboard-page .sidebar-logo { text-align: center; font-size: 1.8rem; margin-bottom: 2.5rem; color: #333; }
.dashboard-page .sidebar-nav ul { list-style: none; padding: 0; margin: 0; }
.dashboard-page .sidebar-nav li a { display: flex; align-items: center; padding: 1rem; color: #555; text-decoration: none; border-radius: 8px; margin-bottom: 0.5rem; font-weight: 500; transition: background-color 0.2s ease, color 0.2s ease; }
.dashboard-page .sidebar-nav li a:hover { background-color: #f0f2f5; color: #FF4B2B; }
.dashboard-page .sidebar-nav li a i { width: 20px; margin-right: 15px; font-size: 1.1rem; text-align: center; }
.dashboard-page .sidebar-footer { margin-top: auto; }
.dashboard-page .logout-link { display: flex; align-items: center; padding: 1rem; color: #dc3545; text-decoration: none; border-radius: 8px; font-weight: 500; transition: background-color 0.2s ease; }
.dashboard-page .logout-link:hover { background-color: #fbebee; }
.dashboard-page .logout-link i { width: 20px; margin-right: 15px; }
.dashboard-page .dashboard-main { flex-grow: 1; padding: 3rem; }
.dashboard-page .main-header h2 { margin: 0; font-size: 2rem; color: #222; }
.dashboard-page .main-header p { color: #666; margin-top: 0.5rem; }
.dashboard-page .dashboard-cards { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.dashboard-page .card { background: #ffffff; border-radius: 10px; padding: 1.5rem; text-decoration: none; color: #333; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.dashboard-page .card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.dashboard-page .card-icon { font-size: 2rem; color: #FF4B2B; margin-bottom: 1rem; }
.dashboard-page .card h3 { margin: 0 0 0.5rem 0; }
.dashboard-page .card p { font-size: 0.9rem; color: #777; margin: 0; line-height: 1.5; }
.dashboard-page .primary-card { background: #FF4B2B; color: white; }
.dashboard-page .primary-card .card-icon, .dashboard-page .primary-card h3, .dashboard-page .primary-card p { color: white; }

/* Dashboard Mobile Responsive */
@media (max-width: 768px) {
    .dashboard-page .dashboard-container { flex-direction: column; }
    .dashboard-page .dashboard-sidebar { width: 100%; height: auto; box-shadow: 0 2px 10px rgba(0,0,0,0.05); padding: 1rem; }
    .dashboard-page .sidebar-logo { margin-bottom: 1.5rem; }
    .dashboard-page .sidebar-nav ul { display: flex; overflow-x: auto; padding-bottom: 10px; }
    .dashboard-page .sidebar-nav li { flex-shrink: 0; }
    .dashboard-page .sidebar-nav li a span, .dashboard-page .sidebar-footer span { display: none; }
    .dashboard-page .sidebar-nav li a { justify-content: center; }
    .dashboard-page .sidebar-footer { display: none; }
    .dashboard-page .dashboard-main { padding: 1.5rem; }
    .dashboard-page .main-header h2 { font-size: 1.5rem; }
}

/* ================================================= */
/* 3. IPTV Player Page Styles (iptv-page)            */
/* ================================================= */
.iptv-page { background-color: #121212; font-family: Arial, sans-serif; }
.iptv-page .container { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; box-sizing: border-box; }
.iptv-page .player-box { background: none; box-shadow: none; max-width: 1200px; width: 100%; text-align: center; }
.iptv-page .iptv-container { display: flex; flex-direction: row; width: 100%; height: 70vh; background-color: #2c2c2c; border-radius: 8px; overflow: hidden; }
.iptv-page .player-area { flex-grow: 1; background-color: #000; display: flex; justify-content: center; align-items: center; }
.iptv-page .channel-list { width: 250px; background-color: #1f1f1f; color: white; padding: 10px; overflow-y: auto; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; }
.iptv-page .channel-list ul { list-style-type: none; padding: 0; margin: 0; flex-grow: 1; }
.iptv-page .channel-list li { padding: 12px 10px; cursor: pointer; border-bottom: 1px solid #333; font-size: 14px; transition: background-color 0.2s; }
.iptv-page .channel-list li:hover, .iptv-page .channel-list li.active { background-color: #5a6d8; }
.iptv-page .channel-list-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #444; padding: 0 10px 10px 10px; margin-bottom: 10px; }
.iptv-page .channel-list-header h3 { margin: 0; padding: 0; border-bottom: none; color: #fff; }
.iptv-page .back-btn { background: none; border: none; color: #a0a0a0; font-size: 14px; cursor: pointer; font-weight: bold; }
.iptv-page .back-btn:hover { color: white; }
.iptv-page .back-btn.hidden { display: none; }
.iptv-page .special-channels { padding: 10px 0 0 0; margin-top: 15px; border-top: 2px solid #444; }
.iptv-page #sybilRawButton { width: 100%; padding: 12px; background-color: #8B5CF6; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 15px; font-weight: bold; }
.iptv-page #sybilRawButton:hover { background-color: #7C3AED; }
.iptv-page .iptv-btn { display: inline-block; margin-top: 20px; margin-right: 10px; padding: 10px 20px; background-color: #007bff; color: white; border-radius: 4px; text-decoration: none; }
.iptv-page .iptv-btn:hover { background-color: #0056b3; text-decoration: none; }
.iptv-page .logout-btn { display: inline-block; margin-top: 20px; padding: 10px 20px; background-color: #dc3545; color: white; border-radius: 4px; text-decoration: none; }
.iptv-page .logout-btn:hover { background-color: #c82333; text-decoration: none; }
.iptv-page .video-js { width: 100% !important; height: 100% !important; }
.iptv-page .vjs-fill .vjs-tech { object-fit: fill; }
.iptv-page .video-js .vjs-control-bar { display: flex; }
.iptv-page .video-js .vjs-fullscreen-control { margin-left: auto; }

/* ================================================= */
/* 3. IPTV Layout Specific Styles                    */
/* ================================================= */

/* This targets the body tag ONLY when it has both classes */
body.dashboard-page.iptv-layout .dashboard-main {
    padding: 0;
    display: flex;
    height: 100vh; /* Make main area full height of the viewport */
    background-color: #000;
}

.dashboard-page.iptv-layout .player-area {
    width: 100%;
    height: 100%;
    background: #000;
}

.dashboard-page.iptv-layout .vjs-fill .vjs-tech {
    object-fit: fill;
}

.dashboard-page.iptv-layout .video-js {
    width: 100% !important;
    height: 100% !important;
}

/* Styles for Channel List inside the sidebar */
.dashboard-sidebar .channel-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.dashboard-sidebar .channel-list-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #333; /* Match sidebar logo color */
}

.dashboard-sidebar .back-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

.dashboard-sidebar .back-btn:hover {
    color: #FF4B2B;
}

.dashboard-sidebar .back-btn.hidden {
    display: none;
}

.dashboard-sidebar .channel-list-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1; /* Allows the list to fill available space */
    overflow-y: auto; /* Adds scrollbar if list is long */
}

.dashboard-sidebar .channel-list-ul li {
    padding: 10px 5px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f5;
    font-size: 0.9rem;
    color: #555;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.dashboard-sidebar .channel-list-ul li:hover,
.dashboard-sidebar .channel-list-ul li.active {
    background-color: #fbebee;
    color: #FF4B2B;
}

.dashboard-sidebar .special-channels {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.dashboard-sidebar #sybilRawButton {
    width: 100%;
    padding: 12px;
    background-color: #8B5CF6; /* A nice purple */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.dashboard-sidebar #sybilRawButton:hover {
    background-color: #7C3AED;
}

/* Fullscreen Fix */
.player-area:-webkit-full-screen,
.player-area:fullscreen {
    width: 100vw;
    height: 100vh;
}

.player-area:-webkit-full-screen .vjs-tech,
.player-area:fullscreen .vjs-tech {
    object-fit: fill !important;
}
