:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #e5e7eb;
    --warning-bg: #fff3cd;
    --warning-text: #856404;
    --spinner-color: #2563eb;
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    max-width: 640px;
    padding: 40px 24px;
}

.screen { display: none; }
.screen.active { display: block; }

/* Inicio */
.logo {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}
h1 { font-size: 28px; margin-bottom: 16px; }
.subtitle { color: var(--text-secondary); margin-bottom: 24px; font-size: 16px; }
.attribution { font-size: 14px; color: var(--text-secondary); margin-bottom: 32px; }

/* Botones */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    cursor: pointer;
    margin-left: 12px;
}
.btn-secondary:hover { background: #f9fafb; }

/* Barra de progreso */
.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 24px;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Preguntas */
.axis-label {
    font-size: 12px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
h2 { font-size: 22px; margin-bottom: 24px; }

.options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.option {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-size: 15px;
}
.option:hover { border-color: var(--primary); }
.option.selected { border-color: var(--primary); background: #eff6ff; }
.option.multi { display: flex; align-items: center; gap: 10px; }
.option.multi .checkmark {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.option.multi.selected .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}
.option.multi.selected .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.question-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.question-counter { font-size: 14px; color: var(--text-secondary); }

/* Revisión */
#review-list { margin-bottom: 24px; }
.review-item {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.review-item:hover { background: #f9fafb; }
.review-item .q { font-weight: 600; margin-bottom: 4px; font-size: 15px; }
.review-item .a { color: var(--text-secondary); font-size: 14px; }

/* Procesando */
#screen-processing { text-align: center; padding: 60px 0; }
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--spinner-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#screen-processing p { color: var(--text-secondary); }

/* Resultado */
.warning-banner {
    background: var(--warning-bg);
    color: var(--warning-text);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 15px;
}
.result-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.result-card.best { border-color: var(--primary); background: #f8faff; }
.result-card h3 { font-size: 18px; margin-bottom: 8px; }
.result-card .reason { font-size: 15px; line-height: 1.5; }
.result-card .reason strong { display: block; margin-bottom: 4px; }
.result-card .price { margin-top: 10px; font-size: 14px; color: #555; }

.result-actions { margin-top: 24px; }

.app-footer { text-align: center; padding: 20px; font-size: 13px; color: #aaa; margin-top: 40px; }
.app-footer strong { color: #888; }
