/**
 * AI Photo Trend - Themes CSS
 * Clean & Optimized
 */

/* ===== THEMES BROWSE/GALLERY PAGES ===== */
.themes-section {
    padding: 4rem 2rem;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .themes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 1024px) {
    .themes-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .themes-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
        max-width: 100%;
        padding: 0 1rem;
    }

    .themes-section {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .themes-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .themes-section {
        padding: 2rem 1rem;
    }
}

.themes-gallery-section {
    padding: 4rem 2rem;
    min-height: calc(100vh - 80px);
}

.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(42, 42, 63, 0.3);
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-tab:hover {
    border-color: var(--accent-purple);
    background: rgba(179, 0, 255, 0.1);
    transform: translateY(-2px);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    border-color: var(--accent-purple);
    color: white;
    box-shadow: 0 5px 20px rgba(179, 0, 255, 0.4);
}

/* Category Filters */
.category-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
}

.category-btn {
    padding: 0.5rem 1rem;
    background: rgba(42, 42, 63, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
    min-width: 0;
}

.category-btn:hover {
    border-color: var(--accent-purple);
    background: rgba(179, 0, 255, 0.15);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.category-btn.active {
    background: rgba(179, 0, 255, 0.2);
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    font-weight: 600;
}

.cta-banner {
    background: linear-gradient(135deg, rgba(179, 0, 255, 0.1), rgba(255, 0, 68, 0.1));
    border: 2px solid var(--accent-purple);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.cta-banner.warning {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.1), rgba(255, 0, 68, 0.1));
    border-color: var(--warning);
}

.cta-banner-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cta-banner-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ===== MODERN THEME CARDS GRID ===== */
.themes-showcase-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Modern Theme Card - Compact Style with Neon Glow */
.ai-theme-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    border: 1px solid rgba(179, 0, 255, 0.25);
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(179, 0, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ai-theme-card::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-purple), var(--accent-red), var(--accent-purple), transparent);
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.6;
    z-index: 1;
    transition: all 0.3s ease;
}

.ai-theme-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 30px;
    background: linear-gradient(to top, rgba(179, 0, 255, 0.15), transparent);
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
}

.ai-theme-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-purple);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 35px rgba(179, 0, 255, 0.2),
        0 0 60px rgba(179, 0, 255, 0.1);
}

.ai-theme-card:hover::before {
    opacity: 1;
    filter: blur(6px);
    height: 5px;
    left: 5%;
    right: 5%;
}

.ai-theme-card:hover::after {
    height: 50px;
    background: linear-gradient(to top, rgba(179, 0, 255, 0.25), transparent);
}

.ai-theme-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.ai-theme-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ai-theme-card:hover .ai-theme-card__image img {
    transform: scale(1.05);
}

.ai-theme-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(179, 0, 255, 0.15), rgba(255, 0, 68, 0.15));
}

.ai-theme-card__icon {
    font-size: 2.5rem;
}

/* Title Overlay - Bottom Left */
.ai-theme-card__title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 0.75rem 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    pointer-events: none;
}

.ai-theme-card__title-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Inline Meta Info (Views & Usage) */
.ai-theme-card__meta-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.4rem;
    opacity: 0.9;
}

.ai-theme-card__meta-inline-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ai-theme-card__meta-inline-item svg {
    width: 12px;
    height: 12px;
    stroke: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

/* Hover Overlay */
.ai-theme-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ai-theme-card:hover .ai-theme-card__overlay {
    opacity: 1;
    pointer-events: auto;
}

.ai-theme-card__overlay .btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
    pointer-events: auto;
}

/* Hide old content section */
.ai-theme-card__content {
    display: none;
}

.showcase-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* ===== THEME DETAIL CARD (for theme.php & theme_preview.php) ===== */
.theme-detail-card {
    background: var(--card-bg);
    border: 1px solid rgba(179, 0, 255, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 0 25px rgba(179, 0, 255, 0.1);
}

.theme-detail-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.theme-detail-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.theme-detail-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(179, 0, 255, 0.15), rgba(255, 0, 68, 0.15));
    font-size: 3rem;
}

.theme-detail-card__title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
}

.theme-detail-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Orbitron', sans-serif;
}

.theme-detail-card__info {
    padding: 1rem;
    background: rgba(20, 20, 31, 0.95);
}

.theme-detail-card__description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.theme-detail-card__meta {
    display: flex;
    gap: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(179, 0, 255, 0.15);
}

