/* General Styles */
.owlypia-quiz-supervisor,
.owlypia-quiz-student {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Container width to match main site */
.owlypia-quiz-supervisor .container,
.owlypia-quiz-student .container {
    max-width: 1140px !important;
    padding-left: 15px;
    padding-right: 15px;
    margin: 0 auto;
}

/* Full width cards */
.owlypia-quiz-supervisor .card {
    margin-left: 0;
    margin-right: 0;
}

/* Remove any column restrictions */
.owlypia-quiz-supervisor .row > [class*="col-"] {
    max-width: 100%;
}

/* Remove purple header style */
.owlypia-header {
    background: transparent;
    color: inherit;
}

/* Badge Display in Header */
.badge-display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    font-size: 24px;
}

.points-display {
    background: #e9ecef;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

/* User Stats Card */
.stats-info p {
    font-size: 16px;
}

.badges-showcase {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.earned-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    font-size: 20px;
    cursor: help;
}

/* Participant Badge with Icon */
.participant-badge {
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px !important;
    transition: all 0.3s ease;
    background: white !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.participant-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.participant-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.participant-name {
    font-weight: 500;
    color: #495057;
    word-break: break-word;
    text-align: center;
    line-height: 1.2;
}

/* Quiz Selection */
.quiz-item {
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quiz-item h5 {
    font-size: 1.1rem; /* Reduced from default 1.25rem */
    font-weight: 500;
    margin-bottom: 0;
    line-height: 1.3;
}

/* Quiz Selection Indicator - Checkmark Icon */
.quiz-selection-indicator {
    width: 24px;
    height: 24px;
    background: #28a745;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
    animation: checkmarkPop 0.3s ease-out;
}

.quiz-selection-indicator i {
    color: white;
    font-size: 12px;
}

/* Animation for checkmark pop */
@keyframes checkmarkPop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Show indicator when quiz is selected */
.quiz-item.selected .quiz-selection-indicator {
    display: flex;
}

/* Enhanced selected state */
.quiz-item.selected {
    border-color: #667eea !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-width: 2px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
}

/* Quiz List Header */
.quiz-list-header {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    padding: 10px 0;
    margin-bottom: 15px;
}

/* Responsive columns for quiz list */
@media (max-width: 768px) {
    .quiz-list-header {
        display: none;
    }
    
    .quiz-item .col-md-7,
    .quiz-item .col-md-2,
    .quiz-item .col-md-1 {
        width: 100%;
        text-align: left !important;
        margin-bottom: 5px;
    }
}

/* Expand quiz selection card to full width */
#quiz-selection .col-12,
#waiting-room .col-12,
#quiz-screen .col-12,
#final-results .col-12 {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Make modals full width as well */
.modal-xl {
    max-width: 98% !important;
}

/* Results window matches the quiz card inside the 1140px supervisor container. */
#results-modal .modal-dialog {
    max-width: calc(1140px - 1.5rem) !important;
    width: calc(100% - 1.5rem);
}

.modal-lg {
    max-width: 95% !important;
}

/* Leaderboard modal specific styling - 1200px width */
#leaderboard-modal .modal-dialog {
    max-width: 1200px !important;
    width: 1200px !important;
    margin: 1.75rem auto;
}

.quiz-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    background: #f0f4ff;
}

/* PIN Display */
.pin-display {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.pin-display h1 {
    letter-spacing: 20px;
    margin-left: 20px;
    margin-bottom: 0;
}

/* QR Code */
.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 250px;
}

