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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

header h1 {
    font-size: 1.5rem;
}

header h1 a {
    color: white;
    text-decoration: none;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: #34495e;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: #4a5f7f;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

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

.login-box h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.error-message {
    background-color: #e74c3c;
    color: white;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-download {
    background-color: #27ae60;
    color: white;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.btn-download:hover {
    background-color: #229954;
}

/* Library Page */
.library-container h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.search-container {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
}

.filter-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: #ecf0f1;
}

.filter-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.media-section {
    margin-bottom: 3rem;
}

.media-section h3 {
    color: #34495e;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

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

.media-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.media-info h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.media-info .year {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.media-status {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.watched {
    background-color: #3498db;
    color: white;
}

.badge.unwatched {
    background-color: #95a5a6;
    color: white;
}

.badge.available {
    background-color: #27ae60;
    color: white;
}

.badge.unavailable {
    background-color: #e74c3c;
    color: white;
}

.media-actions {
    margin-top: 1rem;
}

/* Transcode Queue Page */
.transcode-container h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.stat-card.staging {
    border-left-color: #f39c12;
}

.stat-card.transcoded {
    border-left-color: #27ae60;
}

.stat-card h3 {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-detail {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.stat-time {
    color: #95a5a6;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.file-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.file-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.file-section h3 {
    color: #34495e;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.file-list {
    overflow-x: auto;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table thead {
    background-color: #ecf0f1;
}

.file-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
}

.file-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #ecf0f1;
}

.file-table tbody tr:hover {
    background-color: #f8f9fa;
}

.file-path {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #34495e;
}

.empty-state {
    text-align: center;
    color: #95a5a6;
    padding: 2rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }

    .filter-container {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .file-table {
        font-size: 0.85rem;
    }

    .file-table th,
    .file-table td {
        padding: 0.5rem;
    }
}
