:root {
    --primary-color: #000000;
    --primary-hover: #333333;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #ffffff;
    --surface: #f8f9fa;
    --surface-hover: #f1f3f5;
    --text-primary: #111111;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><defs><radialGradient id="starGlow"><stop offset="0%" style="stop-color:%23ffffff;stop-opacity:1" /><stop offset="50%" style="stop-color:%23e8e8f8;stop-opacity:0.8" /><stop offset="100%" style="stop-color:%23c0c0d0;stop-opacity:0" /></radialGradient><filter id="starglow"><feGaussianBlur stdDeviation="1.5" /><feComponentTransfer><feFuncA type="linear" slope="0.9" /></feComponentTransfer></feGaussianBlur></filter></defs><g filter="url(%23starglow)"><path d="M16 4 L20 14 L30 16 L22 23 L24 33 L16 28 L8 33 L10 23 L2 16 L12 14 Z" fill="%23e8e8f8" opacity="1" /><circle cx="16" cy="16" r="14" fill="url(%23starGlow)" opacity="0.5" /></g></svg>') 16 16, auto;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
    background: rgba(245, 245, 250, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(200, 200, 220, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-brand a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-links a:hover {
    background-color: #1a1a2e;
    color: #ffffff;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.profile-link:hover {
    background-color: #f8f9fa;
    color: #6366f1;
}

.container {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 4rem;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.btn-accent:hover {
    background-color: var(--accent-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--surface);
    border-color: var(--text-secondary);
}

.nav-left .btn-outline:hover {
    background-color: #1a1a2e;
    color: #ffffff;
    border-color: #1a1a2e;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-cosmic-metallic {
    background: linear-gradient(90deg, 
        #c0c0d0 0%, 
        #e8e8f8 25%, 
        #ffffff 50%, 
        #e8e8f8 75%, 
        #c0c0d0 100%);
    background-size: 200% 100%;
    color: #1a1a2e !important;
    border: 2px solid rgba(200, 200, 220, 0.6) !important;
    font-weight: 700 !important;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 30px rgba(180, 180, 200, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1);
    animation: cosmic-shimmer 6s ease-in-out infinite;
    transition: all 0.3s ease;
}

.btn-cosmic-metallic:hover {
    box-shadow: 
        0 15px 40px rgba(180, 180, 200, 0.6),
        inset 0 1px 2px rgba(255, 255, 255, 0.9),
        inset 0 -2px 5px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
    animation-duration: 2s;
}

@keyframes cosmic-shimmer {
    0% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
    100% {
        background-position: 0% center;
    }
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.alert-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.landing {
    text-align: center;
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 50%, #dcdce2 100%);
    padding: 1rem 0;
}

.hero {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 2rem;
    padding: 2rem;
    width: 98%;
    max-width: none;
    margin: 0 auto;
    position: relative;
    overflow: visible;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8fc 50%, #f0f0f6 100%);
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 
                inset 0 1px 0 rgba(255, 255, 255, 0.8),
                inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(200, 200, 210, 0.4);
    align-items: center;
}

.hero-left {
    text-align: left;
    position: relative;
    z-index: 2;
    padding-right: 1rem;
}

.hero-right {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-examples {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    align-items: stretch;
}

.example-showcase {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
}

.example-showcase:hover {
    transform: none;
}

.example-image {
    width: 100%;
    height: auto;
    max-height: 900px;
    object-fit: contain;
    display: block;
    border-radius: 16px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220, 220, 230, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: cosmic-drift 20s linear infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(220, 220, 240, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

@keyframes cosmic-drift {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(50px, 50px);
    }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1a1a2e;
    letter-spacing: -0.03em;
    line-height: 1.15;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #4a4a5e;
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.hero-left .btn-cosmic-metallic {
    display: inline-block;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 4rem 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.feature {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8fb 100%);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid rgba(200, 200, 210, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.feature:hover {
    border-color: rgba(180, 180, 200, 0.5);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.feature p {
    color: #6a6a7e;
    font-size: 0.9375rem;
}

.benefits-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8fb 100%);
    padding: 4rem;
    border-radius: 28px;
    margin-top: 4rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(200, 200, 210, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06),
                inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.benefits-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #1a1a2e;
}

.benefits-list {
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
    list-style: none;
}

.benefits-list li {
    margin-bottom: 1rem;
    color: #5a5a70;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1rem;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #8080b0;
    font-weight: bold;
}

.home {
    text-align: center;
}

.welcome-section {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 2rem;
    padding: 5rem 2rem;
    width: 98%;
    max-width: none;
    margin: 2rem auto;
    position: relative;
    overflow: visible;
    background: linear-gradient(135deg, #ffffff 0%, #f8f8fc 50%, #f0f0f6 100%);
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 
                inset 0 1px 0 rgba(255, 255, 255, 0.8),
                inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(200, 200, 210, 0.4);
    align-items: center;
}

.welcome-left {
    text-align: left;
    position: relative;
    z-index: 2;
    padding-right: 1rem;
}

.welcome-right {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-examples {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.welcome-examples-images {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    width: 100%;
    align-items: center;
}

.welcome-examples-images .example-showcase {
    flex: 1;
    min-width: 0;
}

.search-prompt {
    width: 100%;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: white;
    border: 1px solid #e0e0e8;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.search-prompt input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9375rem;
    color: #1a1a2e;
    font-family: inherit;
}

.search-prompt input::placeholder {
    color: #9a9aab;
}

.search-prompt button {
    background: #f0f0f6;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.search-prompt button:hover {
    background: #e8e8f0;
}

.welcome-section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    color: #1a1a2e;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.welcome-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6 !important;
}

.recent-section {
    margin-top: 3rem;
    text-align: left;
}

.recent-section h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.generations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.generation-card {
    background-color: var(--background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.generation-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.generation-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface);
    color: var(--text-muted);
}

.card-info {
    padding: 1rem 1.25rem;
}

.card-filename {
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0.25rem 0;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 500;
}

.status-completed {
    background-color: #ecfdf5;
    color: #065f46;
}

.status-processing {
    background-color: #fffbeb;
    color: #92400e;
}

.status-failed {
    background-color: #fef2f2;
    color: #991b1b;
}

.status-pending {
    background-color: var(--surface);
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.generate-page {
    max-width: 800px;
    margin: 0 auto;
}

.generate-page h1 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.page-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.0625rem;
}

.generate-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background-color: var(--background);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.form-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent-color);
    background-color: rgba(99, 102, 241, 0.02);
}

.upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.upload-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-preview img {
    max-width: 300px;
    max-height: 300px;
    border-radius: var(--radius);
    object-fit: contain;
    box-shadow: var(--shadow);
}

.vibe-options,
.ratio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vibe-option,
.ratio-option {
    cursor: pointer;
}

.vibe-option input,
.ratio-option input {
    display: none;
}

.vibe-label,
.ratio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.vibe-label:hover,
.ratio-label:hover {
    border-color: var(--text-secondary);
}

.vibe-option input:checked + .vibe-label,
.ratio-option input:checked + .ratio-label {
    border-color: var(--accent-color);
    background-color: rgba(99, 102, 241, 0.05);
    color: var(--accent-color);
}

.ratio-preview {
    display: inline-block;
    background-color: var(--text-muted);
    border-radius: 2px;
}

.ratio-3-4 {
    width: 12px;
    height: 16px;
}

.ratio-1-1 {
    width: 14px;
    height: 14px;
}

.scene-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.scene-option {
    cursor: pointer;
}

.scene-option input {
    display: none;
}

.scene-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
    text-align: center;
}

.scene-label:hover {
    border-color: var(--text-secondary);
}

.scene-option input:checked + .scene-label {
    border-color: var(--accent-color);
    background-color: rgba(99, 102, 241, 0.05);
}

.scene-preview {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: block;
}

.scene-name {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.scene-studio_white { background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%); }
.scene-studio_black { background: linear-gradient(135deg, #2a2a2f 0%, #1a1a1f 100%); }
.scene-gradient_warm { background: linear-gradient(135deg, #ffdcc8 0%, #ffb4c8 100%); }
.scene-gradient_cool { background: linear-gradient(135deg, #b4c8ff 0%, #c8e6ff 100%); }
.scene-nature_wood { background: linear-gradient(135deg, #c8a078 0%, #a08060 100%); }
.scene-marble { background: linear-gradient(135deg, #f5f5fa 0%, #e8e8f0 100%); }
.scene-sunset { background: linear-gradient(135deg, #ffa064 0%, #ffc896 100%); }
.scene-minimal_gray { background: linear-gradient(135deg, #e6e6eb 0%, #d4d4d9 100%); }

.form-actions {
    text-align: center;
    padding-top: 1rem;
}

/* ========================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ======================================== */

@media (max-width: 1024px) {
    .container {
        padding: 2rem;
    }
    
    .hero, .welcome-section {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem;
        text-align: center;
    }
    
    .hero-left, .welcome-left {
        padding-right: 0;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .hero h1, .welcome-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        height: auto;
    }
    
    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-user {
        width: 100%;
        justify-content: center;
        border-top: 1px solid rgba(0,0,0,0.05);
        padding-top: 1rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .benefits-section {
        padding: 2rem 1.5rem;
    }
    
    .product-shot-layout {
        flex-direction: column;
    }
    
    .product-shot-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .generations-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .generations-table {
        overflow-x: auto;
    }
    
    .hero h1, .welcome-section h1 {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-right {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero h1, .welcome-section h1 {
        font-size: 1.75rem;
    }
    
    .btn-large {
        width: 100%;
        padding: 1rem;
    }
    
    .welcome-examples-images {
        flex-direction: column;
    }
    
    .search-prompt {
        flex-direction: column;
    }
    
    .search-prompt button {
        width: 100%;
    }
    
    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-shot-page {
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #f5f5f7 0%, #e8e8ed 50%, #dcdce2 100%);
    margin: -2rem;
    padding: 0;
}

.product-shot-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    min-height: calc(100vh - 80px);
    gap: 0;
}

@media (max-width: 900px) {
    .product-shot-layout {
        grid-template-columns: 1fr;
    }
}

/* Left Panel */
.product-shot-left {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8fc 50%, #f0f0f6 100%);
    border-right: 1px solid rgba(200, 200, 210, 0.4);
    padding: 0.8rem 1rem;
    display: flex;
    flex-direction: column;
    width: 340px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    gap: 0.35rem;
}

.product-shot-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0.35rem;
    width: 100%;
}

.product-shot-right {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8fc 50%, #f0f0f6 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
}

.info-content {
    text-align: center;
    max-width: 600px;
    margin-top: 0;
}

.info-content h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #111111;
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.upload-zone:hover {
    border-color: rgba(200, 200, 210, 0.6);
    background-color: rgba(248, 248, 252, 0.8);
}

.upload-zone.dragover {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.1);
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.upload-icon {
    color: #9ca3af;
}

.upload-text {
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    max-width: 200px;
}

.btn-select {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid rgba(200, 200, 210, 0.4);
    border-radius: 8px;
    color: #111111;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-select:hover {
    background-color: rgba(245, 245, 250, 0.8);
    border-color: rgba(200, 200, 210, 0.6);
}

.upload-preview {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.upload-preview img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
}

.btn-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-remove:hover {
    background-color: rgba(239, 68, 68, 0.8);
}

/* Prompt Area */
.prompt-area {
    background-color: rgba(245, 245, 250, 0.7);
    border: 1px solid rgba(200, 200, 210, 0.4);
    border-radius: 12px;
    padding: 1rem;
}

.prompt-area textarea {
    width: 100%;
    min-height: 80px;
    background: transparent;
    border: none;
    color: #111111;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: none;
    font-family: inherit;
}

.prompt-area textarea::placeholder {
    color: #9ca3af;
}

.prompt-area textarea:focus {
    outline: none;
}

/* Presets Section */
.presets-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.presets-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.presets-header .chevron {
    margin-left: auto;
}

.presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.preset-card {
    cursor: pointer;
    position: relative;
}

.preset-card input {
    display: none;
}

.preset-thumbnail {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s;
    background-size: cover;
    background-position: center;
    position: relative;
}

.preset-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    border-radius: 0 0 8px 8px;
}

.preset-card input:checked + .preset-thumbnail {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.preset-card:hover .preset-thumbnail {
    border-color: rgba(200, 200, 210, 0.6);
}

.preset-name {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    font-size: 0.7rem;
    color: white;
    text-align: center;
    z-index: 1;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Preset Thumbnails with background images */
.preset-all_white { background-image: url('/static/presets/all_white.jpg'); background-color: #ffffff; }
.preset-zero_gravity { background-image: url('/static/presets/zero_gravity.jpg'); background-color: #000000; }
.preset-environment { background-image: url('/static/presets/environment.jpg'); background-color: #2d5a27; }
.preset-dramatic_backlight { background-image: url('/static/presets/dramatic_backlight.jpg'); background-color: #1a1a1a; }
.preset-beach { background-image: url('/static/presets/beach.jpg'); background-color: #d2b48c; }
.preset-store_shelf { background-image: url('/static/presets/store_shelf.jpg'); background-color: #deb887; }
.preset-interaction { background-image: url('/static/presets/interaction.jpg'); background-color: #f5f5f5; }
.preset-three_stack { background-image: url('/static/presets/three_stack.jpg'); background-color: #e0e0e0; }
.preset-styled_at_home { background-image: url('/static/presets/styled_at_home.jpg'); background-color: #f0e0d0; }

/* Form Bottom */
.form-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(200, 200, 210, 0.4);
    margin-top: auto;
}

.ratio-selector {
    display: flex;
    gap: 0.5rem;
}

.ratio-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background-color: transparent;
    border: 1px solid rgba(200, 200, 210, 0.4);
    border-radius: 6px;
    color: #9ca3af;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.ratio-btn:hover {
    border-color: rgba(200, 200, 210, 0.6);
    color: #6b7280;
}

.ratio-btn.active {
    background-color: rgba(245, 245, 250, 0.8);
    border-color: #6366f1;
    color: #111111;
}

.btn-generate {
    padding: 0.625rem 1.5rem;
    background: linear-gradient(90deg, 
        #c0c0d0 0%, 
        #e8e8f8 25%, 
        #ffffff 50%, 
        #e8e8f8 75%, 
        #c0c0d0 100%);
    background-size: 200% 100%;
    color: #1a1a2e;
    border: 2px solid rgba(200, 200, 220, 0.6);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(180, 180, 200, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.btn-generate:hover {
    box-shadow: 0 15px 40px rgba(180, 180, 200, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* Right Panel */
.product-shot-right {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8fc 50%, #f0f0f6 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
}

.info-content {
    text-align: center;
    max-width: 600px;
    margin-top: 0;
}

.info-content h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #111111;
    margin-bottom: 0.75rem;
}

.info-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 2.5rem;
}

.example-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.example-before,
.example-after {
    width: 200px;
    height: 260px;
    border-radius: 12px;
    overflow: hidden;
    background-color: rgba(245, 245, 250, 0.8);
}

.example-before img,
.example-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.example-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8ed 0%, #dcdce2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-result {
    background: linear-gradient(135deg, #ffa064 0%, #ff7043 100%);
}

.example-arrow {
    color: #d1d5db;
}

.example-caption {
    font-size: 0.875rem;
    color: #9ca3af;
}

@media (max-width: 900px) {
    .product-shot-right {
        display: none;
    }
    
    .product-shot-left {
        border-right: none;
    }
}

.view-generation {
    max-width: 1100px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 2rem;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}

/* ========================================
   MOBILE OPTIMIZATION
   ======================================== */

/* Extra Small Screens (280px - 480px) */
@media (max-width: 480px) {
    * {
        cursor: auto;
    }

    .navbar {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .nav-left {
        gap: 0.5rem;
        width: 100%;
    }

    .nav-brand a {
        font-size: 1rem;
    }

    .nav-user {
        gap: 0.5rem;
        width: 100%;
        margin-top: 0.5rem;
    }

    .btn-small {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        flex: 1;
    }

    .container {
        padding: 1rem;
    }

    body {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Landing Page */
    .landing {
        display: flex;
        flex-direction: column;
    }

    .hero {
        flex-direction: column !important;
        gap: 1.5rem;
        padding: 1.5rem 0 !important;
    }

    .hero-left {
        width: 100% !important;
    }

    .hero-left h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .btn-primary, .btn-large {
        width: 100%;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem;
    }

    .hero-right {
        width: 100% !important;
    }

    .welcome-examples-images {
        flex-direction: column !important;
        gap: 1rem;
    }

    .example-showcase {
        width: 100%;
        height: 300px;
    }

    .example-showcase img {
        max-height: 300px;
    }

    .search-prompt {
        gap: 0.5rem;
    }

    .search-prompt input {
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    /* Features Section */
    .features {
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .feature {
        padding: 1rem;
    }

    .feature-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .feature h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .feature p {
        font-size: 0.8rem;
    }

    /* Benefits Section */
    .benefits-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .benefits-list {
        gap: 0.75rem;
    }

    .benefits-list li {
        font-size: 0.875rem;
        padding-left: 1.5rem;
    }

    /* Product Shot Page */
    .product-shot-layout {
        grid-template-columns: 1fr;
    }

    .product-shot-left {
        border-right: none;
        border-bottom: 1px solid rgba(200, 200, 210, 0.4);
        padding: 1rem;
    }

    .product-shot-right {
        padding: 1.5rem;
        display: flex;
    }

    .info-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .info-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .example-preview {
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .example-before,
    .example-after {
        width: 150px;
        height: 190px;
    }

    .upload-zone {
        min-height: 150px;
    }

    .upload-placeholder {
        gap: 0.75rem;
        padding: 1rem;
    }

    .upload-icon {
        font-size: 2rem;
    }

    .upload-text {
        font-size: 0.75rem;
        max-width: 160px;
    }

    .btn-select {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .prompt-area {
        padding: 0.75rem;
    }

    .prompt-area textarea {
        min-height: 60px;
        font-size: 0.8rem;
    }

    .presets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .preset-thumbnail {
        aspect-ratio: 4/3;
    }

    .preset-name {
        font-size: 0.65rem;
        margin-top: 0.25rem;
    }

    .ratio-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }

    .btn-generate {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }

    /* History Page */
    .generation-details {
        gap: 1rem;
    }

    .generation-info {
        padding: 1rem;
    }

    .generation-info h3 {
        font-size: 0.9rem;
    }

    .generation-info p {
        font-size: 0.8rem;
    }

    .image-container {
        margin-bottom: 1rem;
    }

    .image-container img {
        max-height: 400px;
    }

    /* Pagination */
    .pagination {
        gap: 0.5rem;
    }

    .pagination a,
    .pagination span {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Small Screens (480px - 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1.5rem;
    }

    .container {
        padding: 1.5rem 1.5rem;
        max-width: 100%;
    }

    .hero {
        flex-direction: column !important;
        gap: 2rem;
        padding: 2rem 0 !important;
    }

    .hero-left {
        width: 100% !important;
    }

    .hero-left h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .btn-large {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
    }

    .hero-right {
        width: 100% !important;
    }

    .welcome-examples-images {
        flex-direction: column !important;
    }

    .example-showcase {
        width: 100%;
        height: 350px;
    }

    .features {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }

    .feature {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .feature h3 {
        font-size: 1.1rem;
    }

    .feature p {
        font-size: 0.9rem;
    }

    .benefits-section h2 {
        font-size: 1.75rem;
    }

    .benefits-list li {
        font-size: 0.95rem;
    }

    /* Product Shot */
    .product-shot-layout {
        grid-template-columns: 350px 1fr;
    }

    .product-shot-left {
        padding: 1.25rem;
    }

    .upload-zone {
        min-height: 180px;
    }

    .info-content h1 {
        font-size: 1.75rem;
    }

    .info-subtitle {
        font-size: 0.95rem;
    }

    .example-before,
    .example-after {
        width: 180px;
        height: 235px;
    }

    /* History */
    .generation-details {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    /* Form */
    .upload-text {
        font-size: 0.85rem;
    }

    .prompt-area textarea {
        min-height: 70px;
        font-size: 0.85rem;
    }

    .btn-generate {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* Medium Screens (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 2rem 2.5rem;
    }

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

    .hero-left {
        width: 100%;
    }

    .hero-left h1 {
        font-size: 2.25rem;
    }

    .hero-right {
        width: 100%;
    }

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

    .product-shot-layout {
        grid-template-columns: 380px 1fr;
    }

    .generation-details {
        grid-template-columns: 1fr 320px;
    }
}

/* Tablets and Small Laptops (1024px - 1200px) */
@media (max-width: 1200px) {
    .container {
        padding: 2.5rem 3rem;
    }

    .product-shot-layout {
        grid-template-columns: 400px 1fr;
    }

    .navbar {
        padding: 1rem 2rem;
    }
}

/* Large Screens (1400px+) */
@media (min-width: 1400px) {
    .container {
        padding: 3rem 4rem;
    }

    .hero {
        grid-template-columns: 1fr 1.3fr;
        gap: 3rem;
    }

    .hero-left {
        width: 100%;
    }

    .hero-right {
        width: 100%;
    }
}

.page-header h1 {
    margin-top: 0.75rem;
    font-size: 1.75rem;
    font-weight: 500;
}

.generation-details {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

@media (max-width: 900px) {
    .generation-details {
        grid-template-columns: 1fr;
    }
}

.image-container {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    max-width: 100%;
    max-height: 600px;
    border-radius: var(--radius);
    object-fit: contain;
    box-shadow: var(--shadow);
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: var(--text-muted);
    font-size: 1rem;
}

.details-panel {
    background-color: var(--background);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.detail-group {
    margin-bottom: 1.75rem;
}

.detail-group:last-child {
    margin-bottom: 0;
}

.detail-group h3 {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.detail-group p {
    font-size: 1rem;
    color: var(--text-primary);
}

.benefits-display {
    padding-left: 1.25rem;
    list-style: disc;
}

.benefits-display li {
    margin-bottom: 0.375rem;
    color: var(--text-secondary);
}

.error-group {
    background-color: #fef2f2;
    padding: 1rem;
    border-radius: var(--radius);
}

.error-group p {
    color: #991b1b;
    font-size: 0.9375rem;
}

.download-section {
    margin-top: 2rem;
    text-align: center;
}

.download-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.history-page h1 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.generations-table {
    background-color: var(--background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.generations-table table {
    width: 100%;
    border-collapse: collapse;
}

.generations-table th,
.generations-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.generations-table th {
    background-color: var(--surface);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.generations-table tr:last-child td {
    border-bottom: none;
}

.generations-table tbody tr:hover {
    background-color: var(--surface);
}

.preview-cell {
    width: 80px;
}

.table-preview {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.table-preview-placeholder {
    width: 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--surface);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn {
    margin-right: 0.5rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.error-page {
    text-align: center;
    padding: 6rem 2rem;
}

.error-page h1 {
    font-size: 8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 300;
}

.error-page h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.error-page p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.error-page .btn {
    margin-top: 2rem;
}

.footer {
    padding: 2rem 3rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .nav-links {
        order: 3;
        gap: 1.5rem;
    }
    
    .container {
        padding: 2rem 1.5rem;
    }
    
    .hero {
        padding: 3rem 1rem 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .generations-table {
        overflow-x: auto;
    }
    
    .generations-table table {
        min-width: 600px;
    }
    
    .form-section {
        padding: 1.5rem;
    }
}
