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

body {
    background-color: #1a1a2e;
    color: #eaeaea;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
}

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

/* Header */
.header {
    padding: 15px 0;
    border-bottom: 2px solid #e94560;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Sort Bar */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.sort-label {
    color: #888;
    font-weight: 600;
    margin-right: 5px;
}

.sort-btn {
    background-color: #16213e;
    color: #ccc;
    border: 1px solid #0f3460;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s;
}

.sort-btn:hover {
    background-color: #0f3460;
    color: #fff;
}

.sort-btn.active {
    background-color: #e94560;
    border-color: #e94560;
    color: #fff;
}

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

/* Video Card */
.video-card {
    background-color: #16213e;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: #eaeaea;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.thumbnail-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #0f3460;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-info {
    padding: 12px;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    max-height: 2.6em;
    margin-bottom: 8px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #888;
}

/* Loader */
.loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    color: #888;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-btn {
    background-color: #16213e;
    color: #ccc;
    border: 1px solid #0f3460;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.page-btn:hover {
    background-color: #0f3460;
    color: #fff;
}

.page-btn.active {
    background-color: #e94560;
    border-color: #e94560;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .sort-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .header h1 {
        font-size: 1.4rem;
    }
}
.page-dots {
    color: #888;
    padding: 8px 4px;
    font-weight: bold;
    user-select: none;
}

.page-info {
    color: #888;
    font-size: 0.75rem;
    margin-left: 10px;
}
@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .container {
        padding: 10px;
    }
}
/* Search Bar */
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.search-bar input {
    flex: 1;
    background-color: #16213e;
    border: 1px solid #0f3460;
    color: #fff;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.3s;
}

.search-bar input:focus {
    border-color: #e94560;
}

.search-bar button {
    background-color: #e94560;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s;
}

.search-bar button:hover {
    background-color: #ff6b6b;
}

#clearSearch {
    background-color: #16213e;
    border: 1px solid #0f3460;
    color: #ccc;
}

#clearSearch:hover {
    background-color: #0f3460;
    color: #fff;
}