/* assets/css/style.css */
:root {
    --bg-dark: #060913; /* Very dark blue/black */
    --bg-card: #0f172a; 
    --bg-hover: #1e293b;
    --primary: #00b4d8; /* Cyan */
    --primary-hover: #0096c7;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255,255,255,0.05);
}

body { margin: 0; padding-bottom: 60px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--bg-dark); color: var(--text-main); overflow-x: hidden; }
@media (min-width: 769px) { body { padding-bottom: 0; } }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-hover); }

/* Navbar */
.navbar { background: transparent; padding: 15px 40px; display: flex; justify-content: space-between; align-items: center; position: absolute; top: 0; left: 0; right: 0; z-index: 100; background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%); }
.nav-left, .nav-right { display: flex; align-items: center; gap: 30px; }
.nav-brand img { height: 45px; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: var(--text-main); font-weight: 500; font-size: 15px; position: relative; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px; background: var(--primary); }

/* Dropdown */
.dropdown-wrapper { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: rgba(15,23,42,0.95); backdrop-filter: blur(10px); min-width: 200px; max-height: 400px; overflow-y: auto; border-radius: 8px; border: 1px solid var(--border-color); padding: 10px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 200; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--primary) transparent; }
.dropdown-menu::-webkit-scrollbar { width: 6px; }
.dropdown-menu::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 6px; }
.dropdown-wrapper:hover .dropdown-menu { display: flex; }
.dropdown-menu a { padding: 10px 20px; color: var(--text-muted); font-size: 14px; font-weight: normal; }
.dropdown-menu a:hover { background: rgba(255,255,255,0.05); color: #fff; }

.search-box { position: relative; display: flex; align-items: center; }
.search-box svg { position: absolute; left: 10px; width: 18px; height: 18px; color: var(--text-muted); }
.search-box input { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 8px 15px 8px 35px; color: #fff; width: 250px; font-size: 14px; transition: all 0.3s; }
.search-box input:focus { outline: none; background: rgba(255,255,255,0.2); border-color: var(--primary); }
.nav-icon svg { width: 22px; height: 22px; color: #fff; }
.avatar { width: 35px; height: 35px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: bold; color: #fff; }

.desktop-only { display: flex; }
.mobile-only { display: none; }

/* Hero Banner */
.hero-banner { position: relative; height: 75vh; min-height: 500px; display: flex; align-items: flex-end; padding: 40px; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0.4; filter: blur(5px); z-index: 1; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, var(--bg-dark) 0%, rgba(6,9,19,0.3) 50%, rgba(6,9,19,0.1) 100%); z-index: 2; }
.hero-content { position: relative; z-index: 3; max-width: 600px; margin-bottom: 20px; }
.hero-tag { font-size: 12px; font-weight: bold; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; }
.hero-title { font-size: 3rem; margin: 0 0 15px 0; font-weight: 800; line-height: 1.1; }
.hero-desc { font-size: 16px; color: var(--text-muted); margin-bottom: 25px; line-height: 1.5; }
.hero-buttons { display: flex; gap: 15px; }
.btn { padding: 12px 25px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; font-size: 15px; transition: transform 0.2s; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #e2e8f0; transform: scale(1.05); }
.btn-secondary { background: rgba(255,255,255,0.2); color: #fff; backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(255,255,255,0.3); transform: scale(1.05); }

/* Catalog Container */
.catalog-container { padding: 0 40px 40px 40px; position: relative; z-index: 5; margin-top: -50px; }

/* Category Rows */
.category-row-section { margin-bottom: 40px; }
.category-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 15px; }
.category-header h2 { margin: 0; font-size: 20px; font-weight: 600; }
.see-all { font-size: 13px; color: var(--text-muted); }
.see-all:hover { color: #fff; }

.category-carousel-wrapper { position: relative; }
.category-carousel { display: flex; gap: 15px; overflow-x: auto; scrollbar-width: none; /* Firefox */ -ms-overflow-style: none; /* IE */ scroll-behavior: smooth; padding-bottom: 15px; }
.category-carousel::-webkit-scrollbar { display: none; /* Chrome */ }

.carousel-btn { position: absolute; top: 40%; transform: translateY(-50%); background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: opacity 0.3s; }
.carousel-btn:hover { background: rgba(0,0,0,0.8); border-color: var(--primary); }
.prev-btn { left: -20px; }
.next-btn { right: -20px; }
.carousel-btn svg { width: 24px; height: 24px; }

/* Channel Card */
.channel-card { min-width: 240px; width: 240px; background: var(--bg-card); border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; border: 1px solid var(--border-color); }
.channel-card:hover { transform: scale(1.05); box-shadow: 0 10px 20px rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.2); z-index: 2; position: relative; }
.channel-logo { width: 100%; aspect-ratio: 16/9; object-fit: contain; background: #000; }
.channel-info { padding: 15px; }
.channel-name { font-weight: 600; font-size: 15px; margin-bottom: 5px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-category { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; }
.live-badge { font-size: 10px; color: #ef4444; font-weight: bold; text-transform: uppercase; border: 1px solid #ef4444; padding: 2px 4px; border-radius: 4px; display: inline-block; }

/* Grid for Search/Ver Tudo */
.channels-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; padding-bottom: 50px; }
.channels-grid .channel-card { min-width: 0; width: 100%; }

/* Mobile Bottom Nav */
.mobile-bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(15,23,42,0.95); backdrop-filter: blur(10px); display: flex; justify-content: space-around; padding: 10px 5px; border-top: 1px solid var(--border-color); z-index: 1000; }
.mobile-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); font-size: 10px; flex: 1; }
.mobile-bottom-nav a.active { color: var(--primary); }
.mobile-bottom-nav svg { width: 22px; height: 22px; }

/* Login Page Upgrade */
.login-body { display: flex; height: 100vh; background: var(--bg-dark); }
.login-left { flex: 1.5; background: url('https://images.unsplash.com/photo-1593789382576-54f489cea51d?q=80&w=2070&auto=format&fit=crop') center/cover; position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to right, rgba(6,9,19,0.9) 0%, rgba(6,9,19,0.4) 100%); }
.login-left-content { position: relative; z-index: 2; max-width: 500px; }
.login-left-content h1 { font-size: 3.5rem; margin-bottom: 15px; color: var(--primary); line-height: 1.1; }
.login-left-content p { font-size: 1.2rem; color: #cbd5e1; line-height: 1.6; }
.login-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg-dark); border-left: 1px solid var(--border-color); }
.login-container { width: 100%; max-width: 380px; }
.login-container img { height: 50px; margin-bottom: 30px; display: block; }
.login-container h2 { margin: 0 0 25px 0; font-size: 1.8rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.form-group input { width: 100%; padding: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); color: #fff; border-radius: 8px; transition: all 0.3s; }
.form-group input:focus { border-color: var(--primary); background: rgba(255,255,255,0.05); outline: none; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 16px; background: var(--primary); color: #fff; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }
.btn-block:hover { background: var(--primary-hover); }

/* Other fixes */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: #ef4444; }

/* Player Container */
.player-container { margin: 100px auto 40px auto; max-width: 1000px; padding: 0 20px; }
.player-container video { box-shadow: 0 20px 40px rgba(0,0,0,0.8); border: 1px solid var(--border-color); object-fit: contain; max-height: 70vh; width: 100%; border-radius: 12px; }

/* Admin Container */
.container.admin-grid { margin-top: 100px; display: grid; grid-template-columns: 250px 1fr; gap: 30px; }
.admin-sidebar { background: rgba(15,23,42,0.8); backdrop-filter: blur(10px); padding: 25px; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); }
.admin-sidebar a { display: flex; align-items: center; padding: 12px 20px; color: var(--text-muted); text-decoration: none; margin-bottom: 10px; border-radius: 10px; transition: all 0.3s; font-weight: 500; }
.admin-sidebar a:hover { background: rgba(255,255,255,0.05); color: #fff; transform: translateX(5px); }
.admin-content { background: rgba(15,23,42,0.8); backdrop-filter: blur(10px); padding: 35px; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); }

/* Responsive */
@media (max-width: 900px) {
    .login-body { flex-direction: column; }
    .login-left { display: none; }
    .login-right { flex: 1; border-left: none; }
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
    
    .navbar { padding: 15px 20px; background: var(--bg-dark); position: fixed; border-bottom: 1px solid var(--border-color); }
    .nav-brand img { height: 30px; }
    .mobile-menu-btn { background: none; border: none; color: #fff; padding: 0; cursor: pointer; }
    .mobile-menu-btn svg { width: 28px; height: 28px; }
    
    .hero-banner { min-height: 400px; height: 50vh; padding: 20px; align-items: flex-end; margin-top: 60px; }
    .hero-title { font-size: 2rem; }
    .hero-desc { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    
    .catalog-container { padding: 20px; margin-top: -20px; }
    .carousel-btn { display: none; } /* Hide arrows on mobile, rely on swipe */
    .channel-card { min-width: 160px; width: 160px; }
    .channel-logo { height: 90px; }
    .channel-name { font-size: 12px; }
    
    /* Navigation drawer for mobile (if needed, otherwise rely on bottom nav) */
    .nav-links { display: none; position: fixed; top: 60px; left: 0; width: 100%; background: var(--bg-dark); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border-color); z-index: 99; }
    .nav-links.active { display: flex; }
    
    .channels-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; padding-bottom: 70px; }
}
