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

:root {
    --bg-primary: #070f13;
    --bg-secondary: #0a161b;
    --bg-tertiary: #0e1e25;
    --text-primary: #ffffff;
    --text-secondary: #b5cbd4;
    --text-muted: #2f515f;
    --accent-primary: #ffb224;
    --accent-secondary: #ff9900;
    --accent-tertiary: #ff7700;
    --border-color: #152c36;
    --shadow-light: rgba(255, 255, 255, 0.1);
    --shadow-dark: #000203;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #0c1a20 0%, #061014 20%, #061014 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: rgba(10, 10, 10, 0.8);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* Logo placeholder */
.logo-placeholder {
    position: relative;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: 6px;
}

.logo-fallback {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.logo-fallback h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-fallback i {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

/* Admin specific logo adjustments */
.admin-header .logo-placeholder {
    margin-bottom: 1rem;
}

.admin-header .logo-img {
    height: 50px;
    margin-bottom: 1rem;
}

.admin-header .logo-fallback h1 {
    font-size: 2rem;
    margin-bottom: 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.logo-link:hover {
    transform: translateY(-1px);
}

.logo i {
    font-size: 2rem;
    color: var(--accent-primary);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.25rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent-primary);
}

/* Scroll to top button */

.scroll-top {
	position: fixed;
	bottom: 20px;
	right: 30px;
	z-index: 200;
	display: inline-flex;
	align-items: center;
	gap: 0;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transform: translateY(10px);
	transition: var(--transition);
	background: var(--bg-secondary);
	border-color: var(--accent-primary);
	color: var(--text-primary);
	border-radius: 999px;
	padding: 0.5rem 0.7rem;
	box-shadow: 0 8px 24px var(--shadow-dark);
}

.scroll-top.visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.scroll-top:hover {
	border-color: var(--accent-secondary);
	transform: translateY(-10px);
}

.scroll-top i { font-size: 1.05rem; line-height: 1; display: inline-block; }

/* Remove default icon spacing for the scroll-top button so it centers */
.nav-btn.scroll-top i { margin-right: 0; }

@media (max-width: 768px) {
	.scroll-top {
		bottom: 16px;
		right: 20px;
		padding: 0.65rem 0.8rem;
		background: rgba(8, 18, 22, 0.95);
		box-shadow: 0 10px 28px var(--shadow-dark);
	}
	.scroll-top i { font-size: 1.2rem; }
}

.nav-btn {
    background:
        linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
        linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary)) border-box;
    border: 2px solid transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.nav-btn i { margin-right: 0.5rem; }

.nav-btn:hover {
    color: var(--text-primary);
    transform: translateY(4px);
}

.nav-btn.active {
    color: var(--text-primary);
    background:
        linear-gradient(var(--bg-tertiary), var(--bg-tertiary)) padding-box,
        linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary)) border-box;
}

.nav-btn.scroll-top {
    border: 2px solid transparent;
    color: var(--text-primary);
    background:
        linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
        linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary)) border-box;
}

.nav-btn.scroll-top:hover {
    color: var(--text-primary);
    transform: translateY(4px);
}

/* Main content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

/* Hero Section */
.hero-section {
    text-align: left;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.2;
    filter: drop-shadow(0 6px 10px var(--shadow-dark));
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0;
    line-height: 1.6;
    text-align: left;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Search section */
.search-section {
    margin-bottom: 2rem;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.search-bar {
    position: relative;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.category-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem 0.75rem 3rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

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

/* Stats section */
.stats-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: flex-start;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 160px;
    max-width: 200px;
}

#searchResultsCard {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
}

#searchResultsCard i {
    color: var(--bg-primary);
}

.stat-card i {
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.stat-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-number {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.63rem;
    color: var(--text-secondary);
    line-height: 1;
}

/* Videos grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    /* box-shadow: 0 8px 12px var(--shadow-dark); */
}

/* Separate hover animation that only activates after videos are fully loaded */
.video-card.loaded {
    transition: var(--transition);
}

