/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.screen.active {
    display: block;
}

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

/* Typography */
h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

h2 {
    color: #34495e;
    font-size: 1.8em;
    margin-bottom: 15px;
}

h3 {
    color: #555;
    font-size: 1.3em;
    margin-bottom: 10px;
}

/* Welcome Screen */
.intro-text {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 30px;
    color: #555;
}

.info-box {
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-box h3 {
    color: #3498db;
    margin-bottom: 15px;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box ul li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
}

.info-box ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2em;
}

.controls-overview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.controls-overview h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.controls-overview ol {
    padding-left: 20px;
}

.controls-overview ol li {
    margin: 10px 0;
    font-size: 1.05em;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 15px 40px;
    font-size: 1.1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: #2980b9;
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    box-shadow: 0 4px 6px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    background: #7f8c8d;
    box-shadow: 0 6px 12px rgba(149, 165, 166, 0.4);
    transform: translateY(-2px);
}

.btn-primary:disabled,
.btn-secondary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

button {
    display: block;
    margin: 20px auto;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #ecf0f1;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
    color: #555;
    font-size: 1.05em;
}

/* Question Container */
#question-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.control-area {
    color: #3498db;
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.question-text {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Help Toggle Button */
.help-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f4f8;
    border: 2px solid #3498db;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95em;
    color: #3498db;
    font-weight: 600;
    align-self: flex-start;
}

.help-toggle:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.help-toggle svg {
    flex-shrink: 0;
}

.help-toggle.active {
    background: #3498db;
    color: white;
}

/* Help Text */
.help-text {
    background: #e8f4f8;
    border-left: 4px solid #3498db;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 25px;
    line-height: 1.7;
    color: #2c3e50;
    font-size: 1.05em;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.help-text.visible {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.option:hover {
    background: #e8f4f8;
    border-color: #3498db;
    transform: translateX(5px);
}

.option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #3498db;
}

.option label {
    cursor: pointer;
    font-size: 1.05em;
    color: #333;
    flex: 1;
}

.option:has(input:checked) {
    background: #e8f4f8;
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 20px;
}

.navigation-buttons button {
    flex: 1;
    max-width: 200px;
    margin: 0;
}

/* Results Screen */
.score-container {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.score-circle {
    display: inline-block;
    padding: 40px;
}

.score-number {
    font-size: 4em;
    font-weight: bold;
    margin-bottom: 10px;
}

.score-label {
    font-size: 1.8em;
    font-weight: 600;
    margin-top: 10px;
}

.ready { color: #27ae60; }
.nearly-ready { color: #f39c12; }
.work-needed { color: #e67e22; }
.not-ready { color: #e74c3c; }

.score-description {
    font-size: 1.1em;
    color: #555;
    margin-top: 20px;
    line-height: 1.8;
}

/* Control Scores */
.control-scores {
    margin: 40px 0;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.control-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.control-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.control-card.good {
    border-color: #27ae60;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9f4 100%);
}

.control-card.warning {
    border-color: #f39c12;
    background: linear-gradient(135deg, #ffffff 0%, #fef9f0 100%);
}

.control-card.critical {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #ffffff 0%, #fef0f0 100%);
}

.control-card h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #2c3e50;
}

.control-score {
    font-size: 2.5em;
    font-weight: bold;
    margin: 15px 0;
    color: #3498db;
}

.score-bar {
    background: #ecf0f1;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.control-status {
    font-weight: 600;
    text-align: center;
    font-size: 1.05em;
}

.control-card.good .control-status { color: #27ae60; }
.control-card.warning .control-status { color: #f39c12; }
.control-card.critical .control-status { color: #e74c3c; }

/* Recommendations */
.recommendations {
    margin: 40px 0;
}

.recommendation-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 5px solid #3498db;
}

.recommendation-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.recommendation-list {
    list-style: none;
    padding: 0;
}

.recommendation-item {
    background: #f8f9fa;
    margin: 15px 0;
    padding: 20px;
    border-left: 4px solid #95a5a6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.recommendation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recommendation-item.critical {
    border-left-color: #e74c3c;
    background: #fef0f0;
}

.recommendation-item.action {
    border-left-color: #f39c12;
    background: #fef9f0;
}

.recommendation-item.recommended {
    border-left-color: #3498db;
    background: #e8f4f8;
}

.recommendation-item strong {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 1.05em;
}

.no-issues {
    text-align: center;
    font-size: 1.2em;
    color: #27ae60;
    padding: 40px;
    background: #f0f9f4;
    border-radius: 10px;
    border: 2px solid #27ae60;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.action-buttons button {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    #question-container {
        padding: 25px;
    }

    .question-text {
        font-size: 1.2em;
    }

    .control-grid {
        grid-template-columns: 1fr;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .navigation-buttons button {
        max-width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 30px;
        font-size: 1em;
    }

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

    .score-label {
        font-size: 1.4em;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6em;
    }

    .intro-text {
        font-size: 1em;
    }

    .info-box,
    .controls-overview {
        padding: 20px;
    }

    #question-container {
        padding: 20px;
    }

    .option {
        padding: 15px;
    }

    .recommendation-section {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .navigation-buttons,
    .action-buttons {
        display: none;
    }

    .screen {
        display: block !important;
    }

    #welcome-screen,
    #assessment-screen {
        display: none !important;
    }

    .control-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
