/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px 40px;
}

/* Navigation Buttons */
.nav-btn {
    position: fixed;
    top: 20px;
    z-index: 1000;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

.nav-btn-home {
    left: 20px;
}

.nav-btn-login {
    right: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 60px 0 30px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Controls */
.controls {
    margin-bottom: 30px;
}

.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto 20px;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border-radius: 30px;
    border: 2px solid #333;
    background: #2a2a2a;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

.search-input::placeholder {
    color: #666;
}

.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 8px 22px;
    border-radius: 20px;
    border: 2px solid #333;
    background: transparent;
    color: #999;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #fff;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-control label {
    color: #999;
    font-size: 0.9rem;
}

.sort-select {
    padding: 8px 16px;
    border-radius: 15px;
    border: 2px solid #333;
    background: #2a2a2a;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.sort-select:focus {
    border-color: #667eea;
}

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

/* Video Card */
.video-card {
    background: #2a2a2a;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #1a1a1a;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.video-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-thumbnail-overlay {
    opacity: 1;
}

.video-thumbnail-overlay i {
    font-size: 3rem;
    color: #fff;
}

.video-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.video-badge {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.video-badge.new {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
}

.video-badge.popular {
    background: linear-gradient(135deg, #FF6B6B, #ee5a24);
    color: #fff;
}

.video-badge.trending {
    background: linear-gradient(135deg, #FFD93D, #f0c929);
    color: #1a1a1a;
}

/* Video Info */
.video-info {
    padding: 18px 20px;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    min-height: 50px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.video-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #999;
}

.video-meta-item.views {
    color: #4CAF50;
}

.video-meta-item i {
    font-size: 0.8rem;
}

.video-creator {
    font-size: 0.85rem;
    color: #bbb;
    margin-bottom: 12px;
}

.video-creator i {
    margin-right: 5px;
    color: #667eea;
}

.video-button {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.video-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.page-btn {
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #333;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.page-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #333;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-num:hover,
.page-num.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.page-num.ellipsis {
    border: none;
    cursor: default;
    background: none;
}

.page-info {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

.floating-btn:hover {
    transform: translateY(-3px) scale(1.1);
}

.btn-telegram {
    background: linear-gradient(135deg, #0088cc, #005f99);
    animation-delay: 0s;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    animation-delay: 0.5s;
}

.btn-facebook {
    background: linear-gradient(135deg, #1877F2, #0d5bbf);
    animation-delay: 1s;
}

.btn-share {
    background: linear-gradient(135deg, #667eea, #764ba2);
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating-btn:hover {
    animation-play-state: paused;
}

/* Share Menu */
.share-menu {
    position: fixed;
    bottom: 100px;
    right: 90px;
    background: #2a2a2a;
    border-radius: 16px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    min-width: 180px;
}

.share-menu.show {
    display: flex;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.share-option:hover {
    background: rgba(102, 126, 234, 0.2);
}

.share-option i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.share-option.copy-link {
    border-top: 1px solid #333;
    margin-top: 5px;
    padding-top: 12px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.85rem;
    border-top: 1px solid #2a2a2a;
}

.footer a {
    color: #667eea;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* Skeleton Loader */
.skeleton-card {
    background: #2a2a2a;
    border-radius: 16px;
    overflow: hidden;
}

.skeleton-thumbnail {
    height: 200px;
    background: linear-gradient(90deg, #2a2a2a 0%, #333 50%, #2a2a2a 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

.skeleton-info {
    padding: 18px 20px;
}

.skeleton-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #2a2a2a 0%, #333 50%, #2a2a2a 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    margin-bottom: 10px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .container {
        padding: 15px 15px 30px;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .video-thumbnail {
        height: 150px;
    }

    .video-info {
        padding: 12px 14px;
    }

    .video-title {
        font-size: 0.9rem;
        min-height: 40px;
    }

    .video-meta {
        gap: 8px;
    }

    .video-meta-item {
        font-size: 0.75rem;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .filters {
        flex-direction: column;
        gap: 12px;
    }

    .pagination {
        gap: 5px;
    }

    .page-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.4rem;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .video-thumbnail {
        height: 120px;
    }

    .video-button {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
}
