/* Text Analysis Quiz - Stylesheet */

* {
    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;
    color: #333;
}

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

/* Screens */
.screen {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Welcome Screen */
.welcome-content {
    text-align: center;
}

.welcome-content h1 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

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

.info-box {
    background: #f5f7fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin: 30px 0;
    border-radius: 8px;
    text-align: left;
}

.info-box h2 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
}

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

.info-box li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #555;
}

.info-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.input-group {
    margin: 20px 0;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px 5px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

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

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
}

.btn-danger:hover {
    background: #ff5252;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quiz Screen */
.quiz-header {
    margin-bottom: 30px;
}

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

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

.question-counter {
    text-align: right;
    color: #999;
    font-size: 0.9em;
}

.quiz-content {
    flex: 1;
    margin: 20px 0;
}

.passage-box {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
}

.passage-label {
    font-size: 0.9em;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.passage-text {
    font-size: 1.1em;
    color: #333;
    line-height: 1.6;
    font-style: italic;
}

.question-box {
    margin-bottom: 25px;
}

.question-box h2 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.answers-grid {
    display: grid;
    gap: 12px;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.answer-option:hover {
    border-color: #667eea;
    background: #f5f7fa;
}

.answer-option input[type="radio"],
.answer-option input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 2px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

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

.answer-option input:checked {
    accent-color: #667eea;
}

.answer-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.answer-option.correct {
    border-color: #4caf50;
    background: #e8f5e9;
}

.answer-option.incorrect {
    border-color: #ff6b6b;
    background: #ffebee;
}

.feedback-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.feedback-box.error {
    background: #ffebee;
    border-color: #ff6b6b;
}

.feedback-box p {
    color: #333;
    margin: 0;
}

.quiz-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.quiz-navigation {
    text-align: center;
    margin-top: 20px;
}

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

.results-content h1 {
    font-size: 2.2em;
    color: #667eea;
    margin-bottom: 30px;
}

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

.result-stat {
    background: #f5f7fa;
    padding: 25px 15px;
    border-radius: 8px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
}

.skill-breakdown {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: left;
}

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

.skill-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.skill-name {
    font-weight: 500;
    color: #333;
}

.skill-stats {
    color: #666;
    font-size: 0.9em;
}

.results-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Loading Screen */
.loading-content {
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #666;
    font-size: 1.1em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .screen {
        padding: 20px;
        min-height: auto;
    }

    .welcome-content h1 {
        font-size: 1.8em;
    }

    .question-box h2 {
        font-size: 1.1em;
    }

    .results-summary {
        grid-template-columns: 1fr;
    }

    .quiz-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .answer-option {
        flex-direction: column;
    }

    .answer-option input[type="radio"],
    .answer-option input[type="checkbox"] {
        margin-bottom: 8px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
