/* Main layout styles */
* {
    box-sizing: border-box;
}

body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    background: #23272f !important; 
    color: #f3f4f6 !important; 
    margin: 0;
    padding: 0;
    min-height: 100vh;
    line-height: 1.6;
}

header { 
    background: #2d323c !important; 
    padding: 20px 0; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); 
    position: relative;
    z-index: 100;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 18px; 
    width: 100%;
}

.logo { 
    font-size: 2.2em; 
    color: #6b7280 !important; 
    font-weight: bold; 
    text-decoration: none; 
    letter-spacing: 1px; 
}

nav { 
    display: inline-block; 
    margin-left: 40px; 
}

nav a { 
    color: #f3f4f6 !important; 
    text-decoration: none; 
    margin: 0 14px; 
    font-size: 1.13em; 
    transition: color 0.2s; 
}

nav a:hover { 
    color: #6b7280 !important; 
}

/* Video grid */
.video-list { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 20px; 
    margin: 20px 0; 
    width: 100%;
}

.video-item { 
    background: #2d323c !important; 
    border-radius: 8px; 
    overflow: hidden; 
    transition: transform 0.2s; 
    width: 100%;
}

.video-item:hover { 
    transform: translateY(-2px); 
}

.video-item a { 
    text-decoration: none; 
    color: inherit; 
    display: block;
    width: 100%;
}

.video-thumb { 
    width: 100%; 
    height: 170px; 
    object-fit: cover; 
    display: block;
}

.video-title { 
    padding: 12px; 
    font-size: 0.95em; 
    color: #f3f4f6 !important; 
    line-height: 1.3; 
}

.video-meta { 
    padding: 0 12px 12px; 
    font-size: 0.85em; 
    color: #a1a1aa !important; 
}

/* Categories */
.categories-block { 
    margin: 20px 0; 
    width: 100%;
}

.categories-title { 
    font-size: 1.5em; 
    margin-bottom: 15px; 
    color: #6b7280 !important; 
}

.categories-list { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
    width: 100%;
}

.category-item { 
    background: #2d323c !important; 
    color: #f3f4f6 !important; 
    padding: 8px 16px; 
    border-radius: 20px; 
    text-decoration: none; 
    transition: background 0.2s; 
}

.category-item:hover { 
    background: #6b7280 !important; 
    color: #000 !important; 
}

/* Breadcrumbs */
.breadcrumbs { 
    padding: 15px 0; 
    color: #a1a1aa !important; 
    width: 100%;
}

.breadcrumbs a { 
    color: #6b7280 !important; 
    text-decoration: none; 
}

/* Sidebar */
aside { 
    background: #2d323c !important; 
    padding: 20px; 
    border-radius: 8px; 
    margin-top: 20px; 
}

.sidebar-block { 
    margin-bottom: 20px; 
}

.sidebar-block b { 
    color: #6b7280 !important; 
    display: block; 
    margin-bottom: 10px; 
}

/* Ads */
.ads { 
    text-align: center; 
    margin: 20px 0; 
    min-height: 90px; 
    width: 100%;
}

.banner.ads { 
    background: rgba(255,255,255,0.05); 
    padding: 20px; 
    border-radius: 8px; 
}

/* Main layout */
.main { 
    display: grid; 
    grid-template-columns: 1fr 300px; 
    gap: 30px; 
    margin: 20px 0; 
    width: 100%;
}

@media (max-width: 768px) {
    .main { 
        grid-template-columns: 1fr; 
    }
    
    .video-list { 
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
    }
    
    .categories-list { 
        justify-content: center; 
    }
    
    .container {
        padding: 0 12px;
    }
}

/* Video page */
.video-player { text-align: center; margin-bottom: 28px; width: 100%; }
.video-wrapper { 
    position: relative; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.video-wrapper iframe { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: none;
    border-radius: 8px;
}
.video-player iframe { 
    max-width: 100%; 
    width: 100%; 
    height: auto; 
    min-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.video-thumb.big { height: 400px; }
.video-title.big { font-size: 2em; margin: 14px 0 8px 0; color: #6b7280 !important; font-weight: bold; }
.video-desc.big { margin: 12px 0; color: #a1a1aa !important; font-size: 1.08em; }
footer.big { border-radius: 0 0 12px 12px; }

/* Mobile responsive video player */
@media (max-width: 900px) {
    .container { padding: 8px; }
    .video-thumb.big { height: 200px; }
    .video-title.big { font-size: 1.2em; }
    .video-player iframe { 
        min-height: 300px;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .video-player iframe { 
        min-height: 250px;
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 400px) {
    .video-player iframe { 
        min-height: 200px;
        width: 100%;
        max-width: 100%;
    }
}

/* Ensure proper centering and layout */
body > * {
    width: 100%;
    max-width: 100%;
}

/* Fix any potential float issues */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix form elements */
input, button, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Ensure proper text rendering */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