.qr-code-container canvas {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

/* Participants Grid */
.participant-badge {
    border: 1px solid #dee2e6;
}

/* Answer Options */
.answer-option {
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.9;
    min-height: 100px;
    display: flex;
    align-items: center;
    height: 100%;
}

.answer-option .d-flex {
    width: 100%;
}

.answer-option:hover {
    transform: scale(1.05);
    opacity: 1;
}

.answer-option.correct {
    border: 4px solid #28a745;
    animation: pulse 0.5s;
}

.answer-option.incorrect {
    opacity: 0.5;
}

.answer-label {
    font-size: 24px;
    font-weight: bold;
}

/* Equal height columns for quiz options */
.question-content .row {
    display: flex;
    flex-wrap: wrap;
}

.question-content .col-md-6 {
    display: flex;
    margin-bottom: 15px;
}

.question-content .col-md-6 .answer-option {
    width: 100%;
}

/* Timer Display */
.timer-display {
    background: rgba(0,0,0,0.1);
    padding: 10px 20px;
    border-radius: 10px;
}

/* Quiz Info Small */
.quiz-info-small .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Quiz Info Left - Stacked Participants and PIN */
.quiz-info-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.quiz-info-left .badge {
    font-size: 0.85rem;
    padding: 6px 10px;
    margin: 0;
}

/* Student Question Header - Light Orange */
.student-question-header {
    background: linear-gradient(135deg, #ff8f56 0%, #ff6b35 100%) !important;
}

/* True-False Question Styling */
.true-false-question .answer-option[data-answer="3"],
.true-false-question .answer-option[data-answer="4"],
.true-false-question .answer-btn[data-answer="3"],
.true-false-question .answer-btn[data-answer="4"] {
    display: none !important;
}

/* Adjust True-False layout - full width A and B, hide C and D columns */
.true-false-question .col-md-6:nth-child(1),
.true-false-question .col-md-6:nth-child(2) {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1rem;
}

.true-false-question .col-md-6:nth-child(3),
.true-false-question .col-md-6:nth-child(4) {
    display: none !important;
}

/* Answer Stats */
.answer-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

/* Leaderboard */
.podium {
    margin-top: 30px;
}

.podium-place {
    text-align: center;
    padding: 20px;
}

.first-place {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 10px;
    transform: scale(1.1);
}

.second-place {
    background: linear-gradient(135deg, #c0c0c0 0%, #d7d7d7 100%);
    border-radius: 10px;
}

.third-place {
    background: linear-gradient(135deg, #cd7f32 0%, #e6a55a 100%);
    border-radius: 10px;
}

.trophy {
    font-size: 60px;
    margin-bottom: 10px;
}

/* Student Styles */
.answer-btn {
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    position: relative;
}

.answer-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.answer-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.answer-btn.selected {
    border: 4px solid #333;
    transform: scale(0.95);
}

/* Correct and Wrong answer styles */
.answer-btn.btn-success {
    background-color: #28a745 !important;
    border: 4px solid #1e7e34 !important;
}

.answer-btn.btn-danger {
    background-color: #dc3545 !important;
    border: 4px solid #bd2130 !important;
    opacity: 0.8;
}

/* Answer Label Styles - A, B, C, D */
.answer-btn .answer-label {
    font-size: 32px;
    font-weight: bold;
    border: 3px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.25);
    margin-right: 15px;
    flex-shrink: 0;
}

.answer-btn .answer-text {
    flex: 1;
    text-align: left;
    font-size: 20px;
}

.answer-btn .d-flex {
    width: 100%;
}

/* PIN Input */
#pin-input {
    font-family: monospace;
    font-weight: bold;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 1s infinite;
}

/* Loading Animation */
.waiting-animation {
    padding: 40px;
}

/* Final Results */
.trophy-icon {
    font-size: 120px;
    margin-bottom: 20px;
    line-height: 1;
    display: block;
}

#final-position {
    margin-bottom: 30px;
}

#final-position h2,
#final-position h3 {
    margin-bottom: 15px;
}

#final-trophy {
    margin: 20px 0;
}

/* Badges */
.badges-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.badge-earned {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    max-width: 200px;
    animation: slideIn 0.5s ease-out;
}

.badge-earned .badge-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.badge-earned h5 {
    margin: 10px 0 5px 0;
    font-size: 18px;
}

.badge-earned p {
    font-size: 14px;
    margin: 5px 0;
}

