/* ================================================
   GREEN THEME - AI Image Generator Pro
   Based on Reference Design
   ================================================ */

/* ========== CSS VARIABLES ========== */
:root {
    /* Background colors */
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-input: #1e293b;
    --bg-header: rgba(15, 23, 42, 0.9);

    /* Accent colors - GREEN */
    --accent-primary: #22c55e;
    --accent-secondary: #10b981;
    --accent-light: #4ade80;
    --accent-gradient: linear-gradient(to right, #22c55e, #10b981);

    /* Text colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Border colors */
    --border-card: rgba(255, 255, 255, 0.08);
    --border-input: #334155;
    --border-focus: #4ade80;

    /* Shadows */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-focus: 0 0 0 2px rgba(74, 222, 128, 0.2);
}

/* ========== BASE STYLES ========== */
body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ========== GLASS CARD ========== */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 1rem;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 1rem;
    box-shadow: var(--shadow-card);
}

/* ========== INPUT DARK ========== */
.input-dark {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.input-dark:focus {
    border-color: var(--border-focus);
    outline: none;
    box-shadow: var(--shadow-focus);
}

.input-dark::placeholder {
    color: var(--text-muted);
}

/* Apply input-dark to all inputs in dark theme */
body input,
body select,
body textarea {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

body input:focus,
body select:focus,
body textarea:focus {
    border-color: var(--border-focus);
    outline: none;
    box-shadow: var(--shadow-focus);
}

body input::placeholder,
body textarea::placeholder {
    color: var(--text-muted);
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: var(--accent-gradient);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

/* ========== HEADER ========== */
.header-nav {
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* ========== FORM SECTIONS ========== */
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.form-section {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
}

/* ========== UPLOAD AREA ========== */
.upload-area {
    border: 2px dashed var(--border-input);
    background: rgba(30, 41, 59, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--accent-primary);
    background: rgba(34, 197, 94, 0.05);
}

.upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(34, 197, 94, 0.1);
}

/* ========== TABS - MINIMAL NEON DESIGN ========== */
.tab-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0.5rem;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 1rem;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 2 rows for 8 tabs */
.tab-container.eight-tabs {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

/* Legacy support for 4 tabs */
.tab-container.four-tabs {
    grid-template-columns: repeat(4, 1fr);
}

.tab-btn {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: rgba(30, 41, 59, 0.6);
    color: rgba(148, 163, 184, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    position: relative;
    /* Đảm bảo kích thước đều nhau */
    min-height: 70px;
    aspect-ratio: 1 / 1;
}

.tab-btn i {
    font-size: 1.25rem;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.tab-btn span {
    font-size: 0.65rem;
    letter-spacing: 0.02em;
}

.tab-btn:hover {
    color: rgba(226, 232, 240, 0.95);
    background: rgba(51, 65, 85, 0.7);
    border-color: rgba(34, 197, 94, 0.3);
}

.tab-btn:hover i {
    opacity: 1;
}

/* ACTIVE STATE - Neon green border glow */
.tab-btn.active {
    background: rgba(34, 197, 94, 0.1);
    color: #ffffff;
    border-color: #22c55e;
    box-shadow:
        0 0 15px rgba(34, 197, 94, 0.4),
        0 0 30px rgba(34, 197, 94, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-btn.active i {
    color: #22c55e;
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.6));
    transform: scale(1.05);
}

.tab-btn.active span {
    font-weight: 600;
}

.tab-btn.active:hover {
    box-shadow:
        0 0 20px rgba(34, 197, 94, 0.5),
        0 0 40px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ========== RESULT AREA ========== */
.result-placeholder {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-muted);
}

.result-placeholder i {
    font-size: 4rem;
    opacity: 0.2;
    margin-bottom: 1rem;
    display: block;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .result-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.result-item {
    position: relative;
    aspect-ratio: 2/3;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.result-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== HISTORY GRID ========== */
.history-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 640px) {
    .history-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .history-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .history-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.25rem;
    }

    /* Hide extra items to maintain exactly 2 rows (10 images) on desktop */
    .history-grid .history-item:nth-child(n+11) {
        display: none;
    }
}

.history-item {
    position: relative;
    aspect-ratio: 3/4;
    background: var(--bg-input);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-input);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

.history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Better for portrait faces */
    opacity: 0.9;
    transition: all 0.3s ease;
}

.history-item:hover img {
    opacity: 1;
}

/* ========== HISTORY GRID COMPACT (Mobile - 4 cột × 3 hàng = 12 ảnh vuông) ========== */
.history-grid-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .history-grid-compact {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.4rem;
    }
}

.history-grid-compact .history-item {
    aspect-ratio: 1 / 1;
    border-radius: 0.5rem;
    overflow: hidden;
}

.history-grid-compact .history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

/* ========== SPINNER ========== */
.spinner {
    border: 4px solid var(--border-input);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ========== PREVIEW ========== */
.preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-input);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .delete-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    cursor: pointer;
    transition: background 0.2s;
}

.preview-item .delete-btn:hover {
    background: #dc2626;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border-input);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== USER MENU ========== */
.user-menu-dropdown {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.user-menu-item {
    display: block;
    padding: 0.625rem 1rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* ========== NOTIFICATION BADGE ========== */
.notification-badge {
    background: var(--accent-primary);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 999px;
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
}

/* ========== FLASH MESSAGE ========== */
.flash-message {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--shadow-card);
}

.flash-message.success {
    border-left: 4px solid var(--accent-primary);
}

.flash-message.error {
    border-left: 4px solid #ef4444;
}

/* ========== PROGRESS BAR ========== */
.progress-container {
    background: var(--bg-input);
    border-radius: 999px;
    overflow: hidden;
    height: 0.5rem;
}

.progress-bar {
    background: var(--accent-gradient);
    height: 100%;
    transition: width 0.3s ease;
}

/* ========== HOT ICON ========== */
.hot-icon {
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 999px;
    animation: blinker 1.5s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.6;
    }
}

/* ========== LIGHTBOX ========== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-nav:hover {
    background: rgba(34, 197, 94, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav-prev {
    left: 1rem;
}

.lightbox-nav-next {
    right: 1rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: white;
}

.lightbox-toolbar {
    position: absolute;
    bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-input);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

/* ========== MODALS ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 28rem;
    width: 100%;
    box-shadow: var(--shadow-card);
}

/* ========== DARK MODE OVERRIDES FOR TAILWIND ========== */

/* Override bg-white */
.bg-white {
    background: var(--bg-card) !important;
}

/* Override text colors */
.text-slate-900,
.text-slate-800,
.text-slate-700 {
    color: var(--text-primary) !important;
}

.text-slate-600,
.text-slate-500 {
    color: var(--text-secondary) !important;
}

.text-slate-400 {
    color: var(--text-muted) !important;
}

/* Override borders */
.border-slate-200,
.border-slate-300,
.border-slate-100 {
    border-color: var(--border-card) !important;
}

/* Override backgrounds */
.bg-slate-50,
.bg-slate-100 {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Override indigo buttons to green */
.bg-indigo-600 {
    background: var(--accent-gradient) !important;
}

.hover\:bg-indigo-700:hover {
    filter: brightness(1.1) !important;
}

.text-indigo-600,
.text-indigo-400 {
    color: var(--accent-primary) !important;
}

.hover\:text-indigo-800:hover,
.hover\:text-indigo-300:hover {
    color: var(--accent-light) !important;
}

/* Message boxes */
.bg-red-100 {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

.bg-green-100 {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
}

.bg-yellow-100 {
    background: rgba(234, 179, 8, 0.1) !important;
    border-color: rgba(234, 179, 8, 0.3) !important;
}

/* Prose content */
.prose {
    color: var(--text-secondary) !important;
}

.prose h2,
.prose h3 {
    color: var(--text-primary) !important;
    border-color: var(--border-card) !important;
}

.prose p,
.prose li {
    color: var(--text-secondary) !important;
}

.prose strong {
    color: var(--text-primary) !important;
}

.prose a {
    color: var(--accent-primary) !important;
}

/* ========== PROSE DARK (for content from database) ========== */
.prose-dark {
    color: var(--text-secondary);
    max-width: 100%;
}

.prose-dark h2 {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 600;
    margin-top: 2em;
    margin-bottom: 0.5em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.25em;
    color: var(--text-primary);
}

.prose-dark h3 {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.4em;
    color: var(--text-primary);
}

.prose-dark p {
    margin-bottom: 1.25em;
    line-height: 1.7;
    color: var(--text-secondary);
}

.prose-dark ul,
.prose-dark ol {
    margin-left: 1.5em;
    margin-bottom: 1.25em;
    list-style-type: disc;
}

.prose-dark ol {
    list-style-type: decimal;
}

.prose-dark li {
    margin-bottom: 0.5em;
    line-height: 1.7;
    color: var(--text-secondary);
}

.prose-dark a {
    color: var(--accent-primary);
    text-decoration: underline;
    font-weight: 500;
}

.prose-dark a:hover {
    color: var(--accent-light);
}

.prose-dark strong,
.prose-dark b {
    font-weight: 600;
    color: var(--text-primary);
}

.prose-dark .highlight-box {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.prose-dark .highlight-box strong {
    color: var(--accent-primary);
}

/* ========== OUTER TABS (from old design) ========== */
.outer-tab {
    position: relative;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    background: none;
    color: var(--text-muted);
}

.outer-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.outer-tab:not(.active):hover {
    color: var(--text-secondary);
    border-bottom-color: var(--border-input);
}

/* ========== RESPONSIVE 2 COLUMN LAYOUT ========== */
@media (max-width: 1023px) {
    .lg\:col-span-4 {
        order: 2;
    }

    .lg\:col-span-8 {
        order: 1;
    }
}

/* Specialized Poster Slots */
.poster-slot {
    aspect-ratio: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.poster-slot:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #4ade80;
    transform: translateY(-2px);
}

.slot-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.slot-preview i {
    font-size: 1.5rem;
}

.slot-preview span {
    font-size: 0.65rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.slot-image-filled {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

.remove-slot-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 10;
}

.poster-slot:hover .remove-slot-btn {
    display: flex;
}

/* ========== FAMILY PHOTO SLOTS ========== */
.family-slot {
    aspect-ratio: 1;
    background: rgba(30, 41, 59, 0.5);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.family-slot:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #ec4899;
    transform: translateY(-1px);
}

.family-slot.required {
    border-color: rgba(74, 222, 128, 0.3);
}

.family-slot.required:hover {
    border-color: #4ade80;
}

.family-slot.filled {
    border-style: solid;
    border-color: #4ade80;
}

.family-slot:hover .remove-slot-btn {
    display: flex;
}

/* ========== GROUP PHOTO SLOTS ========== */
.group-slot {
    background: rgba(30, 41, 59, 0.5);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem;
    text-align: center;
    position: relative;
    overflow: visible;
}

.group-slot .slot-preview {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0.375rem;
}

.group-slot:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.group-slot.required {
    border-color: rgba(74, 222, 128, 0.3);
}

.group-slot.required:hover {
    border-color: #4ade80;
}

.group-slot.filled {
    border-style: solid;
    border-color: #3b82f6;
}

.group-slot.filled .slot-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.375rem;
}

.group-slot:hover .remove-slot-btn {
    display: flex;
}

.group-slot .gender-toggle {
    width: 100%;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.group-slot .gender-toggle button {
    border: none;
    cursor: pointer;
}

/* 3 tabs in tab-container */
.tab-container.three-tabs {
    grid-template-columns: 1fr 1fr 1fr;
}

.tab-container.four-tabs {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.hot-badge {
    background: #ef4444;
    color: white;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 2px;
    text-transform: uppercase;
    font-weight: 800;
    vertical-align: middle;
}

.new-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 2px;
    text-transform: uppercase;
    font-weight: 800;
    vertical-align: middle;
    animation: pulse-new 2s infinite;
}

@keyframes pulse-new {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* ========== FASHION SLOTS ========== */
.fashion-slot {
    aspect-ratio: 1;
    background: rgba(30, 41, 59, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fashion-slot:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.fashion-slot.main-slot {
    width: 100px;
    height: 100px;
    border-color: rgba(59, 130, 246, 0.4);
    border-width: 2px;
}

.fashion-slot.clothing-slot {
    width: 100%;
    max-width: 140px;
    aspect-ratio: 3/4;
}

.fashion-slot.accessory-slot {
    aspect-ratio: 1;
    border-radius: 0.5rem;
}

.fashion-slot.filled {
    border-style: solid;
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.fashion-slot .remove-slot-btn {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 20;
}

.fashion-slot:hover .remove-slot-btn {
    display: flex;
}

.fashion-slot .slot-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.6;
    pointer-events: none;
}

.fashion-slot.filled .slot-preview {
    display: none;
}

.fashion-slot .slot-image-filled {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* ============================================ */
/* FASHION STUDIO - UPGRADED UI STYLES */
/* ============================================ */

/* Gender Selection Buttons */
.gender-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.gender-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.gender-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.gender-btn.active i {
    color: #60a5fa;
}

/* Style Preset Cards */
.style-preset-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.style-preset-card:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #fff;
    transform: translateY(-2px);
}

.style-preset-card.selected {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    border-color: rgba(59, 130, 246, 0.6);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
}

.style-preset-card i {
    font-size: 16px;
}

.style-preset-card span {
    text-align: center;
    line-height: 1.1;
}

/* Fashion Tab Content */
.fashion-tab-content {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== THEN-NOW PHOTO SLOTS ========== */
.thennow-face-slot {
    background: rgba(30, 41, 59, 0.5);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem;
    text-align: center;
    position: relative;
    overflow: visible;
}

.thennow-face-slot .slot-preview {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0.375rem;
}

.thennow-face-slot:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #f59e0b;
    transform: translateY(-1px);
}

.thennow-face-slot.required {
    border-color: rgba(74, 222, 128, 0.3);
}

.thennow-face-slot.required:hover {
    border-color: #4ade80;
}

.thennow-face-slot.filled {
    border-style: solid;
    border-color: #f59e0b;
}

.thennow-face-slot.filled .slot-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.375rem;
}

.thennow-face-slot:hover .remove-slot-btn {
    display: flex;
}

.thennow-face-slot .gender-toggle {
    width: 100%;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.thennow-face-slot .gender-toggle button {
    border: none;
    cursor: pointer;
}

/* Then-Now Original Photo Slot */
.thennow-original-slot {
    position: relative;
    cursor: pointer;
}

.thennow-original-slot:hover .remove-slot-btn {
    display: flex;
}

.thennow-original-slot.filled .slot-preview {
    background-size: cover;
    background-position: center;
}