/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --secondary-hover: #475569;
    --bg: #ffffff;
    --surface: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 48px;
    padding-top: 24px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    font-weight: 400;
}

.subtitle em {
    font-style: normal;
    color: var(--primary);
    font-weight: 500;
}

/* Quiz container */
#quiz-container {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.question-counter {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Questions */
.question-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.question-subtitle {
    font-size: 0.9375rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-style: italic;
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.option-card {
    display: block;
    padding: 16px 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.option-card:hover {
    border-color: var(--primary);
    background: var(--bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.option-card.selected {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-text {
    display: block;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.5;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

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

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

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

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.btn-large {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 14px 28px;
    font-size: 1.0625rem;
    text-decoration: none;
    margin-top: 16px;
}

/* Results */
#results-container h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}

.results-intro {
    font-size: 1.0625rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.7;
}

/* Platform cards */
.platform-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.platform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--success);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-tagline {
    font-size: 1.0625rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Platform details */
.platform-details {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--surface);
    border-radius: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-row .label {
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
}

.detail-row .value {
    color: var(--text-muted);
    text-align: right;
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    font-weight: 600;
    color: var(--text);
    width: 40%;
}

.comparison-table td {
    color: var(--text-muted);
}

.comparison-table tr:last-child th,
.comparison-table tr:last-child td {
    border-bottom: none;
}

.referral-note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* Not a fit section */
.not-a-fit {
    text-align: center;
    margin: 48px 0 32px;
    padding: 32px;
    background: var(--surface);
    border-radius: var(--radius);
}

.not-a-fit p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Disclosure footer */
.disclosure {
    margin-top: 48px;
    padding: 24px;
    background: var(--surface);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.disclosure h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.disclosure p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 12px;
}

.disclosure p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 640px) {
    body {
        padding: 12px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    #quiz-container {
        padding: 24px 20px;
    }

    .question-title {
        font-size: 1.25rem;
    }

    .platform-card {
        padding: 20px;
    }

    .platform-header h3 {
        font-size: 1.25rem;
    }

    .detail-row {
        flex-direction: column;
        gap: 4px;
    }

    .detail-row .value {
        text-align: left;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 10px 12px;
    }

    .comparison-table {
        font-size: 0.875rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
