* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #fafafa; color: #1a1a1a; line-height: 1.6; overflow: hidden; height: 100vh; }
.app { min-height: 100vh; height: 100vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.page { display: none; min-height: 100vh; padding: 20px; }
.page.active { display: block; }
.container { max-width: 480px; margin: 0 auto; }

/* Home Page - Clean Professional Gradient */
.home { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; text-align: center; }
.home-content { padding: 60px 0 40px; }
.home h1 { font-size: 40px; font-weight: 700; color: white; margin-bottom: 8px; letter-spacing: -0.5px; }
.home .subtitle { font-size: 15px; color: rgba(255,255,255,0.85); font-weight: 500; margin-bottom: 48px; text-transform: uppercase; letter-spacing: 2px; }
.hero-icon { font-size: 68px; margin-bottom: 48px; }
.home .description { color: rgba(255,255,255,0.9); font-size: 15px; margin-bottom: 40px; line-height: 1.7; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 16px 32px; font-size: 16px; font-weight: 600; color: #1a1a1a; background: white; border: none; border-radius: 14px; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); width: 100%; box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 15px 35px rgba(0,0,0,0.2); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: white; color: #667eea; font-size: 18px; }
.btn-outline { background: transparent; border: 2px solid #667eea; color: #667eea; }
.btn-outline:hover { background: #667eea; color: white; }
.btn-secondary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }

.header { text-align: center; padding-top: 60px; margin-bottom: 32px; }
.header h1 { font-size: 30px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; letter-spacing: -0.5px; }
.header .sub { font-size: 15px; color: #64748b; }

/* Preset Cards - Clean Professional */
.preset-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 16px; margin-bottom: 24px; }
.preset-card { background: white; border: 2px solid #e2e8f0; border-radius: 18px; padding: 22px; text-align: left; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.preset-card:hover { transform: translateY(-3px); border-color: #667eea; box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15); }
.preset-card.selected { border-color: #667eea; background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.08) 100%); box-shadow: 0 10px 25px rgba(102,126,234,0.2); }
.preset-card .icon { font-size: 32px; margin-bottom: 10px; }
.preset-card .name { font-size: 18px; font-weight: 700; color: #1a1a1a; margin-bottom: 6px; }
.preset-card .desc { font-size: 14px; color: #64748b; line-height: 1.6; }

/* Upload Section */
.upload-section { margin-bottom: 32px; }
.upload-label { font-size: 14px; color: #64748b; margin-bottom: 12px; text-align: center; font-weight: 600; }
.upload-box { border: 2px dashed #cbd5e1; border-radius: 16px; background: #f8fafc; padding: 32px 16px; text-align: center; cursor: pointer; transition: all 0.3s; }
.upload-box:hover { border-color: #667eea; background: #f1f5f9; }
.upload-box.has-image { border-color: #10b981; background: #ecfdf5; }
.upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-text { color: #475569; font-size: 14px; margin-bottom: 8px; font-weight: 500; }
.upload-hint { color: #94a3b8; font-size: 12px; }
#photo-upload { display: none; }
.preview-image { max-width: 100%; max-height: 220px; border-radius: 12px; margin-top: 12px; display: none; }

.button-group { display: flex; gap: 12px; }
.button-group .btn { flex: 1; }

/* Generating Page */
.generating { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; text-align: center; }
.generating-content { padding-top: 40px; }
.spinner { width: 76px; height: 76px; border: 4px solid rgba(255,255,255,0.25); border-top-color: white; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 32px; }
@keyframes spin { to { transform: rotate(360deg); } }
.generating h1 { font-size: 26px; font-weight: 700; color: white; margin-bottom: 8px; }
.generating .sub { font-size: 15px; color: rgba(255,255,255,0.9); margin-bottom: 40px; }
.progress-bar { width: 100%; height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden; margin-bottom: 24px; }
.progress-fill { height: 100%; background: white; border-radius: 4px; transition: width 0.1s; width: 0%; }
.status-text { font-size: 14px; color: rgba(255,255,255,0.85); }

/* Result Page */
.section { margin-bottom: 28px; }
.section-label { font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 12px; text-align: center; }
.image-container { border-radius: 18px; overflow: hidden; margin-bottom: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.12); background: white; }
.image-container img { width: 100%; display: block; }
.result .button-group { margin-top: 32px; margin-bottom: 40px; }
.result .btn-secondary { width: 100%; margin-bottom: 24px; }

/* Brand Footer */
.brand-footer { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #e2e8f0; }
.brand-text { font-size: 12px; color: #94a3b8; letter-spacing: 1px; }

/* Mobile Optimization */
@media (max-width: 480px) {
    .home h1 { font-size: 34px; }
    .header h1 { font-size: 26px; }
    .preset-card { padding: 18px; }
}
