* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.main-nav {
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #667eea;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    color: #555;
    font-weight: 500;
}

.premium-badge {
    font-size: 14px;
}

.btn-login, .btn-register, .btn-logout {
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-login {
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-login:hover {
    background: #667eea;
    color: white;
}

.btn-register, .btn-logout {
    background: #667eea;
    color: white;
}

.btn-register:hover, .btn-logout:hover {
    background: #5568d3;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search Bar */
.search-bar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.search-bar form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-bar input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-bar select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.search-bar button {
    padding: 10px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #5568d3;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.video-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.video-card a {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    width: 100%;
    padding-bottom: 56.25%;
    background-size: cover;
    background-position: center;
    background-color: #e0e0e0;
    position: relative;
}

.duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.video-card-info {
    padding: 15px;
}

.video-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card-author {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.video-card-stats {
    color: #999;
    font-size: 12px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* No Videos Message */
.no-videos {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.no-videos h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.no-videos p {
    color: #666;
}

/* Footer */
.main-footer {
    background: #2d3748;
    color: #cbd5e0;
    margin-top: 60px;
    padding: 40px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3, .footer-section h4 {
    color: #fff;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .search-bar form {
        flex-direction: column;
    }
    
    .search-bar input[type="text"],
    .search-bar select,
    .search-bar button {
        width: 100%;
    }
}
