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

:root {
    --primary-color: #e50914;
    --secondary-color: #141414;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --bg-dark: #000000;
    --bg-card: #181818;
    --hover-color: #1f1f1f;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0,0,0,0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    letter-spacing: 2px;
}

.nav-search {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.nav-search input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--hover-color);
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    z-index: 1001;
    display: none;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.search-dropdown-item:hover {
    background: var(--hover-color);
}

.search-dropdown-item img {
    width: 50px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
}

.search-dropdown-item-info {
    flex: 1;
}

.search-dropdown-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-dropdown-item-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Hero Banner */
.hero-banner {
    margin-top: 80px;
    height: 70vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 3rem;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.9) 100%);
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    position: relative;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #c40812;
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
}

/* Content Sections */
main {
    padding-top: 0;
    min-height: 100vh;
}

.content-section {
    padding: 0 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
}

/* FIXED Horizontal Slider */
.slider-container {
    position: relative;
    padding: 1rem 0;
}

.content-slider {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 0.5rem 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.content-slider::-webkit-scrollbar {
    display: none;
}

/* Slider Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.slider-container:hover .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: rgba(0,0,0,0.95);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn-left {
    left: -25px;
}

.slider-btn-right {
    right: -25px;
}

/* Content Cards - FIXED */
.content-card {
    flex: 0 0 auto;
    width: 200px;
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: var(--bg-card);
}

.content-card:hover {
    transform: scale(1.1);
    z-index: 100;
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.5);
}

.content-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%);
    padding: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.content-card:hover .card-overlay {
    opacity: 1;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.card-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.8);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.detail-backdrop {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.detail-info {
    padding: 2rem;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.detail-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.detail-overview {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.detail-genres {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.genre-tag {
    padding: 0.5rem 1rem;
    background: rgba(229, 9, 20, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Player Modal */
.player-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    overflow-y: auto;
}

.player-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.player-container {
    width: 95%;
    max-width: 1200px;
    position: relative;
}

.player-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.player-close:hover {
    background: var(--primary-color);
}

.player-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}

.player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
}

.tv-controls {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.control-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.control-group select {
    padding: 0.75rem;
    background: var(--hover-color);
    border: 2px solid transparent;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.server-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.server-selector label {
    font-weight: 600;
    white-space: nowrap;
}

.server-selector select {
    flex: 1;
    padding: 0.75rem;
    background: var(--hover-color);
    border: 2px solid transparent;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.server-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.download-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #c40812;
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Loading */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(229, 9, 20, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c40812;
}