/* Memes Page Specific Styles */
.memes-section {
    min-height: 100vh;
    padding: 150px 40px 80px;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
}

.memes-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-box svg {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #a8a8d8;
}

.search-box input {
    width: 100%;
    padding: 15px 20px 15px 55px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #ffffff;
    font-family: 'Fredoka', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #ff6b9d;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

.search-box input::placeholder {
    color: #a8a8d8;
}

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

.filter-btn {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #ffffff;
    font-family: 'Fredoka', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 107, 157, 0.5);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    border-color: transparent;
    box-shadow: 0 5px 20px rgba(255, 107, 157, 0.4);
}

/* Memes Grid */
.memes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.meme-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    animation: fadeInUp 0.5s ease backwards;
}

.meme-card:hover {
    transform: translateY(-10px);
    border-color: #ff6b9d;
    box-shadow: 0 20px 50px rgba(255, 107, 157, 0.4);
}

.meme-preview {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #252541);
}

.meme-preview img,
.meme-preview video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.meme-card:hover .meme-preview img,
.meme-card:hover .meme-preview video {
    transform: scale(1.1);
}

.meme-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.meme-card:hover .meme-overlay {
    opacity: 1;
}

.meme-overlay-content {
    width: 100%;
}

.meme-overlay-content h3 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 5px;
}

.meme-overlay-content p {
    color: #c8c8e8;
    font-size: 14px;
}

.video-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 107, 157, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 15px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.video-indicator svg {
    width: 16px;
    height: 16px;
}

/* Load More */
.load-more-container {
    text-align: center;
}

/* Meme Modal */
.meme-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 12, 41, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.meme-modal.active {
    display: flex;
}

.modal-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 107, 157, 0.9);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-close:hover {
    background: #ff6b9d;
    transform: rotate(90deg) scale(1.1);
}

.modal-body {
    padding: 30px;
}

.modal-body img,
.modal-body video {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 20px;
}

.modal-body video {
    max-height: 600px;
    object-fit: contain;
    background: #000000;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 30px 30px;
}

.modal-actions .action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #4ecdc4, #6ee7df);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-family: 'Fredoka', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-actions .action-btn svg {
    width: 20px;
    height: 20px;
}

.modal-actions .action-btn:first-child {
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
}

.modal-actions .action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.5);
}

.modal-actions .action-btn:first-child:hover {
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.5);
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b9d, #4ecdc4);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff8fab, #6ee7df);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 28px;
    color: #ffd93d;
    margin-bottom: 15px;
}

.no-results p {
    color: #c8c8e8;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .memes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .memes-section {
        padding: 120px 20px 60px;
    }
    
    .memes-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .filter-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .memes-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
        padding: 0 20px 20px;
    }
    
    .modal-actions .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Stagger animation delays */
.meme-card:nth-child(1) { animation-delay: 0.05s; }
.meme-card:nth-child(2) { animation-delay: 0.1s; }
.meme-card:nth-child(3) { animation-delay: 0.15s; }
.meme-card:nth-child(4) { animation-delay: 0.2s; }
.meme-card:nth-child(5) { animation-delay: 0.25s; }
.meme-card:nth-child(6) { animation-delay: 0.3s; }
.meme-card:nth-child(7) { animation-delay: 0.35s; }
.meme-card:nth-child(8) { animation-delay: 0.4s; }
.meme-card:nth-child(9) { animation-delay: 0.45s; }
