:root {
    --primary-color: #C42D96;
    --primary-hover: #a82581;
    --bg-dark: #0f0f0f;
    --bg-card: #1e1e1e;
    --bg-hover: #2a2a2a;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    /* Header height increased to fit bigger logo */
    --header-height: 80px; 
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

/* --- HEADER STYLES --- */
.header {
    background-color: rgba(15, 15, 15, 0.98); /* Slightly less transparent for better visibility */
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    transition: height 0.3s ease;
}

.header-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
}

.home-header-layout {
    justify-content: space-between;
}

/* --- LOGO STYLES (BIGGER) --- */
.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
    padding: 5px 0; /* Small padding to prevent sticking to edges */
}

.logo-img {
    max-height: 65px; /* Much bigger for PC */
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(196, 45, 150, 0.3)); /* Adds a nice glow */
}

.menu-icon {
    font-size: 1.4rem; /* Slightly bigger icon */
    cursor: pointer;
    color: var(--text-main);
    padding: 10px;
    margin-right: 10px;
}

/* --- SIDENAV --- */
.sidenav {
    height: 100%;
    width: 280px; /* Slightly wider for better look */
    position: fixed;
    z-index: 2000;
    top: 0;
    left: -280px;
    background-color: var(--bg-card);
    overflow-x: hidden;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 0;
    border-right: 1px solid var(--border-color);
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}

.sidenav.open {
    left: 0;
}

.sidenav-header {
    padding: 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.2);
}

.sidenav-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

.sidenav .close-btn {
    font-size: 28px;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1;
}

.sidenav a:not(.close-btn) {
    padding: 16px 24px;
    text-decoration: none;
    font-size: 1.05rem;
    color: var(--text-muted);
    display: block;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 3px solid transparent;
}

.sidenav a:hover {
    color: var(--text-main);
    background-color: var(--bg-hover);
    border-left-color: var(--primary-color);
}

.sidenav a i {
    width: 24px;
    text-align: center;
}

#overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(2px);
    z-index: 1500;
}

#overlay.active {
    display: block;
}

/* --- MAIN CONTENT GRID --- */
.main-content {
    padding: 30px 24px;
    max-width: 1600px;
    margin: 0 auto;
}

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

/* --- VIDEO CARD (HOME) --- */
.video-card {
    background-color: var(--bg-card); /* Added background for better contrast */
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: var(--border-color);
}

.thumbnail-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    overflow: hidden;
}

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

.video-preview {
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.85);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    z-index: 3;
    text-transform: uppercase;
}

.video-card-info {
    padding: 14px;
}

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

.video-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    font-size: 6px;
    color: var(--primary-color);
    vertical-align: middle;
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    padding: 3rem 0 1rem;
    list-style: none;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination li a, .pagination li span {
    color: var(--text-main);
    padding: 10px 18px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 600;
}

.pagination li a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination li.active a {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 12px rgba(196, 45, 150, 0.4);
}

.pagination li.disabled a {
    opacity: 0.5;
    pointer-events: none;
    background-color: transparent;
}

.pagination li.dots span {
    border: none;
    background: transparent;
}

.no-videos-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: 12px;
}

/* --- PLAY VIDEO PAGE SPECIFIC --- */
.play-video-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.video-player-section { flex: 1; min-width: 0; }

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

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

.video-info {
    margin-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.video-title-player {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
    line-height: 1.4;
    word-break: break-word;
}

.video-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.video-stats {
    color: var(--text-muted);
    font-size: 1rem;
    display: flex;
    gap: 12px;
    align-items: center;
}

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

.action-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover:not(:disabled) { 
    background-color: var(--bg-hover); 
    border-color: var(--text-muted);
}

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

.action-btn:disabled { opacity: 0.7; cursor: default; }

.suggested-videos-section { width: 100%; }
.suggested-header h2 { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin-bottom: 20px; 
    color: var(--text-main); 
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.suggested-grid { display: flex; flex-direction: column; gap: 16px; }

.suggested-video-item {
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: var(--text-main);
    border-radius: 10px;
    padding: 8px;
    transition: background-color 0.2s;
}

.suggested-video-item:hover { background-color: var(--bg-hover); }

.suggested-thumbnail-wrapper {
    position: relative;
    width: 180px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background-color: #222;
}

.suggested-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggested-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2px;
}

.suggested-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-main);
    word-break: break-word;
}

.suggested-meta { font-size: 0.85rem; color: var(--text-muted); }
.error-container { text-align: center; padding: 60px; }
.error-message { color: var(--text-muted); margin-bottom: 20px; font-size: 1.1rem; }
.back-btn { 
    display: inline-block; 
    padding: 12px 24px; 
    background-color: var(--primary-color); 
    color: white; 
    text-decoration: none; 
    border-radius: 8px; 
    font-weight: 600;
}

/* --- RESPONSIVE --- */
@media (min-width: 1000px) {
    .play-video-container {
        flex-direction: row;
        align-items: flex-start;
    }
    .video-player-section { flex-basis: 70%; }
    .suggested-videos-section { flex-basis: 30%; max-width: 420px; }
}

@media (max-width: 600px) {
    .header { 
        height: 65px; /* Header height specifically for mobile */
    }
    
    .header-content {
        padding: 0 15px;
    }
    
    /* LOGO MOBILE SIZE */
    .logo-img { 
        max-height: 52px; /* Significantly larger for mobile */
    } 
    
    .menu-icon {
        font-size: 1.3rem;
    }
    
    .main-content { padding: 16px; }
    .content-grid { 
        grid-template-columns: 1fr; 
        gap: 24px; 
    }
    
    .play-video-container { padding: 0; gap: 0; }
    .video-player-section { border-bottom: 1px solid var(--border-color); }
    .video-wrapper { border-radius: 0; border-left: none; border-right: none; }
    .video-info { padding: 16px; margin-top: 0; border-bottom: none; }
    .video-title-player { font-size: 1.2rem; margin-bottom: 12px; }
    
    .suggested-videos-section { padding: 16px; }
    .suggested-video-item { padding: 0; margin-bottom: 16px; }
    
    .suggested-thumbnail-wrapper { 
        width: 150px; /* Good size for mobile list */
        min-width: 140px; 
    }
    
    .suggested-info h3 { font-size: 0.95rem; }
    
    .video-stats { font-size: 0.85rem; }
    .action-btn { padding: 8px 16px; font-size: 0.85rem; }
}