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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 3px solid #000;
    padding-bottom: 10px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: normal;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: bold;
}

h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

/* Header styles */
header {
    margin-bottom: 30px;
}

.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.test-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.timer {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 5px 10px;
    border: 2px solid #000;
    background-color: #fff;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border: 1px solid #000;
}

.progress-fill {
    height: 100%;
    background-color: #000;
    transition: width 0.3s ease;
}

/* Main content */
main {
    flex: 1;
    margin-bottom: 30px;
}

.welcome-section {
    text-align: center;
}

.test-features {
    list-style: none;
    margin: 30px 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.test-features li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.test-info {
    background-color: #f9f9f9;
    border: 2px solid #000;
    padding: 20px;
    margin: 30px 0;
    text-align: left;
}

.test-info ul {
    list-style-type: disc;
    margin-left: 20px;
}

.test-info li {
    margin-bottom: 5px;
}

.start-section {
    margin-top: 40px;
}

.instruction {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Question styles */
.question-section {
    max-width: 600px;
    margin: 0 auto;
}

.question-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #000;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.difficulty {
    color: #666;
}

.question-text {
    margin-bottom: 30px;
    padding: 20px;
    border: 2px solid #000;
    background-color: #fff;
    font-size: 1.3rem;
    line-height: 1.5;
}

.answer-form {
    margin-bottom: 30px;
}

.answers {
    margin-bottom: 30px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    border: 2px solid #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.answer-option:hover {
    border-color: #000;
    background-color: #f9f9f9;
}

.answer-option input[type="radio"] {
    display: none;
}

.answer-option input[type="radio"]:checked + .option-letter {
    background-color: #000;
    color: #fff;
}

.answer-option input[type="radio"]:checked ~ .option-text {
    font-weight: bold;
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 2px solid #000;
    margin-right: 15px;
    font-weight: bold;
    background-color: #fff;
    transition: all 0.3s ease;
}

.option-text {
    flex: 1;
    font-size: 1.1rem;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #000;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #000;
    color: #fff;
}

.btn-primary {
    background-color: #000;
    color: #fff;
}

.btn-primary:hover {
    background-color: #fff;
    color: #000;
}

.btn-secondary {
    margin-left: 10px;
}

/* Results styles */
.results-section {
    text-align: center;
}

.score-display {
    margin: 40px 0;
    padding: 30px;
    border: 3px solid #000;
    background-color: #f9f9f9;
}

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

.score-number {
    color: #000;
}

.score-label {
    color: #666;
    font-size: 2rem;
}

.score-level {
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-description {
    margin: 30px 0;
    padding: 20px;
    background-color: #f0f0f0;
    border: 1px solid #000;
    font-size: 1.1rem;
    line-height: 1.6;
}

.detailed-results {
    text-align: left;
    margin: 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border: 1px solid #000;
    background-color: #fff;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
}

.category-breakdown {
    margin: 30px 0;
}

.category-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.category-name {
    font-weight: bold;
    text-transform: capitalize;
    min-width: 120px;
}

.category-score {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.category-bar {
    width: 100px;
    height: 10px;
    background-color: #f0f0f0;
    border: 1px solid #000;
}

.category-fill {
    height: 100%;
    background-color: #000;
    transition: width 0.5s ease;
}

.interpretation {
    margin: 40px 0;
    text-align: left;
}

.iq-scale {
    border: 2px solid #000;
    background-color: #fff;
}

.scale-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.scale-item:last-child {
    border-bottom: none;
}

.scale-item.current {
    background-color: #000;
    color: #fff;
    font-weight: bold;
}

.scale-range {
    font-weight: bold;
}

.actions {
    margin: 40px 0;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .test-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .main-score {
        font-size: 3rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .category-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .category-score {
        width: 100%;
    }
    
    .actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-secondary {
        margin-left: 0;
    }
}

/* Print styles */
@media print {
    .btn, .actions {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .timer {
        display: none;
    }
}