/* NanoBananaPro Gallery - Custom Styles */

/* Base Styles */
* {
    scrollbar-width: thin;
    scrollbar-color: #374151 #1f2937;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #1f2937;
}

*::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Gallery Card Styles */
.gallery-card {
    background: linear-gradient(145deg, #1f2937, #111827);
    border: 1px solid #374151;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: #FBBF24;
}

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

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #111827;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .card-image-overlay {
    opacity: 1;
}

.card-content {
    padding: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f3f4f6;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-prompt {
    font-size: 0.875rem;
    color: #9ca3af;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

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

.card-tags {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.card-tag {
    background: rgba(251, 191, 36, 0.1);
    color: #FBBF24;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.card-tag:hover {
    background: rgba(251, 191, 36, 0.2);
}

/* Tag Styles */
.tag-btn {
    background: rgba(251, 191, 36, 0.1);
    color: #FBBF24;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tag-btn:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #FBBF24;
}

.tag-btn.active {
    background: #FBBF24;
    color: #111827;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #1f2937 0%, #374151 50%, #1f2937 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

.skeleton-card {
    background: linear-gradient(145deg, #1f2937, #111827);
    border: 1px solid #374151;
    border-radius: 1rem;
    overflow: hidden;
}

.skeleton-image {
    aspect-ratio: 1;
    background: linear-gradient(90deg, #1f2937 0%, #374151 50%, #1f2937 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text {
    height: 1rem;
    border-radius: 0.25rem;
    background: linear-gradient(90deg, #1f2937 0%, #374151 50%, #1f2937 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* Toast Animation */
.toast-show {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* Modal Transitions */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Image Loading */
.image-loading {
    position: relative;
}

.image-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #1f2937 0%, #374151 50%, #1f2937 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

/* Like Animation */
@keyframes likeAnimation {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

.like-animation {
    animation: likeAnimation 0.4s ease;
}

/* Responsive Grid Adjustments */
@media (max-width: 640px) {
    .card-image {
        aspect-ratio: 4/3;
    }
}

/* Aspect Ratio Badge */
.aspect-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

/* Copy Button Animation */
.copy-success {
    color: #10b981 !important;
}

/* Error State */
.image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #1f2937;
    color: #6b7280;
}

.image-error i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Hover Effects */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

/* Masonry Layout Support (Optional) */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Print Styles */
@media print {
    header,
    #postModal,
    #detailModal,
    button {
        display: none !important;
    }
    
    .gallery-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
