/* Complete Enhanced Quiz Page Styles */
.quiz-section {
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Welcome Section */
.welcome-content {
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 3px solid #4CAF50;
}

.welcome-content h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.quiz-description {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 15px;
    border-left: 4px solid #4CAF50;
}

.info-icon {
    font-size: 2rem;
}

.info-text h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 5px;
}

.info-text p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.start-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(76, 175, 80, 0.4);
}

/* Name Input Section */
.name-form {
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 3px solid #2196F3;
}

.name-form h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.name-form p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

#user-name {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: border-color 0.3s ease;
}

#user-name:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.2);
}

.submit-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(33, 150, 243, 0.3);
}

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

.privacy-note {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

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

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 10%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.quiz-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #2c3e50;
}

.question-container {
    display: flex;
    justify-content: center;
}

.question-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 3px solid #FF9800;
    width: 100%;
    max-width: 700px;
}

#question-text {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 30px;
    line-height: 1.5;
    text-align: center;
}

/* Enhanced Options with Better Visibility and Contrast */
.options-container {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.option-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #dee2e6;
    padding: 18px 25px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
    color: #2c3e50;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 250, 0.8) 100%);
    z-index: 1;
}

.option-btn > * {
    position: relative;
    z-index: 2;
}

.option-btn:hover {
    border-color: #FF9800;
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    transform: translateX(8px);
    box-shadow: 0 6px 15px rgba(255, 152, 0, 0.2);
    color: #e65100;
}

.option-btn:hover::before {
    background: linear-gradient(135deg, rgba(255, 248, 225, 0.9) 0%, rgba(255, 236, 179, 0.9) 100%);
}

.option-btn.selected {
    border-color: #FF9800;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #ffffff;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
    font-weight: bold;
}

.option-btn.selected::before {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.95) 0%, rgba(245, 124, 0, 0.95) 100%);
}

.option-btn.selected .option-letter {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.option-btn.correct {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #ffffff;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
    font-weight: bold;
}

.option-btn.correct::before {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95) 0%, rgba(69, 160, 73, 0.95) 100%);
}

.option-btn.correct .option-letter {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.option-btn.incorrect {
    border-color: #f44336;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: #ffffff;
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
    font-weight: bold;
}

.option-btn.incorrect::before {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.95) 0%, rgba(211, 47, 47, 0.95) 100%);
}

.option-btn.incorrect .option-letter {
    background: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.option-letter {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid #90caf9;
    transition: all 0.3s ease;
}

.option-btn:hover .option-letter {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border-color: #ffb74d;
}

/* Option text styling */
.option-btn span:last-child {
    color: inherit;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Disabled state for options during answer reveal */
.option-btn:disabled,
.option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Focus states for accessibility */
.option-btn:focus {
    outline: 3px solid #2196F3;
    outline-offset: 2px;
}

/* Enhanced Next Button with Click Protection */
.question-actions {
    text-align: center;
    margin-top: 30px;
}

.next-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    border: none;
    padding: 16px 35px;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(255, 152, 0, 0.3);
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.next-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.next-btn:hover:not(:disabled)::before {
    left: 100%;
}

.next-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 152, 0, 0.4);
}

.next-btn:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
}

.next-btn:disabled {
    background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    opacity: 0.6;
}

.next-btn.processing {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    cursor: wait;
    pointer-events: none;
}

.next-btn.processing::after {
    content: '⏳';
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Results Section */
.results-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 3px solid #9C27B0;
    text-align: center;
}

.results-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.user-result h3 {
    font-size: 1.5rem;
    color: #9C27B0;
    margin-bottom: 30px;
}

.score-display {
    margin: 40px 0;
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 15px 30px rgba(156, 39, 176, 0.3);
}

.score-number {
    color: white;
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
}

.score-total {
    font-size: 1.5rem;
    opacity: 0.8;
}

.score-percentage {
    color: white;
    font-size: 1.2rem;
    margin-top: 5px;
    opacity: 0.9;
}

.performance-message {
    margin: 40px 0;
}

.performance-message h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.performance-message p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.5;
}

.results-breakdown {
    margin: 40px 0;
}

.results-breakdown h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

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

.stat-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid;
}

.stat-item.correct {
    border-left-color: #4CAF50;
}

.stat-item.incorrect {
    border-left-color: #f44336;
}

.stat-item.accuracy {
    border-left-color: #2196F3;
}

.stat-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

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

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.retake-btn, .explore-btn, .share-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.retake-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
}

.explore-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.share-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
}

.retake-btn:hover, .explore-btn:hover, .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.learning-suggestions h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.suggestion-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.suggestion-link {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #2c3e50;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion-link:hover {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-section {
        padding: 20px 15px;
    }
    
    .welcome-content, .name-form, .question-card, .results-content {
        padding: 30px 20px;
    }
    
    .quiz-info {
        grid-template-columns: 1fr;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-info-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .breakdown-stats {
        grid-template-columns: 1fr;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .suggestion-links {
        grid-template-columns: 1fr;
    }
    
    .score-circle {
        width: 150px;
        height: 150px;
    }
    
    .score-number {
        font-size: 2.5rem;
    }
    
    .option-btn {
        padding: 15px 20px;
        font-size: 1.1rem;
        gap: 15px;
    }
    
    .option-letter {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .next-btn {
        padding: 14px 30px;
        font-size: 1.2rem;
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .welcome-content h2 {
        font-size: 2rem;
    }
    
    .question-card {
        padding: 20px 15px;
    }
    
    #question-text {
        font-size: 1.2rem;
    }
    
    .option-btn {
        padding: 12px 15px;
        font-size: 1rem;
        gap: 12px;
    }
    
    .option-letter {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-number {
        font-size: 2rem;
    }
    
    .next-btn {
        padding: 12px 25px;
        font-size: 1.1rem;
        min-width: 140px;
    }
}