/* Quiz Container */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Quiz Header */
.quiz-header {
    background: transparent;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.quiz-header h1 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.quiz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.quiz-meta .author {
    color: #3498db;
    font-weight: bold;
}

.quiz-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-top: 15px;
}

/* Cover Image */
.quiz-cover {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
}

.quiz-cover img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Quiz Steps/Progress */
.quiz-steps {
    list-style: none;
    padding: 20px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    justify-content: center;
}

.quiz-steps li {
    background: #e0e0e0;
    color: #666;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: default;
    transition: all 0.3s ease;
    min-width: 45px;
    height: 45px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    pointer-events: none;
}

.quiz-steps li.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    transform: scale(1.05);
}

.quiz-steps li.completed {
    background: #27ae60;
    color: white;
    border-color: #229954;
}

.quiz-steps li.completed-correct {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
}

.quiz-steps li.completed-wrong {
    background: #e74c3c;
    color: white;
    border-color: #c0392b;
}

.quiz-steps li#quiz-step-result {
    background: #f39c12;
    color: white;
    padding: 12px 14px;
    border-color: #e67e22;
}

.quiz-steps li#quiz-step-result.active {
    background: #e67e22;
    transform: scale(1.05);
}

/* Quiz Content */
.quiz-content {
    padding: 20px;
    min-height: 200px;
}

.quiz-question {
    display: none;
    text-align: center;
}

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

.quiz-question h2 {
    font-size: 22px;
    margin-bottom: 25px;
    color: #333;
}

.quiz-question p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Answer Options */
.quiz-answers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.quiz-answer {
    background: #f8f9fa;
    border: 2px solid #454647;
    border-radius: 8px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 16px;
    color: #141414;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 80px;
}

.quiz-answer:hover {
    background: #e3f2fd;
    border-color: #3498db;
}

.quiz-answer.selected {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.quiz-answer.correct {
    background: #2ecc71;
    border-color: #27ae60;
    color: white;
}

.quiz-answer.wrong {
    background: #e74c3c;
    border-color: #c0392b;
    color: white;
}

/* Navigation Buttons */
.quiz-navigation {
    text-align: center;
    padding: 10px;
    border-top: 1px solid #e9ecef;
}

.quiz-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 12px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.quiz-btn:hover {
    background: #2980b9;
}

.quiz-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Loading Screen */
.quiz-loading {
    text-align: center;
    padding: 60px 20px;
}

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

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

/* Result Screen */
.quiz-result {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

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

.result-score {
    font-size: 48px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 20px;
}

.result-image img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.result-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.result-text {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

/* Sidebar */
.quiz-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.related-quiz {
    display: flex;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.related-quiz:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.related-quiz img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.related-quiz-info h6 {
    font-size: 14px;
    margin: 0 0 5px 0;
    color: #333;
}

.related-quiz-info small {
    color: #666;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-container {
        margin: 10px;
    }
    
    .quiz-content {
        padding: 15px;
    }
    
    .quiz-question h2 {
        font-size: 20px;
    }
    
    .quiz-answer {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .quiz-steps {
        padding: 15px;
        gap: 6px;
    }
    
    .quiz-steps li {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 40px;
        height: 40px;
    }
    
    .quiz-btn {
        padding: 10px 20px;
        font-size: 15px;
    }
    
    /* Responsive Answer Grid */
    .quiz-answers {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .quiz-answers {
        grid-template-columns: 1fr;
    }
}

/* Eredmény kártyák animációi */
.quiz-result .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quiz-result .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.quiz-result .row .col-md-4:nth-child(1) .card {
    animation: slideInUp 0.6s ease 0.1s both;
}

.quiz-result .row .col-md-4:nth-child(2) .card {
    animation: slideInUp 0.6s ease 0.2s both;
}

.quiz-result .row .col-md-4:nth-child(3) .card {
    animation: slideInUp 0.6s ease 0.3s both;
}

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

/* Challenge header animáció az eredmény képernyőhöz */
.quiz-result .challenge-header {
    animation: fadeInDown 0.8s ease both;
}

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

/* Megosztás kártya speciális stílus */
.quiz-result .col-md-4:last-child .card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quiz-result .col-md-4:last-child .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.quiz-result .col-md-4:last-child .card:hover::before {
    left: 100%;
}

/* Pontszám és tantusz animációs kiemelés */
#result-score, #result-tantusz {
    transition: all 0.3s ease;
}

.score-highlight {
    transform: scale(1.2) !important;
    color: #ffc107 !important;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.tantusz-highlight {
    transform: scale(1.2) !important;
    color: #17a2b8 !important;
    text-shadow: 0 0 10px rgba(23, 162, 184, 0.5);
}

/* Mobil kompakt eredménykártyák */
.mobile-result-cards {
    border-radius: 8px;
    overflow: hidden;
}

.result-mobile-item {
    padding: 5px;
    width: 33.333%;
}

.result-mobile-item i {
    font-size: 1.25rem;
    margin-bottom: 6px;
    display: block;
}

.result-mobile-item .fw-bold {
    font-size: 1.3rem;
    margin: 4px 0;
    font-weight: 600 !important;
}

.mobile-share-buttons {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.mobile-share-buttons .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-share-buttons .btn i {
    font-size: 0.9rem;
    margin: 0;
}

/* Facebook gomb stílus */
.btn-facebook {
    background-color: #3b5998;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
    margin-top: 4px;
}

/* Mobil nézeti Facebook gomb (kerek) */
.result-mobile-item .btn-facebook {
    width: 36px;
    height: 36px;
}

.btn-facebook:hover,
.btn-facebook:focus {
    background-color: #2d4373;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

@media (max-width: 767.98px) {
    .mobile-result-cards .card {
        margin-bottom: 0;
    }
    
    .challenge-header {
        padding-bottom: 0 !important;
    }
    
    .challenge-header .d-flex {
        margin-bottom: 10px !important;
    }
    
    .challenge-header h1 {
        font-size: 1.5rem !important;
    }
    
    .challenge-header .trophy-icon {
        font-size: 1.8rem !important;
    }
    
    .challenge-header .result-text {
        font-size: 1rem !important;
        margin-bottom: 15px !important;
    }
    
    .challenge-header .btn-lg {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem !important;
    }
}