.badge-earned small {
    font-size: 12px;
    opacity: 0.9;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Video Container Styles */
.video-container {
    position: relative;
    width: 100%;
    height: 70vh; /* Use viewport height instead of padding-bottom */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container iframe,
.video-container #video-player {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Ensure video player fills container properly */
#video-player {
    width: 100% !important;
    height: 100% !important;
    background: #000;
}

.video-screen {
    text-align: center;
    padding: 20px;
}

.video-screen h3 {
    margin-bottom: 20px;
}

/* Video Waiting Screen for Students */
.video-waiting-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 20px;
    border-radius: 15px;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.video-waiting-screen .video-icon {
    font-size: 120px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.video-waiting-screen h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.video-waiting-screen p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Next Question Button Variants */
.btn-next-video {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8f56 100%);
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-next-video:hover {
    background: linear-gradient(135deg, #ff5722 0%, #ff7043 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

.btn-next-video::before {
    content: '📹';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.btn-next-video {
    padding-left: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .pin-display h1 {
        font-size: 3rem;
        letter-spacing: 10px;
        margin-left: 10px;
    }
    
    .answer-option {
        margin-bottom: 10px;
    }
    
    .podium-place {
        margin-bottom: 20px;
    }
    
    .first-place {
        transform: scale(1);
    }
    
    /* Mobile Answer Buttons */
    .answer-btn {
        font-size: 16px;
    }
    
    .answer-btn .answer-label {
        font-size: 24px;
        width: 44px;
        height: 44px;
        margin-right: 10px;
    }
    
    .answer-btn .answer-text {
        font-size: 16px;
    }
    
    .video-waiting-screen h2 {
        font-size: 1.75rem;
    }
    
    .video-waiting-screen .video-icon {
        font-size: 80px;
    }
    
    /* Mobile video container adjustments */
    .video-container {
        height: 60vh; /* Slightly smaller on mobile */
        margin-bottom: 15px;
    }
}

/* Override Bootstrap container for supervisor */
@media (min-width: 1200px) {
    .owlypia-quiz-supervisor .container {
        max-width: 1140px !important;
    }
    
    /* Desktop'da öğrenci kartlarını genişlet */
    .owlypia-quiz-student #join-screen .col-md-6.col-lg-5 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .owlypia-quiz-student #waiting-room .col-md-8.col-lg-6 {
        flex: 0 0 60%;
        max-width: 60%;
    }
    
    .owlypia-quiz-student #question-screen .col-md-10.col-lg-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

@media (min-width: 992px) {
    .owlypia-quiz-supervisor .container {
        max-width: 960px !important;
    }
    
    /* Large desktop'da öğrenci kartlarını genişlet */
    .owlypia-quiz-student #join-screen .col-md-6.col-lg-5 {
        flex: 0 0 45%;
        max-width: 45%;
    }
    
    .owlypia-quiz-student #waiting-room .col-md-8.col-lg-6 {
        flex: 0 0 55%;
        max-width: 55%;
    }
    
    .owlypia-quiz-student #question-screen .col-md-10.col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .owlypia-quiz-supervisor .container {
        max-width: 720px !important;
    }
}

@media (min-width: 576px) {
    .owlypia-quiz-supervisor .container {
        max-width: 540px !important;
    }
}

/* Question Text Font Size */
/* Age Group Badge Colors */
.badge.age-group-owly {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important; /* Mavi gradient */
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3) !important;
    transition: all 0.3s ease !important;
}

.badge.age-group-owlet {
    background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%) !important; /* Turkuaz yeşili gradient */
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    box-shadow: 0 2px 4px rgba(32,201,151,0.3) !important;
    transition: all 0.3s ease !important;
}

.badge.age-group-owlin {
    background: linear-gradient(135deg, #6f42c1 0%, #563d7c 100%) !important; /* Mor gradient */
    color: white !important;
    border: none !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    box-shadow: 0 2px 4px rgba(111,66,193,0.3) !important;
    transition: all 0.3s ease !important;
}

/* Hover effects for age group badges */
.badge.age-group-owly:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,123,255,0.4) !important;
}

.badge.age-group-owlet:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(32,201,151,0.4) !important;
}

.badge.age-group-owlin:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(111,66,193,0.4) !important;
}

#question-text {
    font-size: 34px;
    font-weight: 400;
}

/* Leaderboard Header Styling - Fix for text color */
#leaderboard-screen .card-header.bg-primary {
    background-color: #007bff !important;
    color: white !important;
}

#leaderboard-screen .card-header.bg-primary h3 {
    color: white !important;
}

/* Alternative: Light gray background option */
/* To use this instead of blue, replace bg-primary with bg-light-gray in template */
.bg-light-gray {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

#leaderboard-screen .card-header.bg-light-gray h3 {
    color: #212529 !important;
}

/* Quiz Pagination Styles */
.quiz-pagination {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
    margin-top: 20px;
}

.quiz-pagination .pagination-info {
    color: #6c757d;
    font-size: 14px;
}

.quiz-pagination .pagination {
    margin-bottom: 0;
}

.quiz-pagination .page-link {
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
    font-size: 14px;
}

.quiz-pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.quiz-pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
}

.quiz-pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    pointer-events: none;
}

/* Quiz Actions */
.quiz-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.start-session-btn {
    min-width: 100px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.start-session-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

#guest-name-input {
    font-size: 1.25rem;
}

#login-required-notice {
    text-align: left;
}

@media (max-width: 768px) {
    .quiz-pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-pagination .d-flex {
        flex-direction: column;
        align-items: center !important;
    }
    
    .quiz-pagination .pagination-info {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .quiz-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .start-session-btn {
        min-width: 90px;
        font-size: 13px;
    }
}