:root { --primary: #00e5ff; --bg: #090a0f; --card: #151a22; --text: #ffffff; --text-muted: #8b9bb4; --header-bg: rgba(9,10,15,0.9); --border: rgba(255,255,255,0.05); --accent: #ff4757; }
.light-mode { --primary: #007bff; --bg: #f5f5f5; --card: #ffffff; --text: #222222; --text-muted: #555555; --header-bg: rgba(255,255,255,0.9); --border: rgba(0,0,0,0.1); }
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; margin: 0; padding: 0; transition: background 0.3s, color 0.3s; }
header { position: sticky; top: 0; z-index: 100; padding: 10px 20px 5px; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
h1 { margin: 0; font-size: 1.5rem; color: var(--primary); font-weight: 800; text-shadow: 0 0 15px rgba(0,229,255,0.3); transition: 0.3s; }
h1:active { transform: scale(0.95); }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { background: var(--card); border: 1px solid var(--border); color: var(--text); width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.3s; position: relative; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn.active { background: var(--primary); color: #000; }

.search-container { display: flex; gap: 10px; position: relative; margin-bottom: 10px; }
.search-container input { flex: 1; padding: 12px 18px; border-radius: 25px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 15px; outline: none; }
.search-container input:focus { border-color: var(--primary); }
.search-container button { background: var(--primary); color: #000; border: none; border-radius: 25px; padding: 0 22px; font-weight: bold; font-size: 14px; cursor: pointer; }

.continue-row { display: flex; gap: 10px; overflow-x: auto; padding: 5px 0 10px; scrollbar-width: none; }
.continue-row::-webkit-scrollbar { display: none; }
.continue-chip { background: var(--card); border: 1px solid var(--primary); border-radius: 20px; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; color: var(--primary); }

.filters-bar { display: flex; gap: 8px; align-items: center; padding-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.filters-bar::-webkit-scrollbar { display: none; }
.filter-select, .filter-btn { background: var(--card); color: var(--text); border: 1px solid var(--border); padding: 7px 14px; border-radius: 20px; outline: none; font-weight: bold; cursor: pointer; font-size: 13px; white-space: nowrap; }
.filter-select:focus { border-color: var(--primary); }

.hero-banner { position: relative; width: 100%; height: 45vh; min-height: 260px; max-height: 400px; border-radius: 16px; background-size: cover; background-position: center top; margin: 15px 0; display: block; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 0%, rgba(9,10,15,0.3) 100%); }
.hero-content { position: absolute; bottom: 20px; right: 20px; left: 20px; z-index: 2; }
.hero-title { font-size: 1.8rem; margin: 0 0 5px; font-weight: 900; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
.hero-plot { font-size: 0.85rem; color: #ddd; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.play-hero-btn { background: var(--primary); color: #000; border: none; padding: 10px 28px; border-radius: 25px; font-weight: bold; cursor: pointer; font-size: 15px; box-shadow: 0 4px 15px rgba(0,229,255,0.4); transition: 0.2s; }
.play-hero-btn:active { transform: scale(0.95); }

.movies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 15px; padding: 15px 20px; }
.movies-grid.list-view { grid-template-columns: 1fr; }
.movies-grid.list-view .movie-card { display: flex; height: 120px; }
.movies-grid.list-view .movie-card img { width: 80px; height: 120px; }
.movies-grid.list-view .movie-info { position: relative; background: transparent; padding: 10px; }

.movie-card { background: var(--card); border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; animation: fadeIn 0.4s ease-out; transition: transform 0.2s; }
.movie-card:hover { transform: translateY(-5px); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.movie-card img { width: 100%; height: 210px; object-fit: cover; display: block; background: #111; }
.progress-bar { position: absolute; bottom: 0; left: 0; height: 3px; background: var(--primary); z-index: 3; transition: width 0.3s; }
.movie-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 8px 8px; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%); }
.movie-info h3 { margin: 0 0 3px 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.movie-meta { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--text-muted); }
.badge { background: var(--primary); color: #000; padding: 1px 5px; border-radius: 3px; font-size: 9px; }
.badge.tv { background: var(--accent); color: #fff; }
.info-icon, .fav-icon, .share-icon { position: absolute; top: 8px; background: rgba(0,0,0,0.65); color: #fff; border: none; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5; }
.info-icon { right: 8px; }
.share-icon { right: 38px; }
.fav-icon { left: 8px; }
.fav-icon.favorited { color: var(--accent); }

.player-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 999; display: none; flex-direction: column; }
.player-header { flex-shrink: 0; padding: 12px; display: flex; justify-content: space-between; align-items: center; background: #090a0f; border-bottom: 1px solid #1f2833; }
.close-btn { background: var(--accent); border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tv-controls { flex-shrink: 0; display: none; gap: 8px; padding: 10px 15px; background: #090a0f; justify-content: center; border-bottom: 1px solid #1f2833; }
.tv-controls select { flex: 1; padding: 10px; background: var(--card); color: #fff; border: 1px solid rgba(0,229,255,0.3); border-radius: 8px; font-size: 13px; outline: none; text-align: center; }
.iframe-container { flex-grow: 1; width: 100%; position: relative; background: #000; }
iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #000; padding: 10px 25px; border-radius: 25px; font-weight: bold; z-index: 2000; opacity: 0; transition: opacity 0.3s, top 0.3s; pointer-events: none; }
.toast.show { opacity: 1; top: 40px; }

.skeleton-card { background: var(--card); border-radius: 12px; height: 260px; overflow: hidden; }
.skeleton-anim { background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 40%, rgba(255,255,255,0) 80%); background-size: 200px 100%; animation: shimmer 1.5s infinite; width: 100%; height: 100%; }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }

.suggestions-dropdown { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--card); border-radius: 0 0 16px 16px; box-shadow: 0 8px 20px rgba(0,0,0,0.5); z-index: 200; max-height: 230px; overflow-y: auto; margin-top: 5px; border: 1px solid var(--border); }
.suggestion-item { padding: 10px 18px; cursor: pointer; border-bottom: 1px solid var(--border); transition: background 0.2s; font-size: 14px; }
.suggestion-item:hover { background: rgba(0,229,255,0.1); }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: var(--card); border-radius: 16px; padding: 22px; max-width: 400px; width: 90%; color: var(--text); position: relative; animation: fadeIn 0.3s ease-out; max-height: 80vh; overflow-y: auto; }
.modal-close { position: absolute; top: 10px; right: 15px; background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; }
.detail-poster { width: 100%; border-radius: 10px; margin-bottom: 12px; }
.suggestions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 12px; }
.suggestion-card { background: #1e2633; border-radius: 8px; padding: 8px; cursor: pointer; text-align: center; }
.suggestion-card img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; }
.suggestion-card .title { font-size: 11px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); grid-column: 1/-1; }
