/* ===========================
   Global Styles & Reset
   =========================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #4a5568;
    background: #f7fafc;
    min-height: 100vh;
    padding: 40px 20px;
}

body.results-mode header,
body.results-mode .why-section,
body.results-mode .instructions {
    display: none;
}

/* ===========================
   Container
   =========================== */

.container {
    max-width: 1050px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 50px;
    border: 3px solid #6366f1;
}

/* ===========================
   Header Section
   =========================== */

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

h1 {
    font-size: 2.75rem;
    color: #6366f1;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.35rem;
    color: #64748b;
    margin-bottom: 20px;
    font-weight: 400;
}

.description {
    font-size: 1.05rem;
    color: #475569;
    margin-bottom: 25px;
    line-height: 1.7;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.info-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.tag {
    background: white;
    color: #6366f1;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1.5px solid #e0e7ff;
    font-weight: 500;
}

/* ===========================
   Why Section
   =========================== */

.why-section {
    background: #f8fafc;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.why-section h2 {
    color: #334155;
    font-size: 1.6rem;
    margin-bottom: 18px;
    font-weight: 700;
}

.why-section p {
    margin-bottom: 14px;
    color: #475569;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* ===========================
   Instructions
   =========================== */

.instructions {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-bottom: 30px;
}

.instructions h3 {
    color: #856404;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.instructions p {
    color: #856404;
    margin: 0;
}

/* ===========================
   Questions Container
   =========================== */

.questions-container {
    margin-bottom: 30px;
}

.question {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.question:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.question h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

/* ===========================
   Radio Options
   =========================== */

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.options label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.options label:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.options input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #667eea;
}

.options label span {
    flex: 1;
    color: #495057;
    font-size: 1rem;
}

.options input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

.options label:has(input[type="radio"]:checked) {
    background: #f0f3ff;
    border-color: #667eea;
}

/* ===========================
   Submit Button
   =========================== */

.submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.submit-btn:active {
    transform: translateY(0);
}

/* ===========================
   Results Section
   =========================== */

.results {
    animation: fadeIn 0.5s ease-in;
}

.results.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results h2 {
    text-align: center;
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 30px;
}

/* ===========================
   Score Display
   =========================== */

.score-display {
    text-align: center;
}

.score-number {
    font-size: 5rem;
    font-weight: 700;
    color: #667eea;
    display: inline-block;
}

.score-max {
    font-size: 2.5rem;
    color: #6c757d;
    margin-left: 10px;
}

.dependency-level {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* Dependency Level Colors */
.level-low {
    color: #155724;
}

.level-moderate {
    color: #856404;
}

.level-high {
    color: #721c24;
}

/* ===========================
   Explanation Section
   =========================== */

.what-it-means {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.what-it-means h3 {
    color: #495057;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.explanation {
    color: #6c757d;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.summary-paragraph {
    color: #374151;
    font-size: 1.02rem;
    line-height: 1.7;
    margin: 10px 0 20px;
}

.summary-title {
    color: #374151;
    font-size: 1.2rem;
    margin-top: 6px;
    margin-bottom: 8px;
}

.action-items {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
}

.action-items h3 {
    color: #374151;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.action-items ul {
    padding-left: 22px;
}

.action-items li {
    color: #4b5563;
    margin-bottom: 8px;
    line-height: 1.6;
}

.factor-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.factor-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e9ecef;
}

.factor-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    flex: 0 0 auto;
}

.factor-low {
    background: #22c55e;
}

.factor-moderate {
    background: #f59e0b;
}

.factor-high {
    background: #ef4444;
}

.factor-title {
    font-weight: 700;
    color: #374151;
}

.factor-signal {
    color: #6b7280;
    font-size: 0.95rem;
}

.factor-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    margin-bottom: 6px;
    white-space: nowrap;
}

.factor-explanation {
    color: #4b5563;
    font-size: 0.98rem;
    line-height: 1.6;
}

.reassurance {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #0066cc;
    color: #004085;
    line-height: 1.6;
}

/* ===========================
   Why Matters Section
   =========================== */

.why-matters {
    background: white;
    padding: 25px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 30px;
}

.why-matters h3 {
    color: #495057;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.why-matters p {
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.7;
}

.why-matters ul {
    margin: 15px 0;
    padding-left: 25px;
}

.why-matters li {
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ===========================
   Retake Button
   =========================== */

.retake-btn {
    width: 100%;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retake-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .info-tags {
        flex-direction: column;
        align-items: center;
    }

    .question {
        padding: 20px;
    }

    .score-number {
        font-size: 4rem;
    }

    .score-max {
        font-size: 2rem;
    }

    .dependency-level {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .question h4 {
        font-size: 1rem;
    }

    .options label {
        padding: 10px;
    }

    .options label span {
        font-size: 0.95rem;
    }

    .score-number {
        font-size: 3rem;
    }
}
