.gallery-page {
    background: #f5f5f5;
    min-height: 100vh;
}

.create-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    background: rgba(255,107,107,0.1);
    border-radius: 20px;
}

.filters-section {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.filters-section .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: white;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Heebo', sans-serif;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.sort-controls select {
    padding: 0.6rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: 'Heebo', sans-serif;
}

.memes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.meme-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    cursor: pointer;
}

.meme-card:hover {
    transform: translateY(-5px);
}

.meme-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.meme-info {
    padding: 1.5rem;
}

.meme-category {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--accent);
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.meme-texts p {
    font-weight: 700;
    margin: 0.5rem 0;
}

.meme-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    color: #666;
}

.meme-likes {
    cursor: pointer;
}

.meme-likes.liked {
    color: var(--primary);
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: #999;
}

.empty-state {
    text-align: center;
    padding: 4rem;
}

.empty-state.hidden {
    display: none;
}

.top-memes-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    color: white;
}

.top-memes-section h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.top-memes-section .subtitle {
    text-align: center;
    margin-bottom: 3rem;
}

.top-memes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.top-meme-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.top-meme-rank {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark);
}

.top-meme-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.top-meme-info {
    padding: 1.5rem;
    color: var(--dark);
}

@media (max-width: 768px) {
    .filters-section .container {
        flex-direction: column;
    }
    .memes-grid {
        grid-template-columns: 1fr;
    }
}

.meme-cta {
    background: #f8f9fa;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 10px;
    border-right: 4px solid var(--primary);
}

.cta-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.cta-subtext {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.meme-location {
    font-size: 0.85rem;
    color: #666;
}

.meme-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.download-meme-btn,
.share-meme-btn,
.delete-meme-btn {
    flex: 1;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Heebo', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.delete-meme-btn {
    background: #dc3545;
    flex: 0 0 auto;
    min-width: 50px;
    padding: 0.6rem;
}

.delete-meme-btn:hover {
    background: #c82333;
}

.download-meme-btn:hover,
.share-meme-btn:hover,
.delete-meme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.download-meme-btn:active,
.share-meme-btn:active,
.delete-meme-btn:active {
    transform: translateY(0);
}

.meme-card {
    transition: opacity 0.3s ease;
}
