/* Global Styles */
:root {
    --primary-color: #b90000; /* xHamster Red */
    --secondary-color: #ff3333;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #333;
    --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --header-height: 60px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header & Navigation */
header {
    background-color: #000;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-transform: none; /* Ensure no uppercase transform unless desired */
}

.logo img {
    height: 40px;
    width: auto;
    border-radius: 4px;
}

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

.nav-links .mobile-actions {
    display: none; /* Hide mobile actions by default on desktop */
}

.nav-links a {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-main);
    text-transform: uppercase;
}

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

.user-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    border: none;
    font-size: 14px;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Mobile Menu Toggle (Checkbox Hack) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}

#mobile-menu-checkbox {
    display: none;
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 20px;
    max-width: 800px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.hero-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    text-transform: uppercase;
}

/* Features Section */
.features {
    padding: 40px 20px;
    background-color: var(--bg-card);
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    text-align: center;
}

.feature-item {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 20px;
}

.feature-icon svg {
    width: 48px;
    height: 48px;
    fill: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-bottom: 10px;
    color: white;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Video Grid Sections */
.section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title {
    font-size: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-all {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: bold;
}

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

.video-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.thumbnail-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.thumbnail-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
}

.hd-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 4px;
    font-weight: bold;
}

.video-info {
    padding: 12px;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.category-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: filter 0.3s;
}

.category-card:hover img {
    filter: brightness(1);
}

.category-name {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Content Blocks (SEO) */
.content-block {
    background-color: #1a1a1a;
    padding: 30px;
    margin: 40px auto;
    max-width: 1000px;
    border-radius: 8px;
    color: #ccc;
}

.content-block h2 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.content-block h3 {
    color: #f0f0f0;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.content-block p {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.7;
}

.content-block ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

.content-block li {
    margin-bottom: 5px;
}

/* Footer */
footer {
    background-color: #000;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        order: 3; /* Ensure it appears on the right if needed, or adjust flex order */
    }

    .user-actions {
        display: none; /* Hide default user actions, move inside menu */
    }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: #000;
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-color);
        align-items: flex-start; /* Align text to left */
    }
    
    .nav-links .mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #333;
    }

    .nav-links .mobile-actions .btn {
        width: 100%;
        text-align: center;
    }

    #mobile-menu-checkbox:checked ~ .nav-links {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
