:root {
    --primary: #6AC045; /* YTS Green */
    --primary-hover: #5DA33C;
    --bg-dark: #1D1D1D; /* YTS Background */
    --bg-header: #171717;
    --bg-card: #171717;
    --text-white: #FFFFFF;
    --text-gray: #919191;
    --border-color: #2F2F2F;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
nav {
    padding: 15px 0;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 800;
}

.logo .icon-primary {
    color: var(--primary);
}

.logo span span {
    color: var(--text-gray);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-white);
}

.search-bar {
    display: flex;
    background: #282828;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px 15px;
    width: 250px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    width: 100%;
    outline: none;
    font-size: 0.85rem;
}

.search-bar button {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: radial-gradient(circle at center, #2b2b2b 0%, #1d1d1d 100%);
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 800px;
    margin: 0 auto 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.stat .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-white);
}

.stat .label {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Browse Page Styles */
.browse-hero {
    padding: 40px 0;
    background: #171717;
    border-bottom: 1px solid var(--border-color);
}

.browse-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.browse-hero h1 span, .trending-hero h1 span {
    color: var(--primary);
}

.trending-hero {
    padding: 60px 0;
    background: radial-gradient(circle at center, #2b2b2b 0%, #171717 100%);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.filters-panel {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-top: -60px; /* Overlap with hero */
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    z-index: 10;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.filters-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--text-white);
}

.btn-clear-all {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.main-search {
    flex: 1;
    background: #252525;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.main-search i {
    color: var(--primary);
    width: 18px;
}

.main-search input {
    background: transparent;
    border: none;
    color: white;
    padding: 12px;
    width: 100%;
    outline: none;
}

.btn-search {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0 30px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-search:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-reset {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-white);
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-filters {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.active-label {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
}

.filter-tags {
    display: flex;
    gap: 10px;
}

.tag {
    background: rgba(106, 192, 69, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdowns-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.filter-group label {
    display: block;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.filter-group select {
    width: 100%;
    background: #252525;
    border: 1px solid var(--border-color);
    color: white;
    padding: 10px;
    border-radius: 6px;
    outline: none;
}

/* Movie Grid */
main {
    padding: 80px 0 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-all {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 6px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-all:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(106, 192, 69, 0.05);
    padding-right: 12px;
}

.view-all i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.view-all:hover i {
    transform: translateX(4px);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 35px;
    margin-top: 20px;
}

/* YTS Style Movie Card Enhanced */
.movie-card {
    display: block;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.movie-poster {
    aspect-ratio: 2/3;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    border: none;
    box-shadow: none;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.badge-quality {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 5;
}

.badge-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: var(--text-white);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 5;
}

.badge-rating i {
    color: var(--primary);
    width: 12px;
}

.movie-info {
    padding: 15px;
}

.movie-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-info .year {
    color: var(--text-gray);
    font-size: 0.8rem;
}

.movie-info .genres {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Footer */
footer {
    background: var(--bg-header);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    margin-top: 80px;
}

.footer-info .logo {
    justify-content: center;
    margin-bottom: 20px;
}

.footer-info p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    margin-bottom: 40px;
}

.footer-links h4 {
    color: var(--text-white);
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    color: #555;
    font-size: 0.8rem;
}

/* Skeleton Loader */
.card-skeleton {
    aspect-ratio: 2/3;
    background: #282828;
    border-radius: 4px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* --- SINGLE MOVIE PAGE --- */
.movie-backdrop {
    position: relative;
    width: 100%;
    min-height: 80vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding: 100px 0 50px 0;
}

.backdrop-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(15, 15, 15, 0.95) 20%, rgba(15, 15, 15, 0.7) 100%);
    z-index: 1;
}

.movie-content {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.movie-poster-large {
    flex: 0 0 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 4px solid var(--bg-card);
}

.movie-poster-large img {
    width: 100%;
    height: auto;
    display: block;
}

.movie-info-large {
    flex: 1;
    color: white;
}

.movie-info-large h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: white;
}

.meta-tags {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.meta-tags span {
    background: rgba(255,255,255,0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-tags span i {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.movie-info-large .description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 40px;
    max-width: 800px;
}

.download-section {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(106, 192, 69, 0.2);
    max-width: 600px;
}

.download-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: white;
}

.download-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 15px 20px;
    border-radius: 8px;
}

.dl-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.dl-info i {
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .movie-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .meta-tags {
        justify-content: center;
    }
    .download-card {
        flex-direction: column;
        gap: 15px;
    }
    .movie-poster-large {
        flex: 0 0 250px;
    }
}