/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: #0a0a0a;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
}

/* Header */
header {
    background: #1a1a1a;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.search-form {
    display: flex;
    gap: 5px;
}

.search-form input {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    width: 300px;
}

.search-form button {
    padding: 8px 15px;
    border: none;
    background: #ff6b6b;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

/* Sidebar */
.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.sidebar h3 {
    margin: 20px 0 10px;
    font-size: 18px;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin: 5px 0;
}

.category-list a {
    color: #333;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.category-list a:hover {
    background: #e0e0e0;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
    border-radius: 15px;
    font-size: 14px;
    transition: background 0.2s;
}

.tag:hover {
    background: #d0d0d0;
}

/* Main Content */
main {
    flex: 1;
    min-width: 0;
}

h1 {
    margin: 20px 0;
    font-size: 28px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.video-card a {
    position: relative;
    display: block;
}

.video-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

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

.video-info {
    padding: 12px;
}

.video-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.video-info h3 a {
    color: #333;
    text-decoration: none;
}

.video-info h3 a:hover {
    color: #ff6b6b;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

/* Video Page */
.video-page {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.video-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    margin: 20px 0;
    background: #000;
}

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

.video-details {
    margin: 20px 0;
}

.video-stats {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.video-category,
.video-tags {
    margin: 15px 0;
}

.video-description {
    margin: 20px 0;
}

.video-description h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.related-videos {
    margin: 40px 0;
}

.related-videos h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

/* Ad Zones */
.ad-zone {
    min-height: 90px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    border-radius: 4px;
}

.ad-zone-sidebar {
    min-height: 250px;
    background: #f0f0f0;
    margin: 20px 0;
    border-radius: 4px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
}

.pagination a {
    padding: 10px 20px;
    background: #ff6b6b;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a:hover {
    background: #ff5252;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
}

/* Admin Styles */
.admin-login {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.admin-panel {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.admin-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.admin-form {
    max-width: 800px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn-primary {
    padding: 12px 24px;
    background: #ff6b6b;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary:hover {
    background: #ff5252;
}

.btn-secondary {
    padding: 12px 24px;
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.error-message {
    padding: 12px;
    background: #ffebee;
    color: #c62828;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .search-form input {
        width: 200px;
    }
}
