/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0b0b0b;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
.navbar {
    background-color: #141414;
    padding: 15px 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #262626;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #333333;
    color: #ffffff;
    font-size: 1.3rem;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    border-color: #e50914;
    color: #e50914;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    gap: 10px;
}

.logo-img {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.logo-text span {
    color: #e50914;
}

.logo-link:hover .logo-text {
    color: #e50914;
}

/* Categories */
.categories {
    display: flex;
    gap: 12px;
}

.cat-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cat-btn:hover, .cat-btn.active {
    background-color: #e50914;
    color: #ffffff;
}

/* Main Content Header & Search Bar */
.container {
    flex: 1;
    padding: 30px 4%;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.3rem;
    border-left: 4px solid #e50914;
    padding-left: 10px;
}

.search-box {
    width: 100%;
    max-width: 320px;
}

.search-box input {
    background-color: #181818;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 4px;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    border-color: #e50914;
}

/* Horizontal Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.video-card {
    display: block;
    text-decoration: none;
    background-color: #181818;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #262626;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: #e50914;
    box-shadow: 0 6px 18px rgba(229, 9, 20, 0.25);
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000000;
    overflow: hidden;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .thumb-wrapper img {
    transform: scale(1.05);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e50914;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 600;
}

.card-info {
    padding: 12px 14px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card:hover .card-title {
    color: #e50914;
}

/* Static Info Pages (About, Terms, Contact) */
.page-box {
    background-color: #181818;
    border: 1px solid #262626;
    border-radius: 8px;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.page-box h1 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    border-left: 4px solid #e50914;
    padding-left: 12px;
}

.page-box p {
    color: #cccccc;
    margin-bottom: 14px;
}

/* Footer */
.footer {
    background-color: #141414;
    border-top: 1px solid #262626;
    padding: 25px 4%;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #e50914;
}

.copyright {
    color: #888888;
    font-size: 0.85rem;
}

/* Admin Panel Styling */
.admin-body {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-box, .admin-dashboard {
    background-color: #181818;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 30px;
    width: 100%;
    max-width: 550px;
}

.admin-box h2 span, .admin-header h2 span {
    color: #e50914;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2a2a2a;
}

.admin-card {
    margin-bottom: 25px;
}

.admin-card h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

form label {
    font-size: 0.85rem;
    color: #cccccc;
}

form input, form select {
    background-color: #222222;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 10px;
    border-radius: 4px;
    outline: none;
}

form input:focus, form select:focus {
    border-color: #e50914;
}

.btn-red {
    background-color: #e50914;
    color: #ffffff;
    border: none;
    padding: 11px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-red:hover {
    background-color: #b80710;
}

.btn-grey {
    background-color: #333333;
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-grey:hover {
    background-color: #e50914;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #222222;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.admin-item span {
    color: #999999;
    font-size: 0.85rem;
}

.error-msg { color: #e50914; margin-top: 10px; font-size: 0.9rem; }
.status-msg { color: #4caf50; margin-top: 10px; font-size: 0.9rem; }

/* Mobile Responsive: Right-Aligned Dropdown Menu Layout */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .categories {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 4%;
        width: 210px;
        background-color: #181818;
        border: 1px solid #2a2a2a;
        border-radius: 6px;
        padding: 10px;
        gap: 6px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
        z-index: 150;
    }

    .categories.show {
        display: flex;
    }

    .cat-btn {
        width: 100%;
        text-align: left;
        padding: 10px 14px;
        font-size: 0.95rem;
        border-radius: 4px;
    }

    .search-box {
        max-width: 100%;
    }
    
/* Solid Red Home Button for Info Pages */
a.home-btn,
a.home-btn:link,
a.home-btn:visited {
    display: inline-block;
    background-color: #e50914 !important;
    border: 1px solid #e50914 !important;
    color: #ffffff !important;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 4px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

a.home-btn:hover,
a.home-btn:active {
    background-color: #b80710 !important;
    border-color: #b80710 !important;
    color: #ffffff !important;
}