/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
}

/* Login styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #1e3c72;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #1e3c72;
}

.btn-primary {
    background: #1e3c72;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
    width: 100%;
}

.btn-primary:hover {
    background: #2a5298;
}

.error {
    background: #ff6b6b;
    color: white;
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Navigation */
.navbar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-container h1 {
    color: white;
    font-size: 1.5rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.username {
    color: white;
    font-weight: 500;
}

.btn-logout, .btn-admin {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-logout:hover, .btn-admin:hover {
    background: white;
    color: #1e3c72;
}

/* Main container */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Search section */
.search-section {
    margin-bottom: 3rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-box .btn-primary {
    width: auto;
    border-radius: 25px;
    padding: 1rem 2rem;
}

/* Content sections */
.content-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.trending-section h2 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.media-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

.media-card .card-content {
    padding: 1rem;
}

.media-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.media-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.download-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
}

.download-status.downloaded {
    background: #4CAF50;
}

.download-status.partial {
    background: #FF9800;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.modal h2 {
    margin-bottom: 1.5rem;
    color: #1e3c72;
}

/* Form styles in modal */
.modal .form-group {
    margin-bottom: 1rem;
}

.modal label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modal select, .modal input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    font-size: 1rem;
}

.modal select:focus, .modal input:focus {
    outline: none;
    border-color: #1e3c72;
}

.quality-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.quality-option {
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.quality-option:hover {
    border-color: #1e3c72;
    background: #f8f9fa;
}

.quality-option.selected {
    border-color: #1e3c72;
    background: #1e3c72;
    color: white;
}

.season-episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.episode-item {
    padding: 0.5rem;
    border: 1px solid #e1e5e9;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.episode-item:hover {
    border-color: #1e3c72;
    background: #f8f9fa;
}

.episode-item.selected {
    border-color: #1e3c72;
    background: #1e3c72;
    color: white;
}

/* Loading states */
.loading {
    text-align: center;
    padding: 2rem;
    color: white;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progress bar styles */
.progress-container {
    text-align: center;
    padding: 1rem;
}

.progress-container h3 {
    margin-bottom: 1.5rem;
    color: #1e3c72;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e1e5e9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background-color: #2196F3;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.progress-message {
    font-size: 0.9rem;
    color: #333;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    min-height: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-right {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1rem;
    }
} 