/* Quiz Master Frontend Styles */

.quiz-master-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background-color, #ffffff);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.quiz-master-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #007cba), var(--secondary-color, #00a0d2), var(--accent-color, #ff6b6b));
}

.quiz-master-content {
    position: relative;
    z-index: 1;
}

.quiz-master-heading {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color, #333333);
    margin: 0 0 30px 0;
    background: linear-gradient(135deg, var(--primary-color, #007cba), var(--accent-color, #ff6b6b));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-master-image-container {
    text-align: center;
    margin: 30px 0;
}

.quiz-master-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border: 4px solid var(--primary-color, #007cba);
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.quiz-master-image-circle {
    border-radius: 50%;
}

.quiz-master-image-square {
    border-radius: 0;
}

.quiz-master-image-heart {
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(-45deg);
}

.quiz-master-image-diamond {
    border-radius: 0;
    transform: rotate(45deg);
}

.quiz-master-image-rounded {
    border-radius: 20px;
}

.quiz-master-image:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.quiz-master-ad-container {
    margin: 20px 0;
    text-align: center;
}

.quiz-master-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.quiz-master-option {
    background: linear-gradient(135deg, var(--primary-color, #007cba), var(--secondary-color, #00a0d2));
    color: white;
    border: none;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3);
    transform: perspective(1000px) rotateX(0deg);
}

.quiz-master-option::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 ease;
}

.quiz-master-option:hover {
    transform: perspective(1000px) rotateX(-5deg) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 124, 186, 0.4);
}

.quiz-master-option:hover::before {
    left: 100%;
}

.quiz-master-option:active {
    transform: perspective(1000px) rotateX(0deg) translateY(0px);
    box-shadow: 0 5px 15px rgba(0, 124, 186, 0.3);
}

.quiz-master-option.selected {
    background: linear-gradient(135deg, var(--accent-color, #ff6b6b), #ff8e8e);
    animation: pulse 0.6s ease;
}

.quiz-master-progress-container {
    margin: 40px 0;
    text-align: center;
}

.quiz-master-progress-bar {
    width: 100%;
    height: 16px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-master-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #007cba), var(--accent-color, #ff6b6b));
    border-radius: 12px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.quiz-master-progress-fill.red-glowing {
    background: linear-gradient(90deg, #ff4757, #ff6b7a);
    box-shadow: 0 0 20px rgba(255, 71, 87, 0.6), 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: redGlow 2s ease-in-out infinite alternate;
}

@keyframes redGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.6), 0 2px 6px rgba(0, 0, 0, 0.2);
    }
    100% {
        box-shadow: 0 0 30px rgba(255, 71, 87, 0.8), 0 2px 6px rgba(0, 0, 0, 0.2);
    }
}

.quiz-master-progress-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color, #333333);
    transition: all 0.3s ease;
}

.quiz-master-progress-text.blinking {
    animation: blink 1s infinite;
    color: var(--accent-color, #ff6b6b);
}

.quiz-master-main-button-container {
    text-align: center;
    margin: 30px 0;
}

.quiz-master-main-button {
    background: linear-gradient(135deg, var(--accent-color, #ff6b6b), #ff8e8e);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    transform: perspective(1000px) rotateX(0deg);
    text-decoration: none;
    display: inline-block;
}

.quiz-master-main-button:hover {
    transform: perspective(1000px) rotateX(-5deg) translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

.quiz-master-main-button:active {
    transform: perspective(1000px) rotateX(0deg) translateY(0px);
}

.quiz-master-completion-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.quiz-master-completion-button {
    background: linear-gradient(135deg, var(--primary-color, #007cba), var(--secondary-color, #00a0d2));
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3);
    transform: perspective(1000px) rotateX(0deg);
    display: inline-block;
}

.quiz-master-completion-button:hover {
    transform: perspective(1000px) rotateX(-5deg) translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 124, 186, 0.4);
    color: white;
    text-decoration: none;
}

.quiz-master-completion-button-2 {
    background: linear-gradient(135deg, var(--accent-color, #ff6b6b), #ff8e8e);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.quiz-master-completion-button-2:hover {
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
}

/* Popup Styles */
.quiz-master-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.quiz-master-popup-content {
    background: white;
    border-radius: 20px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease;
}

.quiz-master-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 10;
}

.quiz-master-popup-countdown {
    background: var(--accent-color, #ff6b6b);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 10px;
}

.quiz-master-popup-close-btn {
    background: #ff4757;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-master-popup-close-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.quiz-master-popup-ad {
    text-align: center;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-master-container {
        margin: 10px;
        padding: 15px;
    }
    
    .quiz-master-heading {
        font-size: 2rem;
    }
    
    .quiz-master-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .quiz-master-option {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .quiz-master-completion-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .quiz-master-completion-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .quiz-master-heading {
        font-size: 1.5rem;
    }
    
    .quiz-master-image {
        width: 120px;
        height: 120px;
    }
    
    .quiz-master-option {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}
