* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #1a1a2e; color: #eee; min-height: 100vh; }
.container { max-width: 700px; margin: 0 auto; padding: 40px 20px; }
header { text-align: center; margin-bottom: 40px; }
h1 { font-size: 2.5rem; margin-bottom: 8px; }
h2 { font-size: 1.4rem; margin-bottom: 20px; color: #ccc; }
.subtitle { color: #888; font-size: 1.1rem; }

.step { text-align: center; }
.step.hidden { display: none; }

.brand-buttons, .collection-buttons, .system-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: opacity .2s, transform .1s;
}
.btn:hover { opacity: .85; transform: scale(1.02); }
.btn:active { transform: scale(0.98); }
button:disabled { opacity: .6; cursor: not-allowed; }

.btn-brand { background: #16213e; color: #fff; font-size: 1.1rem; }
.btn-collection { background: #1a1a2e; color: #ccc; border: 1px solid #333; }
.btn-system { background: #0f3460; color: #fff; }
.btn-upload { background: #333; color: #fff; cursor: pointer; }
.btn-primary { background: #6c5ce7; color: #fff; width: 100%; }
.btn-secondary { background: #16213e; color: #ccc; margin-top: 12px; }
.btn-back { background: transparent; color: #666; border: 1px solid #333; margin-top: 20px; font-size: .9rem; padding: 10px 20px; }
.btn-download { background: #00b894; color: #fff; text-decoration: none; margin-top: 16px; display: inline-flex; }

.drop-zone {
    border: 2px dashed #444;
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    transition: border-color .2s, background .2s;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.drop-zone.drag-over { border-color: #6c5ce7; background: rgba(108,92,231,.1); }
.drop-zone-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.drop-icon { font-size: 3rem; }
.drop-text { font-size: 1.1rem; color: #aaa; }
.drop-or { color: #555; font-size: .9rem; }

.preview { max-width: 100%; max-height: 400px; border-radius: 12px; object-fit: contain; }
.hidden { display: none !important; }

.selected-config { margin-bottom: 20px; }
.config-info { background: #16213e; padding: 12px 16px; border-radius: 10px; color: #888; font-size: .95rem; }
.config-info strong { color: #fff; }

.prompt-block { margin: 24px 0; }
.prompt-block label { display: block; margin-bottom: 8px; color: #aaa; }
textarea {
    width: 100%; padding: 12px; border-radius: 10px; border: 1px solid #333;
    background: #16213e; color: #eee; font-size: .9rem; resize: vertical; min-height: 200px;
}
textarea:focus { outline: none; border-color: #6c5ce7; }

.result { margin-top: 32px; text-align: center; }
.result h2 { margin-bottom: 8px; }
.result img { max-width: 100%; border-radius: 12px; border: 1px solid #333; margin-top: 16px; }
.result p { color: #888; margin-top: 8px; }
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.result-actions .btn { margin-top: 0; }

.error { margin-top: 16px; padding: 12px; background: rgba(255,50,50,.15); border-radius: 10px; color: #ff6b6b; }

/* Loading screen */
.loading-spinner {
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    margin: 60px 0;
}
.spinner {
    width: 60px; height: 60px;
    border: 4px solid #333;
    border-top-color: #6c5ce7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-hint { color: #666; font-size: .9rem; margin-top: 8px; }

/* Refine notice */
.refine-notice {
    background: rgba(108,92,231,.15);
    border: 1px solid rgba(108,92,231,.4);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #b8a9ff;
    font-size: .95rem;
}