.theme-detail-card__meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.theme-detail-card__meta-item svg {
    stroke: var(--accent-purple);
    opacity: 0.8;
}

/* Responsive for theme detail card */
@media (max-width: 768px) {
    .theme-detail-card__title {
        font-size: 1rem;
    }
    
    .theme-detail-card__description {
        font-size: 0.8rem;
    }
    
    .theme-detail-card__meta {
        gap: 1rem;
    }
    
    .theme-detail-card__meta-item {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .theme-detail-card {
        border-radius: 12px;
    }
    
    .theme-detail-card__image {
        aspect-ratio: 4/5;
    }
    
    .theme-detail-card__title {
        font-size: 0.9rem;
    }
    
    .theme-detail-card__info {
        padding: 0.85rem;
    }
    
    .theme-detail-card__description {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .theme-detail-card__meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .theme-detail-card__meta-item {
        font-size: 0.7rem;
    }
    
    .theme-detail-card__meta-item svg {
        width: 14px;
        height: 14px;
    }
}

/* ===== THEME GENERATION PAGE ===== */
.theme-gen-container {
    min-height: calc(100vh - 80px);

    padding: 2rem 0 4rem;
    background: var(--bg-primary);
}

.theme-gen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(179, 0, 255, 0.1);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

.back-btn:hover {
    color: var(--accent-purple);
    background: rgba(179, 0, 255, 0.1);
    transform: translateX(-2px);
}

.user-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(42, 42, 63, 0.4);
    border: 1px solid rgba(179, 0, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    padding: 0.25rem 0;
}

.status-item svg {
    width: 16px;
    height: 16px;
    color: var(--accent-purple);
    flex-shrink: 0;
}

.status-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.status-label {
    display: none;
    /* Hide label for compact design */
}

.status-divider {
    width: 1px;
    height: 20px;
    background: rgba(179, 0, 255, 0.2);
    border-radius: 1px;
    position: relative;
    z-index: 1;
}

.plan-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.plan-badge.free {
    background: rgba(138, 138, 159, 0.2);
    color: var(--text-secondary);
    border: 1px solid rgba(138, 138, 159, 0.3);
}

.plan-badge.pro {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    color: white;
    border: 1px solid var(--accent-purple);
    box-shadow: 0 2px 8px rgba(179, 0, 255, 0.3);
}

.alert-warning {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid var(--warning);
}

.alert-warning svg {
    flex-shrink: 0;
    color: var(--warning);
    margin-top: 0.2rem;
}

.alert-warning strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.alert-warning p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.alert-warning a {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* Two Column Layout */
.theme-gen-layout {
    display: grid;
    grid-template-columns: 25% 75%;
    gap: 2rem;
}

/* Left Column - Theme Preview */
.theme-preview-col {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.preview-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(179, 0, 255, 0.05), rgba(255, 0, 68, 0.05));
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.preview-card:hover {
    border-color: var(--accent-purple);
}

.preview-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.preview-placeholder {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(179, 0, 255, 0.15), rgba(255, 0, 68, 0.15));
    position: relative;
    overflow: hidden;
}

.preview-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(179, 0, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.preview-placeholder svg {
    color: var(--accent-purple);
    opacity: 0.7;
    z-index: 1;
    position: relative;
}

.preview-info {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.preview-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.preview-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.preview-stats {
    display: flex;
    gap: 2rem;
    padding: 1.25rem;
    background: rgba(42, 42, 63, 0.3);
    border-radius: 16px;
    margin-top: 1rem;
    border: 1px solid rgba(179, 0, 255, 0.1);
}

.preview-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.preview-stats svg {
    color: var(--accent-purple);
    opacity: 0.8;
}

/* Right Column - Generation Area */
.generation-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.step.active .step-num {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: 0 0 0 4px rgba(179, 0, 255, 0.15);
}

.step.completed .step-num {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.step span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.step.active span {
    color: var(--text-primary);
    font-weight: 600;
}

.step.completed span {
    color: var(--success);
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin-bottom: 1.5rem;
}

.step.completed+.step-line {
    background: var(--success);
}

/* Generation Panel */
.gen-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
}

/* Upload Zone */
.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(42, 42, 63, 0.3);
    text-align: center;
}

.upload-zone:hover {
    border-color: var(--accent-purple);
    background: rgba(179, 0, 255, 0.05);
}

.upload-zone svg {
    color: var(--accent-purple);
    opacity: 0.7;
    margin-bottom: 1.5rem;
}

.upload-zone h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.upload-zone p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.upload-zone span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Preview Zone */
.preview-zone {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    color: var(--accent-red);
    background: rgba(255, 0, 68, 0.1);
}

.preview-img-wrapper {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
    margin-bottom: 0.5rem;
}

.preview-img-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
    object-fit: contain;
}

.btn-generate {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-generate:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Panel */
.result-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.result-header p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.result-img-wrapper {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-primary);
}

.result-img-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 600px;
    display: block;
    object-fit: contain;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-download,
.btn-new,
.btn-gallery {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-download {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    color: white;
}

.btn-download:hover {
    opacity: 0.9;
}

.btn-new,
.btn-gallery {
    background: rgba(42, 42, 63, 0.5);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-new:hover,
.btn-gallery:hover {
    background: rgba(179, 0, 255, 0.1);
    border-color: var(--accent-purple);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-content {
    text-align: center;
    padding: 2rem;
}

.loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(179, 0, 255, 0.2);
    border-top-color: var(--accent-purple);
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

.loading-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.loading-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loading-bar {
    width: 300px;
    height: 6px;
    background: rgba(42, 42, 63, 0.5);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-red));
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

/* ===== FEEDBACK SYSTEM ===== */

/* Satisfaction Buttons */
.satisfaction-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-yes,
.btn-no {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-yes {
    background: rgba(0, 255, 136, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.btn-yes:hover {
    background: var(--success);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
}

.btn-no {
    background: rgba(179, 0, 255, 0.1);
    color: var(--accent-purple);
    border-color: var(--accent-purple);
}

.btn-no:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    color: white;
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(179, 0, 255, 0.3);
}

/* Feedback Panel */
.feedback-panel {
    padding: 1rem 0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-panel h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.feedback-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Feedback Options */
.feedback-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feedback-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem;
    background: rgba(42, 42, 63, 0.3);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.feedback-option:hover {
    border-color: var(--accent-purple);
    background: rgba(179, 0, 255, 0.1);
}

.feedback-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    margin-top: 1px;
}

.feedback-option input[type="checkbox"]:checked~.checkbox-custom {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    border-color: var(--accent-purple);
}

.feedback-option input[type="checkbox"]:checked~.checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.option-text strong {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
}

.option-text small {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.3;
}

/* Custom Feedback Textarea */
.custom-feedback-wrapper {
    margin-bottom: 1rem;
}

.custom-feedback-wrapper label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.custom-feedback-wrapper textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    background: rgba(42, 42, 63, 0.3);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.custom-feedback-wrapper textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    background: rgba(179, 0, 255, 0.05);
}

.custom-feedback-wrapper textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

/* Feedback Actions */
.feedback-actions {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.btn-submit-feedback,
.btn-cancel-feedback {
    flex: 1;
    padding: 0.75rem 0.875rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.btn-submit-feedback {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    color: white;
}

.btn-submit-feedback:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(179, 0, 255, 0.3);
}

.btn-cancel-feedback {
    background: rgba(42, 42, 63, 0.5);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-cancel-feedback:hover {
    background: rgba(255, 0, 68, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Feedback Note */
.feedback-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--success);
    margin: 0;
}

.feedback-note svg {
    color: var(--success);
    width: 14px;
    height: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    /* Tablet: 4 cards per row */
    .themes-showcase-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
    
    .ai-theme-card__title-text {
        font-size: 0.8rem;
    }

    .theme-gen-layout {
        grid-template-columns: 30% 70%;
        gap: 1.5rem;
    }

    .preview-card img,
    .preview-placeholder {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .theme-gen-container {
        padding: 1.5rem 0 3rem;
    }

    .theme-gen-header {
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding: 0.5rem 0;
    }

    .back-btn {
        font-size: 0.85rem;
        padding: 0.35rem 0.6rem;
    }

    .user-status {
        margin-left: auto;
        padding: 0.4rem 0.75rem;
        gap: 0.6rem;
    }

    .status-item {
        gap: 0.4rem;
    }

    .status-item svg {
        width: 14px;
        height: 14px;
    }

    .status-value {
        font-size: 0.85rem;
    }

    .status-divider {
        height: 16px;
    }

    .plan-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    .theme-gen-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .theme-preview-col {
        position: static;
    }

    .preview-card img,
    .preview-placeholder {
        height: 280px;
    }

    .progress-steps {
        gap: 0.5rem;
    }

    .step-num {
        width: 36px;
        height: 36px;
    }

    .step span {
        font-size: 0.75rem;
    }

    .step-line {
        width: 40px;
    }

    .gen-panel {
        padding: 1.5rem;
    }

    .upload-zone {
        padding: 2.5rem 1.5rem;
    }

    .preview-img-wrapper img,
    .result-img-wrapper img {
        max-height: 400px;
    }

    .themes-showcase-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .ai-theme-card__title-text {
        font-size: 0.8rem;
    }
    
    .ai-theme-card__meta-inline {
        gap: 0.6rem;
        margin-top: 0.35rem;
    }
    
    .ai-theme-card__meta-inline-item {
        font-size: 0.65rem;
    }
    
    .ai-theme-card__meta-inline-item svg {
        width: 11px;
        height: 11px;
    }
    
    .ai-theme-card__overlay .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .filter-tabs {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        margin: 1.5rem 0 1rem;
    }

    .filter-tab {
        text-align: center;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-tab svg {
        width: 16px;
        height: 16px;
        margin-right: 6px;
        flex-shrink: 0;
    }

    .category-filters {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.4rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }

    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .themes-grid {
        grid-template-columns: 1fr;
    }

    /* Feedback System - Mobile */
    .satisfaction-buttons {
        flex-direction: column;
        gap: 0.6rem;
    }

    .btn-yes,
    .btn-no {
        padding: 0.7rem 0.875rem;
        font-size: 0.88rem;
    }

    .btn-yes svg,
    .btn-no svg {
        width: 18px;
        height: 18px;
    }

    .feedback-panel {
        padding: 0.75rem 0;
    }

    .feedback-panel h4 {
        font-size: 1rem;
    }

    .feedback-hint {
        font-size: 0.8rem;
        margin-bottom: 0.875rem;
    }

    .feedback-options {
        gap: 0.45rem;
        margin-bottom: 0.875rem;
    }

    .feedback-option {
        padding: 0.65rem;
    }

    .option-text {
        gap: 0.1rem;
    }

    .option-text strong {
        font-size: 0.85rem;
    }

    .option-text small {
        font-size: 0.75rem;
    }

    .checkbox-custom {
        width: 16px;
        height: 16px;
    }

    .custom-feedback-wrapper {
        margin-bottom: 0.875rem;
    }

    .custom-feedback-wrapper label {
        font-size: 0.82rem;
        margin-bottom: 0.35rem;
    }

    .custom-feedback-wrapper textarea {
        min-height: 70px;
        padding: 0.65rem;
        font-size: 0.85rem;
    }

    .feedback-actions {
        gap: 0.5rem;
        margin-bottom: 0.65rem;
    }

    .btn-submit-feedback,
    .btn-cancel-feedback {
        padding: 0.7rem;
        font-size: 0.88rem;
    }

    .btn-submit-feedback svg,
    .btn-cancel-feedback svg {
        width: 18px;
        height: 18px;
    }

    .feedback-note {
        padding: 0.55rem;
        font-size: 0.76rem;
    }
}

@media (max-width: 480px) {
    /* Mobile: 2 cards per row */
    .themes-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
    
    .ai-theme-card {
        border-radius: 8px;
    }
    
    .ai-theme-card__title-text {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .ai-theme-card__title-overlay {
        padding: 1.5rem 0.5rem 0.5rem;
    }
    
    .ai-theme-card__meta-inline {
        gap: 0.5rem;
        margin-top: 0.3rem;
    }
    
    .ai-theme-card__meta-inline-item {
        font-size: 0.6rem;
    }
    
    .ai-theme-card__meta-inline-item svg {
        width: 10px;
        height: 10px;
    }
    
    .ai-theme-card__overlay .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .ai-theme-card__icon {
        font-size: 1.5rem;
    }

    .theme-gen-container {
        padding: 0.75rem 0 2rem;
    }

    .theme-gen-header {
        padding: 0.4rem 0;
        margin-bottom: 0.75rem;
        gap: 0.5rem;
    }

    .back-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

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

    .user-status {
        padding: 0.35rem 0.6rem;
        gap: 0.5rem;
    }

    .status-item {
        gap: 0.35rem;
        padding: 0;
    }

    .status-item svg {
        width: 13px;
        height: 13px;
    }

    .status-value {
        font-size: 0.8rem;
    }

    .status-divider {
        height: 14px;
    }

    .plan-badge {
        font-size: 0.6rem;
        padding: 0.25rem 0.5rem;
        letter-spacing: 0.3px;
    }

    .filter-tabs {
        gap: 0.3rem;
        margin: 1rem 0 0.8rem;
    }

    .filter-tab {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .filter-tab svg {
        width: 14px;
        height: 14px;
        margin-right: 4px;
        flex-shrink: 0;
    }

    .category-filters {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.3rem;
        margin-bottom: 1.5rem;
        padding: 0 0.3rem;
    }

    .category-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

    .plan-badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

    .preview-card img,
    .preview-placeholder {
        height: 240px;
    }

    .preview-info {
        padding: 1rem;
    }

    .preview-info h2 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .preview-stats {
        flex-direction: row;
        gap: 0.75rem;
        justify-content: space-around;
        padding: 0.75rem;
        margin-top: 0.75rem;
    }

    .step-num {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .step span {
        font-size: 0.7rem;
    }

    .step-line {
        width: 30px;
    }

    .gen-panel {
        padding: 1.25rem;
    }

    .upload-zone {
        padding: 2rem 1rem;
    }

    .upload-zone svg {
        width: 48px;
        height: 48px;
    }

    .upload-zone h3 {
        font-size: 1rem;
    }

    .upload-zone p {
        font-size: 0.88rem;
    }

    .upload-zone span {
        font-size: 0.8rem;
    }

    .preview-img-wrapper img,
    .result-img-wrapper img {
        max-height: 300px;
    }

    .result-header h3 {
        font-size: 1.3rem;
    }

    .result-header p {
        font-size: 0.88rem;
    }

    .btn-download,
    .btn-new,
    .btn-gallery {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    .loading-content h3 {
        font-size: 1.3rem;
    }

    .loading-content p {
        font-size: 0.9rem;
    }

    .loading-bar {
        width: 100%;
        max-width: 250px;
    }

    /* Feedback System - Extra Small Mobile */
    .satisfaction-buttons {
        gap: 0.5rem;
    }

    .btn-yes,
    .btn-no {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }

    .feedback-panel h4 {
        font-size: 0.95rem;
    }

    .feedback-hint {
        font-size: 0.78rem;
    }

    .feedback-options {
        gap: 0.4rem;
    }

    .feedback-option {
        padding: 0.6rem;
    }

    .option-text strong {
        font-size: 0.82rem;
    }

    .option-text small {
        font-size: 0.72rem;
    }

    .checkbox-custom {
        width: 15px;
        height: 15px;
    }

    .custom-feedback-wrapper textarea {
        min-height: 65px;
        padding: 0.6rem;
        font-size: 0.82rem;
    }

    .btn-submit-feedback,
    .btn-cancel-feedback {
        padding: 0.65rem;
        font-size: 0.85rem;
    }

    .feedback-note {
        padding: 0.5rem;
        font-size: 0.74rem;
    }
}

/* ===== PHOTO EXAMPLES GUIDE ===== */
.photo-examples {
    margin: 0 auto 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 640px;
    width: 100%;
}

.photo-examples--inline {
    margin: 0 0 1rem;
    max-width: 100%;
}

.photo-examples__section {
    border-radius: 8px;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
}

.photo-examples__section--good {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.photo-examples__section--bad {
    background: rgba(255, 87, 34, 0.05);
    border: 1px solid rgba(255, 87, 34, 0.2);
}

.photo-examples__title {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.photo-examples__title--good {
    color: var(--success);
}

.photo-examples__title--bad {
    color: #ff5722;
}

.photo-examples__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.photo-examples__thumb {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    aspect-ratio: 1;
    max-width: 130px;
    margin: 0 auto;
}

.photo-examples__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-examples__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.photo-examples__tags--icon .photo-examples__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.photo-examples__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.photo-examples__separator {
    color: rgba(255, 255, 255, 0.25);
    line-height: 1;
}

@media (max-width: 768px) {
    .photo-examples {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .photo-examples__title {
        font-size: 0.8rem;
    }

    .photo-examples__tags {
        font-size: 0.68rem;
    }

    .photo-examples__thumb {
        max-width: 100px;
    }
}