/* IQ Test Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.screen {
    display: none;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

/* Welcome Screen */
.welcome-content h1 {
    font-size: 2.5em;
    color: #333;
    text-align: center;
    margin-bottom: 10px;
}

.welcome-content h2 {
    font-size: 1.5em;
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
}

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

.info-box, .scoring-guide {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-box.important-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    padding: 25px 30px;
}

.important-list {
    list-style: none;
    counter-reset: item;
    padding-left: 0;
    margin-top: 15px;
}

.important-list > li {
    counter-increment: item;
    margin-bottom: 25px;
    padding-left: 0;
    position: relative;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.important-list > li .list-content {
    flex: 1;
    text-align: left;
}

.important-list > li .list-content strong {
    font-weight: 600;
    color: #333;
}

.important-list > li::before {
    content: counter(item);
    background: #667eea;
    color: white;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.category-list {
    list-style: none;
    padding-left: 15px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.category-list li {
    padding: 10px 15px;
    border-left: 3px solid #667eea;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 5px 5px 0;
}

.test-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-practice {
    background: #28a745;
    color: white;
    padding: 20px 15px;
    font-size: 1em;
}

.btn-practice:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-download {
    background: #17a2b8;
    color: white;
}

.btn-download:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.4);
}

.btn-icon {
    font-size: 1.2em;
    margin-right: 8px;
    display: inline-block;
}

.btn-text {
    display: inline-block;
}

.btn-text strong {
    display: block;
    margin-bottom: 3px;
    font-size: 1em;
}

.btn-text small {
    display: block;
    font-size: 0.75em;
    font-weight: normal;
    opacity: 0.9;
}

.info-box h3, .scoring-guide h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

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

.info-box li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-box li:last-child {
    border-bottom: none;
}

.scoring-guide table {
    width: 100%;
    border-collapse: collapse;
}

.scoring-guide th, .scoring-guide td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.scoring-guide th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.scoring-guide tr:last-child td {
    border-bottom: none;
}

.scoring-guide tr:hover {
    background: #f0f0f0;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #667eea;
    color: white;
    padding: 20px 15px;
    font-size: 1em;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    background: #ccc;
    box-shadow: none;
}

/* Test Screen */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.test-header h1 {
    font-size: 1.8em;
    color: #333;
}

.test-info {
    display: flex;
    gap: 30px;
    font-size: 1.1em;
}

.question-counter, .timer {
    color: #666;
    font-weight: 600;
}

.timer {
    color: #667eea;
}

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

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
    color: #667eea;
}

/* Encouragement Message */
.encouragement-msg {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #856404;
    text-align: center;
    display: none;
    animation: slideDown 0.5s ease;
}

.encouragement-msg.show {
    display: block;
}

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

/* Question Container */
.question-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.question-box {
    width: 100%;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.question-category {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.6;
    min-height: 80px;
}

.options-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.option {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.option:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: #f0f4ff;
    color: #667eea;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    flex-shrink: 0;
}

.option.selected .option-letter {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.option-text {
    display: inline;
    text-align: left;
    font-size: 0.95em;
    line-height: 1.4;
}

.question-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.question-actions .btn {
    flex: 1;
    margin-top: 0;
}

/* Results Screen */
.results-content {
    text-align: center;
}

.results-content h1 {
    font-size: 2.5em;
    color: #28a745;
    margin-bottom: 10px;
}

.results-content h2 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 30px;
}

.iq-score-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
}

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

.iq-category {
    font-size: 1.8em;
    font-weight: 600;
}

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

.result-stat {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

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

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
}

.interpretation {
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
    line-height: 1.6;
    color: #333;
}

.category-breakdown {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.category-breakdown h3 {
    margin-bottom: 15px;
    color: #333;
}

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

.category-stat:last-child {
    border-bottom: none;
}

.category-name {
    font-weight: 600;
    color: #333;
}

.category-score {
    color: #667eea;
    font-weight: 600;
}

.results-actions {
    display: flex;
    gap: 15px;
}

.results-actions .btn {
    flex: 1;
}

/* Error Screen */
.error-content {
    text-align: center;
    padding: 40px 20px;
}

.error-content h2 {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 2em;
}

.error-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.2em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .screen {
        padding: 20px;
    }
    
    .test-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .test-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .question-text {
        font-size: 1.1em;
    }
    
    .question-actions {
        flex-direction: column;
    }
    
    .iq-number {
        font-size: 3em;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .test-buttons {
        grid-template-columns: 1fr;
    }
    
    .important-list > li {
        padding-left: 35px;
    }
	.letter-box {
    border: 2px solid #aaa;
    border-radius: 6px;
}

.letter-box:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.4);
}
}
