/* Quiz Item Styles */
.quiz-item .quiz-content h2 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
}
.quiz-item .quiz-content h2 a {
    color: inherit;
    text-decoration: none;
}
.quiz-item .quiz-content h2 a:hover {
    color: #6afcff;
}

/* Score section */
.quiz-score-section {
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid rgba(106, 252, 255, 0.15);
}
.quiz-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.quiz-score-header .score-label {
    font-size: 0.9em;
    color: #88aacc;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tries-badge {
    background: linear-gradient(135deg, rgba(255,193,7,0.2), rgba(255,152,0,0.2));
    color: #ffc107;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    border: 1px solid rgba(255,193,7,0.3);
}
.quiz-score-text {
    font-size: 0.9em;
    color: #b8c5d0;
    margin-top: 8px;
}
.perfect-badge {
    color: #ffc107;
    margin-left: 8px;
}

/* Progress bars */
.quiz-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}
.quiz-progress-bar.score-bar {
    height: 12px;
    background: rgba(76, 175, 80, 0.15);
}
.quiz-progress-bar.score-bar .progress-fill {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}
.quiz-progress-bar.answer-bar {
    margin-top: 15px;
}
.quiz-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6afcff, #00c9ff);
    border-radius: 4px;
    transition: width 0.3s ease;
}
.quiz-progress-text {
    font-size: 0.85em;
    color: #88aacc;
    margin-bottom: 20px;
}

/* Quiz container */
.quiz-container.interactive-quiz {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Question styles */
.quiz-question {
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
}
.quiz-question.changing {
    border-color: rgba(255,193,7,0.4);
    background: rgba(255,193,7,0.05);
}
.quiz-question .question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.quiz-question .question-number {
    font-size: 0.85em;
    color: #6afcff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.quiz-question .question-status {
    font-size: 0.85em;
    font-weight: 600;
}
.quiz-question .question-status .status-correct {
    color: #4CAF50;
}
.quiz-question .question-status .status-incorrect {
    color: #f44336;
}
.quiz-question .question-status .status-changing {
    color: #ffc107;
}
.quiz-question .question-text {
    font-size: 1.1em;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Change answer button */
.change-answer-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255,193,7,0.15);
    color: #ffc107;
    border: 1px solid rgba(255,193,7,0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
}
.change-answer-btn:hover {
    background: rgba(255,193,7,0.25);
    border-color: rgba(255,193,7,0.5);
}

/* Answer styles */
.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 35px; /* Space for change button */
}
.quiz-answer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}
.quiz-question.answered .quiz-answer:not(.changing *) {
    cursor: default;
}
.quiz-question.changing .quiz-answer {
    cursor: pointer;
}
.quiz-answer:hover:not(.selected):not(.correct):not(.incorrect) {
    background: rgba(106, 252, 255, 0.1);
    border-color: rgba(106, 252, 255, 0.3);
}
.quiz-answer .answer-letter {
    font-weight: 700;
    color: #6afcff;
    min-width: 24px;
}
.quiz-answer .answer-text {
    flex: 1;
    color: #ddd;
}
.quiz-answer .answer-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Answer states */
.quiz-answer.selected {
    border-color: rgba(255,255,255,0.3);
}
.quiz-answer.correct {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
}
.quiz-answer.correct .answer-icon::after {
    content: '✓';
    color: #4CAF50;
}
.quiz-answer.incorrect {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
}
.quiz-answer.incorrect .answer-icon::after {
    content: '✗';
    color: #f44336;
}
.quiz-answer.reveal-correct {
    background: rgba(76, 175, 80, 0.15);
    border-color: rgba(76, 175, 80, 0.5);
}
.quiz-answer.reveal-correct .answer-icon::after {
    content: '✓';
    color: #4CAF50;
    opacity: 0.7;
}

/* Results */
.quiz-results {
    float: left;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, rgba(106, 252, 255, 0.1), rgba(0, 201, 255, 0.05));
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
    border: 1px solid rgba(106, 252, 255, 0.2);
}
.quiz-results .results-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.quiz-results .results-icon {
    font-size: 48px;
}
.quiz-results .results-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.5em;
}
.quiz-results .results-score {
    font-size: 3em;
    font-weight: 700;
    color: #6afcff;
    margin-bottom: 5px;
}
.quiz-results .results-score .score-total {
    color: #88aacc;
    font-size: 0.5em;
}
.quiz-results .results-percentage {
    font-size: 1.5em;
    color: #fff;
    margin-bottom: 10px;
}
.quiz-results .results-tries {
    font-size: 1em;
    color: #ffc107;
    margin-bottom: 15px;
}
.quiz-results .results-tries strong {
    font-size: 1.2em;
}
.quiz-results .results-message {
    font-size: 1.1em;
    color: #b8c5d0;
    margin-bottom: 20px;
}
.quiz-reset-btn {
    background: #00faff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.quiz-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(106, 252, 255, 0.3);
}

/* Preview styles for list view */
.quiz-preview {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.quiz-question-preview {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    color: #b8c5d0;
    font-size: 0.9em;
}
.quiz-question-preview .preview-number {
    color: #6afcff;
    font-weight: 600;
    min-width: 20px;
}
.quiz-more-indicator {
    color: #88aacc;
    font-size: 0.85em;
    margin-top: 8px;
    font-style: italic;
}

/* Friends' Quiz Stats */
.friends-quiz-stats {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}
.friends-stats-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.friends-stats-header .friends-icon {
    font-size: 1.3em;
}
.friends-stats-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #fff;
    font-weight: 600;
}
.friends-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.friend-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.2s ease;
}
.friend-stat-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(106, 252, 255, 0.2);
}
.friend-stat-item.completed {
    border-color: rgba(76, 175, 80, 0.3);
}
.friend-stat-item.perfect {
    background: rgba(255, 193, 7, 0.08);
    border-color: rgba(255, 193, 7, 0.3);
}
.friend-avatar-link {
    flex-shrink: 0;
}
.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
}
.friend-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6afcff, #00c9ff);
    color: #0a1628;
    font-weight: 700;
    font-size: 1.1em;
}
.friend-info {
    flex: 1;
    min-width: 0;
}
.friend-username {
    color: #6afcff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    display: block;
    margin-bottom: 4px;
}
.friend-username:hover {
    color: #fff;
    text-decoration: underline;
}
.friend-score-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.friend-score-bar {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    max-width: 120px;
}
.friend-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.friend-stat-item.perfect .friend-score-fill {
    background: linear-gradient(90deg, #ffc107, #ff9800);
}
.friend-score-text {
    font-size: 0.85em;
    color: #b8c5d0;
    white-space: nowrap;
}
.friend-perfect {
    margin-left: 4px;
}
.friend-tries {
    font-size: 0.75em;
    color: #88aacc;
    margin-top: 2px;
}
.friend-not-attempted {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}