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

:root {
    --primary-color: #e50914;
    --bg-dark: #141414;
    --bg-darker: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --hover-bg: #2a2a2a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Navbar */
.navbar {
    background-color: var(--bg-darker);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: 2px;
}

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

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(20,20,20,1)), 
                url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?w=1200') center/cover;
    padding: 100px 0 80px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
}

/* Video Grid */
.video-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-left: 4px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: scale(1.05);
}

.video-card a {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s;
}

.video-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay svg {
    width: 60px;
    height: 60px;
    color: white;
}

.video-info {
    padding: 10px 4px;
}

.video-title {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

.video-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Watch Page */
.watch-container {
    padding-top: 20px;
}

.video-player {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding-top: 56.25%;
    background-color: #000;
}

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

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

.video-details h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.video-meta {
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    background-color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.video-description-full {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.video-actions {
    display: flex;
    gap: 15px;
}

/* Login */
.login-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-box {
    background-color: rgba(0, 0, 0, 0.75);
    padding: 60px 68px 40px;
    border-radius: 4px;
    max-width: 450px;
    width: 100%;
}

.login-box h1 {
    margin-bottom: 28px;
    font-size: 32px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.login-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}

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

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    background-color: #333;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

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

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

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Admin */
.admin-container {
    padding: 40px 20px;
}

.admin-container h1 {
    margin-bottom: 40px;
    font-size: 36px;
}

.admin-section {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.admin-section h2 {
    margin-bottom: 25px;
    font-size: 24px;
}

.admin-form .btn-primary {
    width: auto;
    min-width: 200px;
}

.video-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

.video-item-thumb {
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

.video-item-info {
    flex: 1;
}

.video-item-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.video-item-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.video-item-info small {
    color: var(--text-secondary);
    font-size: 12px;
}

.video-item-actions {
    display: flex;
    gap: 10px;
}

.video-item-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    max-width: 400px;
}

.flash {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 14px;
    transition: opacity 0.3s;
}

.flash-success {
    background-color: #28a745;
    color: white;
}

.flash-error {
    background-color: #dc3545;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-state h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 18px;
    color: var(--text-secondary);
}

.empty-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

/* Footer */
footer {
    background-color: var(--bg-darker);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .section-title {
        font-size: 20px;
    }

    .login-box {
        padding: 40px 30px;
    }

    .video-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .video-item-thumb {
        width: 100%;
        height: auto;
    }

    .video-item-actions {
        width: 100%;
    }

    .video-item-actions .btn {
        flex: 1;
    }

    .admin-section {
        padding: 20px;
    }

    .video-details h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 22px;
    }

    .nav-link {
        font-size: 12px;
    }

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

    .video-actions {
        flex-direction: column;
    }

    .video-actions .btn {
        width: 100%;
    }
}
