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

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

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

/* Navbar */
.navbar {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #e50914;
    text-decoration: none;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: all 0.3s;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

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

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #e50914;
}

.search-form {
    display: flex;
}

.search-form input {
    padding: 8px 12px;
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
    min-width: 200px;
}

.search-form input:focus {
    outline: none;
    border-color: #e50914;
}

/* Buttons */
.btn-primary {
    background-color: #e50914;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

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

.btn-secondary {
    background-color: #333;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.btn-danger {
    background-color: #dc3545;
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* 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;
    background-color: #333;
    border-left: 4px solid #e50914;
}

.flash-success {
    border-left-color: #28a745;
}

.flash-error {
    border-left-color: #dc3545;
}

.flash-info {
    border-left-color: #17a2b8;
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

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

.video-card {
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
}

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

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

.video-card-content {
    padding: 15px;
}

.video-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #ffffff;
}

.video-card p {
    font-size: 14px;
    color: #999;
    margin-bottom: 4px;
}

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

/* Video player page */
.video-page {
    max-width: 1200px;
    margin: 0 auto;
}

.video-player {
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.video-player video {
    width: 100%;
    max-height: 600px;
}

.subscribe-overlay {
    background-color: #1a1a1a;
    padding: 60px 20px;
    text-align: center;
    border-radius: 8px;
}

.subscribe-overlay h2 {
    margin-bottom: 20px;
}

.video-info {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
}

.video-info h1 {
    font-size: 28px;
    margin-bottom: 15px;
}

.video-meta {
    display: flex;
    gap: 20px;
    color: #999;
    margin-bottom: 15px;
    font-size: 14px;
}

.video-description {
    color: #ddd;
    line-height: 1.8;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ddd;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
    border-radius: 4px;
}

.form-group input[type="file"] {
    padding: 5px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #e50914;
}

/* Pricing page */
.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.pricing-card {
    background-color: #1a1a1a;
    padding: 40px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.pricing-card h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

.price {
    font-size: 48px;
    color: #e50914;
    margin-bottom: 30px;
}

.features {
    list-style: none;
    margin-bottom: 30px;
}

.features li {
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

/* Admin pages */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.video-table {
    width: 100%;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

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

.video-table th,
.video-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.video-table th {
    background-color: #0a0a0a;
    font-weight: 600;
}

.video-table img {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons a,
.action-buttons button {
    padding: 6px 12px;
    font-size: 14px;
}

/* Account page */
.account-container {
    max-width: 800px;
    margin: 0 auto;
}

.account-section {
    background-color: #1a1a1a;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.account-section h2 {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #333;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #999;
}

.info-value {
    color: #fff;
    font-weight: 500;
}

/* Browse page */
.browse-header {
    margin-bottom: 30px;
}

.category-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.category-filter {
    padding: 8px 16px;
    background-color: #333;
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.category-filter:hover,
.category-filter.active {
    background-color: #e50914;
}

/* Footer */
footer {
    background-color: #0a0a0a;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }

    .nav-content {
        position: relative;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .logo {
        font-size: 18px;
    }

    /* Hide nav links by default on mobile */
    .nav-links {
        display: none !important;
        flex-direction: column;
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
        gap: 0;
        background-color: rgba(0, 0, 0, 0.98);
        position: absolute;
        top: 50px;
        left: 0;
        padding: 15px 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    /* Show nav links when active */
    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        padding: 15px 10px;
        border-bottom: 1px solid #333;
        width: 100%;
        display: block;
    }

    .nav-links a:last-of-type {
        border-bottom: none;
    }

    .search-form {
        width: 100%;
        margin: 15px 0 5px 0;
        padding-bottom: 15px;
        border-bottom: 1px solid #333;
    }

    .search-form input {
        width: 100%;
        min-width: auto;
        padding: 10px;
    }

    .nav-links .btn-primary {
        margin-top: 5px;
        text-align: center;
        display: block;
        width: 100%;
    }

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

    .video-meta {
        flex-direction: column;
        gap: 5px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .video-table {
        overflow-x: auto;
    }
}
