/* Choose Style Page Styles */

.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Outfit", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.back-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Subtitle */
.style-subtitle {
    font-family: "Outfit", sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-top: 12px;
    margin-bottom: 4px;
}

.style-subtitle strong {
    color: var(--text-primary);
    font-weight: 600;
}

.style-hint {
    font-family: "Outfit", sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.style-hint.visible {
    opacity: 1;
}

/* Loading overlay */
.gen-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 80px 20px;
    position: relative;
    z-index: 10;
}

.gen-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid var(--border-subtle);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.gen-loading-title {
    font-family: "Syne", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.gen-loading-counter {
    font-family: "Outfit", sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.gen-loading-albums {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    max-width: 600px;
}

.gen-loading-chip {
    font-family: "Outfit", sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    padding: 4px 12px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.gen-loading-chip.done {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Style gallery grid */
.style-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 40px;
    position: relative;
    z-index: 10;
    align-items: start;
}

/* Style card */
.style-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    animation: cardReveal 0.5s ease-out both;
}

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.style-card:nth-child(1) { animation-delay: 0.05s; }
.style-card:nth-child(2) { animation-delay: 0.12s; }
.style-card:nth-child(3) { animation-delay: 0.19s; }
.style-card:nth-child(4) { animation-delay: 0.26s; }
.style-card:nth-child(5) { animation-delay: 0.33s; }

.style-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 2px var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Poster image */
.card-poster {
    display: block;
    width: 100%;
    position: relative;
}

.card-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Hover overlay */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 40%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.card-style-name {
    font-family: "Syne", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: capitalize;
}

.card-cta {
    display: inline-block;
    font-family: "Outfit", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #000;
    background: var(--accent-primary);
    padding: 7px 16px;
    border-radius: 50px;
}

/* Style label + description below poster */
.card-details {
    padding: 14px 16px 18px;
    text-align: center;
}

.card-style-label {
    font-family: "Syne", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-style-desc {
    font-family: "Outfit", sans-serif;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Error state */
.card-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    font-family: "Outfit", sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Hidden forms */
.card-form {
    display: none;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-primary);
    position: relative;
    z-index: 5;
}

footer a {
    font-family: "Outfit", sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .style-gallery {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 24px;
    }
}

@media (max-width: 768px) {
    .style-gallery {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 16px;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .style-gallery {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
}
