/**
 * Interactive Video Quiz - Production Styles
 * Integrated into MassiveMaw website popover system
 * Prefix: ivq- (Interactive Video Quiz)
 */

/* Main Container (inside popover) */
.ivq-main-container {
    position: relative;
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* YouTube Player Container */
#ivq-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

/* Overlay Base Styles */
.ivq-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.ivq-hidden {
    display: none;
}

.ivq-visible {
    display: flex;
}

/* START Overlay */
#ivq-start-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* QUESTION Overlay */
#ivq-question-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* SUMMARY Overlay */
#ivq-summary-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* Button Base Styles - Glassmorphism with Shimmer */
.ivq-btn-start,
.ivq-btn-next,
.ivq-btn-close {
    --inset: 40px;
    --shimmer-glow-hue: 213deg; /* Blue hue for shimmer */

    position: relative;
    isolation: isolate;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                0 2px 4px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ivq-btn-start:hover,
.ivq-btn-next:hover,
.ivq-btn-close:hover {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2),
                0 4px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.ivq-btn-start:active,
.ivq-btn-next:active,
.ivq-btn-close:active {
    transform: translateY(0);
}

/* Shimmer effects for START, NEXT, and CLOSE buttons */
.ivq-btn-start:hover .shimmer-shimmer::before,
.ivq-btn-start:hover .shimmer-shimmer::after,
.ivq-btn-next:hover .shimmer-shimmer::before,
.ivq-btn-next:hover .shimmer-shimmer::after,
.ivq-btn-close:hover .shimmer-shimmer::before,
.ivq-btn-close:hover .shimmer-shimmer::after {
    opacity: 1;
    animation: shimmer-shine 1.2s ease-in 1 forwards;
}

.ivq-btn-start:hover .shimmer-text,
.ivq-btn-next:hover .shimmer-text,
.ivq-btn-close:hover .shimmer-text {
    animation: shimmer-text .66s ease-in 1 both;
}

/* Question Box - Glassmorphism */
.ivq-question-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 8px 24px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: ivqSlideUp 0.3s ease;
}

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

.ivq-question-title {
    color: #2c3e50 !important;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Options List */
.ivq-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 1.5rem;
}

/* Option Buttons - Glassmorphism */
.ivq-option-btn {
    position: relative;
    padding: 15px 20px;
    font-size: 1rem;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ivq-option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ivq-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Correct Answer Styling */
.ivq-option-btn.correct {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
    border-color: #16A34A;
}

.ivq-option-btn.correct::after {
    content: '✓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff !important;
}

/* Incorrect Answer Styling */
.ivq-option-btn.incorrect {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    border-color: #DC2626;
}

.ivq-option-btn.incorrect::after {
    content: '✗';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff !important;
}

/* NEXT Button (inside question box) */
#ivq-next-btn {
    display: block;
    margin: 0 auto;
}

/* Summary Box - Glassmorphism */
.ivq-summary-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 8px 24px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: ivqSlideUp 0.3s ease;
}

.ivq-summary-title {
    color: #22C55E !important;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ivq-summary-text {
    color: #2c3e50 !important;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.ivq-score-number {
    color: #4A90E2 !important;
    font-weight: bold;
    font-size: 1.4rem;
}

/* Summary Buttons Container */
.ivq-summary-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ivq-question-box,
    .ivq-summary-box {
        padding: 2rem;
    }

    .ivq-question-title {
        font-size: 1.2rem;
    }

    .ivq-summary-title {
        font-size: 1.5rem;
    }

    .ivq-btn-start,
    .ivq-btn-next,
    .ivq-btn-close {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .ivq-summary-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .ivq-option-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .ivq-question-box,
    .ivq-summary-box {
        padding: 1.5rem;
    }

    .ivq-question-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .ivq-options-list {
        gap: 10px;
    }

    .ivq-option-btn {
        padding: 10px 12px;
    }
}
