:root {
    --centech-red: #E3001B;
    --centech-dark: #1a1a2e;
    --centech-gray: #f5f5f5;
    --centech-border: #e0e0e0;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--centech-gray);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--centech-dark);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.header-logo {
    display: flex;
    align-items: center;
}
.header-logo img { height: 32px; width: auto; display: block; }
.header-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    margin-left: auto;
}

/* Main container */
.container {
    max-width: 700px;
    margin: 3rem auto;
    padding: 0 1rem;
}

/* Card */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}
.card-header {
    background: linear-gradient(135deg, var(--centech-dark), #2d2d5e);
    padding: 2rem;
    color: white;
}
.card-header h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-header p  { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
.card-body { padding: 2rem; }

/* Progress bar */
.progress-wrap { margin-bottom: 2rem; }
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.progress-bar {
    height: 6px;
    background: var(--centech-border);
    border-radius: 99px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--centech-red);
    border-radius: 99px;
    transition: width 0.6s ease;
}

/* Question */
.question-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--centech-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}
.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.answer-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--centech-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.2s;
    outline: none;
}
.answer-input:focus { border-color: var(--centech-red); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: var(--centech-red);
    color: white;
}
.btn-primary:hover:not(:disabled) {
    background: #c0001a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(227,0,27,0.3);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary {
    background: var(--centech-gray);
    color: var(--text-primary);
    border: 1px solid var(--centech-border);
}
.btn-secondary:hover { background: #e8e8e8; }

/* Form */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.form-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--centech-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--centech-red); }

/* Loading */
.loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 1rem 0;
}
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--centech-border);
    border-top-color: var(--centech-red);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Recommendation */
.recommendation {
    line-height: 1.7;
}
.recommendation h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--centech-dark);
    margin: 1.5rem 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--centech-red);
    display: inline-block;
}
.recommendation h2:first-child { margin-top: 0; }
.recommendation h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 0.4rem; color: var(--centech-dark); }
.recommendation p  { margin-bottom: 0.75rem; color: #374151; }
.recommendation ul { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.recommendation li { margin-bottom: 0.4rem; color: #374151; }
.recommendation strong { color: var(--centech-dark); }

/* Success screen */
.success-icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
}

/* Fade transition */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Alert */
.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Actions row */
.actions { display: flex; justify-content: flex-end; margin-top: 1.5rem; }
