/*
Theme Name: Video Gallery Theme
Description: A modern, dark-themed video streaming WordPress theme.
Version: 1.0
Author: Custom Developer
*/

:root {
    --bg-color: #0f0f13;
    --card-bg: #1c1c24;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --accent-color: #eab308; /* A vibrant yellow/gold for premium feel */
    --accent-hover: #facc15;
    --border-color: #2d2d3b;
    --navbar-bg: rgba(15, 15, 19, 0.85);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--navbar-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
}

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

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo span {
    color: var(--accent-color);
}

.search-form {
    display: flex;
    align-items: center;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    width: 400px;
    max-width: 100%;
    transition: border-color 0.2s ease;
}

.search-form:focus-within {
    border-color: var(--accent-color);
}

.search-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    padding: 0.25rem 0.5rem;
    outline: none;
    font-size: 0.95rem;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
}

.search-btn:hover {
    color: var(--text-primary);
}

/* Main Layout */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-desktop-cols, 4), 1fr);
    gap: 1.5rem;
}

/* Video Card */
.video-card {
    background-color: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: var(--card-bg);
    overflow: hidden;
    border-radius: 12px;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.play-icon {
    width: 48px;
    height: 48px;
    background-color: var(--accent-color);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-info {
    padding: 0.75rem 0;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.video-card:hover .video-title {
    color: var(--accent-color);
}

.video-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.layout-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.layout-full-width {
    display: block;
    width: 100%;
}

.widget-area {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.5rem;
}

.widget ul li a {
    color: var(--text-secondary);
}

.widget ul li a:hover {
    color: var(--text-primary);
}

/* Single Page Layout */
.video-player-placeholder {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.5rem;
}

.video-player-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fallback-player-bg {
    width: 100%;
    height: 100%;
    background-color: #111;
}

.play-overlay.always-visible {
    opacity: 1;
    background: rgba(0,0,0,0.2);
}

.play-icon.large-icon {
    width: 72px;
    height: 72px;
    padding-left: 6px;
}

.single-video-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.single-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--border-color);
}

.single-video-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.video-tags, .video-categories {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.tag-title, .category-title {
    font-weight: 700;
    color: var(--text-primary);
}

.section-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 3rem 0;
}

/* Advanced Video Grid Elements */
.thumbnail-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.badge-hd, .badge-rating {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-rating {
    color: #22c55e; /* Green for high rating */
}

.video-info {
    padding: 0.75rem 0;
    display: block;
}

.creator-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--card-bg);
}

.creator-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-details {
    flex-grow: 1;
    min-width: 0;
}

.author-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Video Player Containers */
.responsive-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
}

.responsive-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.html5-video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 992px) {
    .layout-with-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-form {
        width: 100%;
    }
    
    .video-grid {
        grid-template-columns: repeat(var(--grid-mobile-cols, 2), 1fr);
    }

    .single-video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ==========================================================================
   Model Avatar Layout in Video Cards
   ========================================================================== */
.video-info-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
    padding: 0 10px 10px 10px;
}

.model-avatar-link {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.model-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.model-avatar-link:hover .model-avatar-img {
    border-color: var(--accent-color);
}

.video-info-wrapper .video-info {
    flex-grow: 1;
    min-width: 0; /* Prevents flex flex-child from stretching its parent */
    padding: 0;
    display: block; /* Ensure it's a block so title and meta stack naturally */
}

.video-info-wrapper .video-title {
    margin-bottom: 6px;
    font-size: 0.95rem;
    line-height: 1.3;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.video-info-wrapper .video-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.video-model-name {
    width: 100%; /* Force model name to its own line */
    margin-bottom: 2px;
}

.video-model-name a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.video-model-name a:hover {
    color: var(--accent-color);
}

.video-views, .video-date {
    display: flex;
    align-items: center;
    gap: 4px;
}


.icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}


/* Main Navigation */
.main-navigation {
    display: flex;
    flex-grow: 1;
    margin: 0 20px;
}
.main-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}
.main-navigation a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.2s ease;
}
.main-navigation a:hover {
    color: var(--accent-color);
}
@media (max-width: 768px) {
    .main-navigation {
        display: none; /* Hide on mobile for now, or could make a hamburger */
    }
}