.video-card.loaded:hover {
    border-color: var(--accent-primary);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--bg-tertiary);
    overflow: hidden;
}

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

/* Separate thumbnail animation that only activates after videos are fully loaded */
.video-card.loaded .video-thumbnail img {
    transition: var(--transition);
}

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

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.youtube-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ff0000;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.youtube-badge i {
    font-size: 0.9rem;
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.video-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.video-channel {
    color: var(--accent-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.video-channel i {
    color: var(--accent-primary);
}

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

.video-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
}

.video-tag, .tag {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.video-cat {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* Loading and no results */
.loading, .no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    /* transition: opacity 0.3s ease; - REMOVED to prevent blinking */
}

.loading i, .no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.loading span, .no-results h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.no-results {
    opacity: 0;
}

.no-results p {
    color: var(--text-muted);
}

/* Pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pagination-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: var(--text-primary);
    border-color: var(--bg-primary);
}

.pagination-btn:hover:not(.active) {
    color: var(--text-primary);
    transform: translateY(4px);
}

/* Mobile pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0 0.75rem;
        font-size: 0.8rem;
    }
}

/* Monetization spaces - Static banner ads */
.ad-space {
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    margin: 1rem 0;
    width: 728px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    grid-column: 1 / -1; /* Span across all grid columns */
}

/* Mobile responsive static ad space - keep banner format */
@media (max-width: 768px) {
    .ad-space {
        width: 468px;
        height: 60px;
        padding: 0;
    }
}

/* Small mobile screens - use standard AdSense banner sizes */
@media (max-width: 500px) {
    .ad-space {
        width: 320px;
        height: 50px;
        padding: 0;
    }
}

/* Dynamic ad spaces created by JavaScript - use rectangle format on mobile */
.ad-space.dynamic {
    /* Same as static for desktop/tablet */
}

/* Mobile responsive dynamic ad space - switch to rectangle format */
@media (max-width: 768px) {
    .ad-space.dynamic {
        width: 336px;
        height: 280px;
        padding: 0;
    }
}

/* Small mobile screens - use standard AdSense rectangle sizes for dynamic ads */
@media (max-width: 500px) {
    .ad-space.dynamic {
        width: 320px;
        height: 250px;
        padding: 0;
    }
}

/* Footer */
.footer {
    background: var(--bg-primary);
    border-top: 2px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer .container {
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

.footer .disclaimer {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    opacity: 1;
}

.footer a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Admin Panel Styles */
.admin-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 20px;
}

.admin-top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.admin-header {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.admin-form {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* Contact form layout tweaks on about page */
.contact-form .form-group { margin-bottom: 1rem; }
.contact-form #contactStatus { margin-bottom: 0.75rem; }

/* Contact form checkbox styling */
#contactNotBot {
    accent-color: var(--accent-primary);
    transform: scale(1.2);
    margin-right: 0.5rem;
}

.form-select {
    width: 100%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
}

.form-textarea {
    width: 100%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
}



.preview-container {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: none;
}

.preview-video {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.preview-thumbnail {
    width: 200px;
    height: 112px;
    border-radius: 4px;
    object-fit: cover;
}

.preview-info {
    flex: 1;
}

.status-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.status-success {
    background: rgba(25, 135, 84, 0.2);
    border: 1px solid #198754;
    color: #75dd88;
}

.status-error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #f5a2a2;
}

.status-warning {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid #ffc107;
    color: #ffd966;
}

.status-info {
    background: rgba(13, 202, 240, 0.2);
    border: 1px solid #0dcaf0;
    color: #87e8f7;
}

.tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    min-height: 44px;
}

.tag-item {
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tag-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tag-input {
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    flex: 1;
    min-width: 100px;
    padding: 0.25rem;
    outline: none;
}

.videos-list {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.video-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    background: var(--bg-tertiary);
}

.video-item img {
    width: 120px;
    height: 68px;
    border-radius: 4px;
    object-fit: cover;
}

.video-item-info {
    flex: 1;
}

.video-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.video-item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.video-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    margin: 0;
}

.admin-login {
    text-align: center;
    padding-top: 5rem;
}

.admin-login-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    max-width: 400px;
    margin: 0 auto;
}

.admin-login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.admin-login-input {
    margin-bottom: 1rem;
}

.admin-login-button {
    width: 100%;
}

/* Responsive design */
@media (max-width: 768px) {
    .preview-video {
        flex-direction: column;
    }
    
    .preview-thumbnail {
        width: 100%;
        height: auto;
    }
    
    .video-item {
        flex-direction: column;
    }
    
    .video-item-actions {
        flex-direction: row;
        align-items: center;
    }
}

/* Main responsive design */
@media (max-width: 900px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 20px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-bar {
        min-width: unset;
        max-width: unset;
    }
    
    .category-nav {
        justify-content: flex-start;
    }

    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-section {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .stat-card {
        min-width: 140px;
        max-width: 180px;
        padding: 0.75rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .video-card {
        margin: 0 -5px;
    }
    
    .video-info {
        padding: 1rem;
    }
    
    .nav-btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Animations - DISABLED to prevent blinking */
/* @keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
} */

.video-card {
    /* opacity: 0; */
    /* animation: fadeInUp 0.4s ease forwards; */
}

/* .video-card:nth-child(even) {
    animation-delay: 0.05s;
}

.video-card:nth-child(3n) {
    animation-delay: 0.1s;
} */

.videos-grid {
    /* transition: opacity 0.3s ease; */
}

/* .videos-grid.loading {
    opacity: 0.7;
} - DISABLED to prevent blinking */

/* Loading state for YouTube data fetching - DISABLED to prevent blinking */
/* .video-card.loading-data {
    opacity: 0.7;
    pointer-events: none;
}

.video-card.loading-data .video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 107, 53, 0.1);
    backdrop-filter: blur(2px);
} */

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Hero Section Mobile Styles */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0;
    }
    
    .hero-section {
        padding: 1rem 0;
        margin-bottom: 2rem;
    }
}

/* Video Player Page Styles */
.video-player-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 140px);
}

.video-wrapper {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-embed {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

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

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    justify-content: flex-start;
    align-items: center;
}

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

.meta-item i {
    color: var(--accent-primary);
}

.video-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Q&A styles */
.qa-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.qa-item {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.qa-question {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.qa-answer {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* QA list bullets */
.qa-list-bullets {
    margin: 0.5rem 0 0.25rem 1.25rem;
    padding: 0;
}

.qa-list-bullets li {
    margin: 0.2rem 0;
}

/* Text link styles inside content */
.content a, .qa-answer a, .video-description a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

.content a:hover, .qa-answer a:hover, .video-description a:hover {
    color: var(--accent-tertiary);
    text-decoration: underline;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.btn-action {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    height: 40px;
    box-sizing: border-box;
    line-height: 1;
}

.btn-action:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-action:active {
    transform: translateY(0);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    margin-bottom: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--accent-secondary);
}

.ad-space-bottom {
    margin-top: 3rem;
}

.related-videos {
    margin-top: 3rem;
}

.related-videos h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-video {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.related-video:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px var(--shadow-dark);
    border-color: var(--accent-primary);
}

.related-thumb-container {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.related-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

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

.related-info {
    padding: 1rem;
}

.related-title {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.related-views {
    color: var(--text-secondary);
}

.related-channel {
    color: var(--accent-primary);
    font-weight: 500;
}

/* Video Player Responsive Styles */
@media (max-width: 900px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .video-meta {
        gap: 1rem;
        justify-content: flex-start;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-action {
        justify-content: center;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-video {
        display: block;
    }

    .related-thumb-container {
        width: 100%;
        height: 180px;
        overflow: hidden;
    }

    .related-thumb {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .related-info {
        padding: 1rem;
    }

    .related-title {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.5rem;
    }

    .related-meta {
        flex-direction: row;
        gap: 1rem;
        align-items: center;
    }

    .related-views, .related-channel {
        font-size: 0.8rem;
    }
}
