/* Történelmi Quiz CSS Stílusok - MyTiszaföldvár */

/* Kilépés gomb */
.exit-button-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.exit-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--error-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    font-family: 'Nunito', sans-serif;
}

.exit-button:hover {
    background: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.exit-button i {
    font-size: 1rem;
}

/* Theme Toggle gomb */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    right: 140px;
    z-index: 1000;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.theme-toggle:active {
    transform: translateY(0);
}

/* Dark mode ikon */
[data-theme="dark"] .theme-toggle {
    background: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--secondary-dark);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Quiz fő konténer */
.quiz-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.quiz-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light), var(--secondary-color));
    border-radius: 20px 20px 0 0;
}

/* Quiz fejléc */
.quiz-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.quiz-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, var(--text-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-subtitle {
    font-size: 1.1rem;
    color: var(--light-text);
    margin-bottom: 1.5rem;
    font-family: 'Nunito', sans-serif;
}

.quiz-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.quiz-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--light-background);
    border-radius: 25px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.quiz-stat i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Quiz kezdő képernyő */
.quiz-start {
    text-align: center;
    padding: 2rem 0;
}

.quiz-start-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(244, 208, 63, 0.3);
}

.quiz-start h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-family: 'Nunito', sans-serif;
}

.quiz-start p {
    color: var(--light-text);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-start-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--secondary-color);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.3);
    font-family: 'Nunito', sans-serif;
}

.quiz-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(244, 208, 63, 0.4);
}

/* Quiz kérdés szekció */
.quiz-question {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.quiz-question.active {
    display: block;
}

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

.question-header {
    margin-bottom: 2rem;
    text-align: center;
}

.question-number {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.question-text {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 1rem;
    font-family: 'Nunito', sans-serif;
}

.question-image {
    width: 100%;
    max-width: 400px;
    height: 250px;
    margin: 0 auto 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
}

.question-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.question-image:hover img {
    transform: scale(1.05);
}

/* Válasz opciók */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(244, 208, 63, 0.1), transparent);
    transition: left 0.5s ease;
}

.answer-option:hover::before {
    left: 100%;
}

.answer-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.2);
}

.answer-option.selected {
    border-color: var(--primary-color);
    background: rgba(244, 208, 63, 0.1);
    box-shadow: 0 4px 15px rgba(244, 208, 63, 0.3);
}

.answer-option.correct {
    border-color: var(--success-color);
    background: rgba(101, 150, 105, 0.1);
    box-shadow: 0 4px 15px rgba(101, 150, 105, 0.3);
}

.answer-option.incorrect {
    border-color: var(--error-color);
    background: rgba(220, 38, 38, 0.1);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.answer-option.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.option-letter {
    background: var(--secondary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.answer-option:hover .option-letter {
    background: var(--primary-color);
    transform: scale(1.1);
}

.answer-option.selected .option-letter {
    background: var(--primary-color);
}

.answer-option.correct .option-letter {
    background: var(--success-color);
}

.answer-option.incorrect .option-letter {
    background: var(--error-color);
}

.option-text {
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
}

.answer-option.selected .option-text {
    color: var(--primary-color);
    font-weight: 600;
}

.answer-option.correct .option-text {
    color: var(--success-color);
    font-weight: 600;
}

.answer-option.incorrect .option-text {
    color: var(--error-color);
    font-weight: 600;
}

/* Quiz navigáció */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.quiz-btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.quiz-btn:not(:disabled):hover {
    transform: translateY(-2px);
}

.btn-prev {
    background: var(--light-background);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-prev:hover:not(:disabled) {
    background: var(--border-color);
    border-color: var(--text-color);
}

.btn-next {
    background: var(--primary-color);
    color: var(--secondary-color);
    border: 2px solid var(--primary-color);
}

.btn-next:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.3);
}

.btn-submit {
    background: var(--success-color);
    color: white;
    border: 2px solid var(--success-color);
}

.btn-submit:hover:not(:disabled) {
    background: #059669;
    border-color: #059669;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
}

/* Quiz eredmények */
.quiz-results {
    display: none;
    text-align: center;
    padding: 2rem 0;
    animation: fadeInUp 0.6s ease-out;
}

.quiz-results.active {
    display: block;
}

.results-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.results-icon.excellent {
    background: linear-gradient(135deg, var(--success-color), #10B981);
    color: white;
}

.results-icon.good {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--secondary-color);
}

.results-icon.average {
    background: linear-gradient(135deg, var(--warning-color), #F59E0B);
    color: white;
}

.results-icon.poor {
    background: linear-gradient(135deg, var(--error-color), #EF4444);
    color: white;
}

.results-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    font-family: 'Nunito', sans-serif;
}

.results-score {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Nunito', sans-serif;
}

.results-message {
    color: var(--light-text);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.results-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-stat {
    background: var(--light-background);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.result-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.result-stat-label {
    color: var(--light-text);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-restart {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
}

.btn-restart:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.3);
}

.btn-home {
    background: var(--secondary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
}

.btn-home:hover {
    background: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.3);
}

/* Progress bar */
.quiz-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    color: var(--light-text);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Quiz betöltő animáció */
.quiz-loading {
    text-align: center;
    padding: 3rem 0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-text {
    color: var(--light-text);
    font-size: 1rem;
    font-weight: 500;
}

/* Dark mode támogatás */
[data-theme="dark"] .quiz-container {
    background: var(--card-background);
    border-color: var(--border-color);
}

[data-theme="dark"] .quiz-start-icon {
    box-shadow: 0 10px 30px rgba(244, 208, 63, 0.2);
}

[data-theme="dark"] .answer-option {
    background: var(--card-background);
    border-color: var(--border-color);
}

[data-theme="dark"] .answer-option:hover {
    background: var(--hover-background);
}

[data-theme="dark"] .quiz-stat {
    background: var(--light-background);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .result-stat {
    background: var(--light-background);
    border-color: var(--border-color);
}

[data-theme="dark"] .progress-bar {
    background: var(--border-color);
}

/* Reszponzív design */
@media (max-width: 768px) {
    .quiz-container {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .quiz-title {
        font-size: 2rem;
    }
    
    .quiz-info {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .quiz-start-icon {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .question-image {
        height: 200px;
    }
    
    .answer-option {
        padding: 1rem 1.25rem;
    }
    
    .option-letter {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .results-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .quiz-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobil téma váltó pozíció */
    .theme-toggle-container {
        top: 15px;
        right: 15px;
    }
    
    .exit-button-container {
        top: 15px;
        right: 75px;
    }
    
    .exit-button {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .quiz-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .quiz-title {
        font-size: 1.75rem;
    }
    
    .quiz-start h3 {
        font-size: 1.5rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .answer-option {
        padding: 0.875rem 1rem;
    }
    
    .option-letter {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .option-text {
        font-size: 0.95rem;
    }
    
    .results-score {
        font-size: 2.5rem;
    }
    
    .results-title {
        font-size: 1.75rem;
    }
    
    /* Kicsi mobil téma váltó pozíció */
    .theme-toggle-container {
        top: 10px;
        right: 10px;
    }
    
    .exit-button-container {
        top: 10px;
        right: 65px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .exit-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}
