/* Clean Minimal Design */

:root {
    --primary: #d97706;
    --primary-dark: #b45309;
    --secondary: #475569;
    --success: #059669;
    --error: #dc2626;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    font-size: 16px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    margin-bottom: 1.5rem;
}

header .container {
    padding: 0 1.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

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

h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* Alert Banner */
.alert-banner {
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.alert-banner.demo {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    color: #92400e;
}

.alert-banner strong {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.alert-banner p {
    margin: 0;
}

/* Auth Section */
.auth-section {
    background: var(--surface);
    border-radius: 0.5rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    min-width: 200px;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
    background: var(--surface);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* Main Section */
.main-section {
    background: var(--surface);
    border-radius: 0.5rem;
    padding: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* Step Structure */
.step {
    margin-bottom: 3rem;
}

.step:last-child {
    margin-bottom: 0;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-header h2 {
    margin: 0;
}

/* Upload Area */
.upload-area {
    margin-bottom: 1.5rem;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--background);
    text-align: center;
}

.upload-label:hover:not([style*="not-allowed"]) {
    border-color: var(--primary);
    background: #fff9ed;
}

.upload-label svg {
    color: var(--primary);
}

.upload-label.file-selected {
    border-color: var(--primary);
    background: #fff9ed;
}

#file-input {
    display: none;
}

.file-name {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Info Toggle */
.info-toggle {
    margin-top: 1.5rem;
}

.info-toggle summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    background: var(--background);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--primary);
    user-select: none;
    transition: background 0.2s ease;
}

.info-toggle summary:hover {
    background: #fff9ed;
}

.info-content-detailed {
    padding: 2rem;
    background: var(--surface);
    border-radius: 0.5rem;
    margin-top: 0.75rem;
}

.info-section {
    margin-bottom: 2rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.info-section p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.info-section li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.info-section li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
    font-weight: bold;
}

.info-note {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #92400e;
    margin-top: 1rem;
}

/* Config Section */
.config-section {
    margin-bottom: 2rem;
}

.config-section:last-child {
    margin-bottom: 0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    display: flex;
    gap: 1rem;
    cursor: pointer;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: var(--primary);
    background: #fff9ed;
}

.radio-option input[type="radio"] {
    margin-top: 0.125rem;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-content strong {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.radio-content span {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.column-name-input {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    background: var(--surface);
}

.column-name-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

.column-name-input:disabled {
    background-color: var(--background);
    opacity: 0.6;
    cursor: not-allowed;
}

/* Advanced Toggle */
.advanced-toggle {
    margin-top: 1.5rem;
}

.advanced-toggle summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    background: var(--background);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--primary);
    user-select: none;
    transition: background 0.2s ease;
}

.advanced-toggle summary:hover {
    background: #fff9ed;
}

.advanced-content {
    padding: 2rem;
    background: var(--surface);
    border-radius: 0.5rem;
    margin-top: 0.75rem;
}

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

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

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

.label-hint {
    font-weight: 400;
    color: var(--text-secondary);
}

.prompt-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
    transition: all 0.2s ease;
    background: var(--surface);
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* Button Section */
.button-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1rem;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--secondary);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.btn-secondary {
    background: var(--success);
    color: white;
}

.btn-secondary:hover {
    background: #047857;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Status Messages */
.status-message {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

.status-message.success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.error-text {
    color: var(--error);
    font-size: 0.9375rem;
    margin-top: 0.75rem;
    font-weight: 500;
}

/* Progress Section */
.progress-section {
    display: none;
    background: var(--surface);
    border-radius: 0.5rem;
    padding: 2.5rem;
    margin-top: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.progress-section.active {
    display: block;
}

.progress-info {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.current-info {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 0.75rem;
    background: var(--background);
    border-radius: 9999px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
    min-width: 5%;
    border-radius: 9999px;
}

.progress-fill.processing {
    background: linear-gradient(90deg, var(--primary) 0%, #fbbf24 50%, var(--primary) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.stats-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stats-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

/* Preview Section */
.preview-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.preview-product-name {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

#preview-container {
    margin-top: 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

#preview-frame {
    display: block;
    border: none;
    width: 100%;
    min-height: 400px;
    background: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    header {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .main-section,
    .auth-section,
    .progress-section {
        padding: 2rem 1.5rem;
    }
    
    .step {
        margin-bottom: 2rem;
    }
    
    .step-header {
        margin-bottom: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input,
    .input-group button {
        width: 100%;
    }
    
    .upload-label {
        padding: 3rem 1.5rem;
    }
    
    .button-section {
        flex-direction: column;
        margin-top: 2rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
    
    .radio-option {
        flex-direction: column;
    }
    
    .radio-content {
        width: 100%;
    }
    
    .column-name-input {
        width: 100%;
    }
    
    .prompt-textarea {
        font-size: 0.875rem;
        min-height: 120px;
    }
    
    .info-content-detailed,
    .advanced-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .step-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
    }
    
    .step-header h2 {
        font-size: 1.125rem;
    }
}
