:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --dark: #1f2937;
    --darker: #111827;
    --light: #f8fafc;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--darker);
    color: var(--light);
    line-height: 1.6;
}

/* Header */
.header {
    background: var(--dark);
    border-bottom: 1px solid #374151;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

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

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    background: var(--darker);
    color: var(--light);
    width: 300px;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    color: white;
}

.btn-primary {
    background: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray);
}

.btn-secondary:hover {
    background: var(--gray-light);
    color: var(--dark);
}

/* Main Layout */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

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

.video-card {
    background: var(--dark);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid #374151;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.video-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tag {
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

/* Ad Spots */
.adspot {
    background: var(--dark);
    border: 2px dashed #374151;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    margin: 1rem 0;
    font-size: 0.9rem;
}

.adspot-300x250 {
    width: 300px;
    height: 250px;
}

.adspot-728x90 {
    width: 728px;
    height: 90px;
    margin: 1rem auto;
}

/* Sidebar */
.sidebar-section {
    background: var(--dark);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #374151;
    margin-bottom: 1.5rem;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

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

.pagination .btn {
    background: var(--dark);
    color: var(--light);
    border: 1px solid #374151;
    min-width: 40px;
    text-align: center;
}

.pagination .btn:hover {
    background: var(--primary);
}

.pagination .active {
    background: var(--primary);
}

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

.admin-form {
    background: var(--dark);
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #374151;
    max-width: 600px;
    margin: 0 auto;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    background: var(--darker);
    color: var(--light);
    font-family: inherit;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #ef4444;
    color: white;
}

.alert-success {
    background: #10b981;
    color: white;
}

/* Video Player */
.video-player {
    width: 100%;
    border-radius: 0.75rem;
    background: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .search-input {
        width: 200px;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .adspot-728x90 {
        width: 100%;
        max-width: 300px;
        height: 250px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-form {
        width: 100%;
        justify-content: center;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Link Styles */
a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}
