.gallery-hero {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    color: white;
    text-shadow: 
        -3px -3px 0 #000,
        3px -3px 0 #000,
        -3px 3px 0 #000,
        3px 3px 0 #000;
    margin-bottom: 12px;
}

.gallery-subtitle {
    font-size: 1rem;
    color: var(--color-text-muted);
}

.gallery-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-card);
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.sort-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.sort-select {
    padding: 8px 32px 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.sort-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.sort-select option {
    background: #0D47A1;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 3px solid #000;
    border-radius: var(--radius-md);
    color: #000;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 3px 0 #000;
    transition: var(--transition);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #000;
}

.refresh-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 #000;
}

.refresh-btn svg {
    width: 18px;
    height: 18px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.gallery-card {
    background: var(--color-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-4px);
}

.card-image-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-card:hover .card-image {
    transform: scale(1.05);
}

.card-body {
    padding: 16px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: white;
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    margin-bottom: 8px;
}

.card-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.card-footer {
    display: flex;
    gap: 10px;
    align-items: center;
}

.vote-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 50px;
}

.vote-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.vote-btn.active.upvote { color: #4ade80; }
.vote-btn.active.downvote { color: #f87171; }

.vote-btn svg {
    width: 16px;
    height: 16px;
}

.vote-score {
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    min-width: 24px;
    text-align: center;
}

.card-download-btn {
    margin-left: auto;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.card-download-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.card-download-btn svg {
    width: 14px;
    height: 14px;
}

.gallery-empty {
    text-align: center;
    padding: 60px 20px;
}

.empty-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: white;
    text-shadow: 
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
    margin-bottom: 8px;
}

.empty-text {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: white;
    border: 3px solid #000;
    border-radius: var(--radius-lg);
    color: #000;
    font-family: var(--font-display);
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 0 #000;
    transition: var(--transition);
}

.empty-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #000;
}

.empty-cta svg {
    width: 20px;
    height: 20px;
}

.gallery-loading {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.skeleton-card {
    background: var(--color-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.skeleton-card::before {
    content: '';
    display: block;
    aspect-ratio: 1;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

.gallery-pagination {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    padding: 20px;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-card);
}

.page-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

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

.page-btn svg {
    width: 16px;
    height: 16px;
}

.page-info {
    font-weight: 600;
    color: white;
}

.image-modal-content {
    position: relative;
    background: var(--color-card);
    border-radius: var(--radius-xl);
    padding: 24px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-card);
}

.modal-image-wrap {
    margin-bottom: 20px;
}

.modal-full-image {
    width: 100%;
    border-radius: var(--radius-lg);
}

.modal-image-info {
    text-align: center;
}

.modal-image-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: white;
    text-shadow: 
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
    margin-bottom: 8px;
}

.modal-image-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.modal-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 3px solid #000;
    border-radius: var(--radius-md);
    color: #000;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 0 #000;
    transition: var(--transition);
}

.modal-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 #000;
}

.modal-download-btn svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 600px) {
    .gallery-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-group {
        justify-content: space-between;
    }

    .refresh-btn {
        justify-content: center;
    }

    .gallery-grid,
    .gallery-loading {
        grid-template-columns: 1fr;
    }

    .card-footer {
        flex-wrap: wrap;
    }

    .card-download-btn {
        margin-left: 0;
        flex: 1;
        justify-content: center;
    }
}
