/* TEMA KIDS - CHINCHESTER - VERSIÓN MEJORADA */
@import url('https://fonts.googleapis.com/css2?family=Bubblegum+Sans&family=Fredoka+One&family=Nunito:wght@700;900&display=swap');

/* Animate.css */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

.theme-kids {
    font-family: 'Bubblegum Sans', 'Comic Sans MS', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #ffd700 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

/* Confetti Background */
.theme-kids::before {
    content: '🎉 ⭐ 🌟 ✨ 🎊 🎈 🎁 🌈 🦄 🍭 🎨 🎪';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 3rem;
    opacity: 0.1;
    animation: confetti 30s linear infinite;
    pointer-events: none;
    word-spacing: 80px;
    line-height: 120px;
    z-index: -1;
}

@keyframes confetti {
    0% { transform: translateY(-100%) rotate(0deg); }
    100% { transform: translateY(100%) rotate(360deg); }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes pulse-grow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.theme-kids h1, .theme-kids h2, .theme-kids h3 {
    font-family: 'Fredoka One', cursive;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.2), 
                 -1px -1px 0px rgba(255,255,255,0.3);
    animation: float 3s ease-in-out infinite;
}

.theme-kids .btn-kids {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 50px;
    padding: 18px 35px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    box-shadow: 0 8px 15px rgba(0,0,0,0.3), 
                0 0 0 4px rgba(255,255,255,0.5),
                0 0 20px rgba(240, 147, 251, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    animation: pulse-grow 2s ease-in-out infinite;
}

.theme-kids .btn-kids::before {
    content: '✨';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    animation: float 2s ease-in-out infinite;
}

.theme-kids .btn-kids::after {
    content: '🎉';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    animation: float 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

.theme-kids .btn-kids:hover {
    transform: translateY(-5px) scale(1.1) rotate(2deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4),
                0 0 0 6px rgba(255,255,255,0.7),
                0 0 40px rgba(240, 147, 251, 0.8);
    animation: wiggle 0.5s ease-in-out infinite;
}

.theme-kids .btn-kids:active {
    transform: translateY(0) scale(0.95);
    animation: none;
}

.theme-kids .question-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    border-radius: 30px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2),
                0 0 0 6px rgba(255,215,0,0.8),
                inset 0 0 30px rgba(255,215,0,0.1);
    border: 6px solid #ffd700;
    position: relative;
    overflow: visible;
    animation: float 4s ease-in-out infinite;
}

.theme-kids .question-card::before {
    content: '⭐';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 50px;
    animation: float 2s ease-in-out infinite, rainbow 3s linear infinite;
}

.theme-kids .question-card::after {
    content: '🌟';
    position: absolute;
    bottom: -20px;
    left: -20px;
    font-size: 50px;
    animation: float 2s ease-in-out infinite;
    animation-delay: 1s;
}

.theme-kids .option {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 22px 25px;
    border-radius: 25px;
    margin: 12px 0;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 5px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.theme-kids .option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.theme-kids .option:hover::before {
    left: 100%;
}

.theme-kids .option:hover {
    transform: scale(1.08) rotate(2deg);
    border-color: #ffd700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3),
                0 0 20px rgba(255,215,0,0.5);
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
}

.theme-kids .option.selected {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    font-weight: 900;
    border-color: #ff6b6b;
    border-width: 6px;
    animation: bounce 0.5s ease, pulse-grow 1s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(255,215,0,0.5),
                inset 0 0 20px rgba(255,255,255,0.5);
}

.theme-kids .option.selected::after {
    content: '✓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    font-weight: bold;
    animation: bounce 0.5s ease infinite;
}

.theme-kids .option.correct {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #16a34a;
    animation: bounce 0.5s ease;
}

.theme-kids .option.incorrect {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    border-color: #dc2626;
    animation: wiggle 0.3s ease 3;
}

@keyframes bounce {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.1) translateY(-5px); }
}

.theme-kids .progress-bar {
    height: 35px;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.2),
                0 4px 15px rgba(0,0,0,0.1);
    border: 4px solid #ffd700;
    position: relative;
}

.theme-kids .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 100%;
    animation: progress-shine 2s linear infinite;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.theme-kids .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes progress-shine {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Timer with animation */
.theme-kids .timer {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(255,107,107,0.5);
    animation: pulse-grow 1s ease-in-out infinite;
}

.theme-kids .timer.warning {
    animation: wiggle 0.3s ease infinite;
    background: linear-gradient(135deg, #ff0000 0%, #ff4444 100%);
}

/* Floating emojis */
.theme-kids .emoji-float {
    position: fixed;
    font-size: 40px;
    pointer-events: none;
    animation: emoji-rise 3s ease-in forwards;
    z-index: 999;
}

@keyframes emoji-rise {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-200px) rotate(360deg);
        opacity: 0;
    }
}

/* Success celebration */
.theme-kids .success-overlay {
    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;
    animation: fadeIn 0.3s ease;
}

.theme-kids .success-message {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 50px;
    border-radius: 40px;
    text-align: center;
    animation: bounce 0.5s ease, pulse-grow 1s ease-in-out infinite;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.theme-kids .success-message h1 {
    font-size: 60px;
    margin-bottom: 20px;
    animation: rainbow 3s linear infinite;
}

/* Loading animation */
.theme-kids .loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 6px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-kids .question-card {
        padding: 25px;
        border-width: 4px;
    }
    
    .theme-kids .option {
        padding: 18px 20px;
        font-size: 16px;
    }
    
    .theme-kids .btn-kids {
        padding: 15px 30px;
        font-size: 18px;
    }
}

/* Print styles */
@media print {
    .theme-kids::before,
    .theme-kids .question-card::before,
    .theme-kids .question-card::after {
        display: none;
    }
    
    .theme-kids {
        background: white;
        animation: none;
    }
}

/* ===== CLASES ESPECÍFICAS PARA TAKE-EXAM.PHP ===== */

/* Container principal del examen */
.theme-kids .container {
    animation: float 3s ease-in-out infinite;
}

/* Cards de preguntas en take-exam */
.theme-kids .bg-white {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%) !important;
    border-radius: 25px !important;
    border: 5px solid #ffd700 !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2),
                0 0 0 6px rgba(255,215,0,0.6),
                inset 0 0 30px rgba(255,215,0,0.1) !important;
    position: relative;
    overflow: visible;
}

/* Headings en take-exam */
.theme-kids h1,
.theme-kids h2,
.theme-kids h3,
.theme-kids .text-xl,
.theme-kids .text-2xl,
.theme-kids .text-3xl {
    font-family: 'Fredoka One', 'Comic Sans MS', cursive !important;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1) !important;
    color: #F5576C !important;
}

/* Botones en take-exam */
.theme-kids .bg-indigo-600,
.theme-kids .bg-green-600,
.theme-kids .bg-blue-600,
.theme-kids button,
.theme-kids .btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    border-radius: 25px !important;
    padding: 15px 30px !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3) !important;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3), 
                0 0 0 4px rgba(255,255,255,0.5),
                0 0 20px rgba(240, 147, 251, 0.5) !important;
    transition: all 0.3s ease !important;
    animation: pulse-grow 2s ease-in-out infinite !important;
    border: none !important;
}

.theme-kids .bg-indigo-600:hover,
.theme-kids .bg-green-600:hover,
.theme-kids .bg-blue-600:hover,
.theme-kids button:hover,
.theme-kids .btn:hover {
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4),
                0 0 0 6px rgba(255,255,255,0.7),
                0 0 40px rgba(240, 147, 251, 0.8) !important;
}

/* Inputs y selects */
.theme-kids input[type="text"],
.theme-kids input[type="email"],
.theme-kids input[type="password"],
.theme-kids input[type="number"],
.theme-kids textarea,
.theme-kids select {
    border: 4px solid #ffd700 !important;
    border-radius: 15px !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
    font-family: 'Comic Sans MS', cursive !important;
}

.theme-kids input:focus,
.theme-kids textarea:focus,
.theme-kids select:focus {
    border-color: #f093fb !important;
    box-shadow: 0 0 0 4px rgba(240, 147, 251, 0.3) !important;
}

/* Opciones de respuesta (radio buttons y checkboxes) */
.theme-kids input[type="radio"],
.theme-kids input[type="checkbox"] {
    transform: scale(1.5) !important;
    margin-right: 12px !important;
}

/* Labels */
.theme-kids label {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #4F46E5 !important;
    font-family: 'Comic Sans MS', cursive !important;
}

/* Texto de pregunta */
.theme-kids .text-lg,
.theme-kids .text-base,
.theme-kids p {
    font-size: 20px !important;
    line-height: 1.6 !important;
    color: #1F2937 !important;
}

/* Decoraciones flotantes */
.theme-kids .bg-white::before {
    content: '⭐';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 50px;
    animation: float 2s ease-in-out infinite, rainbow 3s linear infinite;
}

.theme-kids .bg-white::after {
    content: '🌟';
    position: absolute;
    bottom: -20px;
    left: -20px;
    font-size: 50px;
    animation: float 2s ease-in-out infinite;
    animation-delay: 1s;
}

/* Alertas y mensajes */
.theme-kids .bg-red-50,
.theme-kids .bg-green-50,
.theme-kids .bg-yellow-50,
.theme-kids .bg-blue-50 {
    border-radius: 20px !important;
    border: 4px solid !important;
    padding: 20px !important;
    font-size: 16px !important;
    animation: bounce 0.5s ease !important;
}

/* Progreso */
.theme-kids .bg-gray-200 {
    border-radius: 50px !important;
    overflow: hidden !important;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.2),
                0 4px 15px rgba(0,0,0,0.1) !important;
    border: 4px solid #ffd700 !important;
}

/* Timer específico */
.theme-kids .timer,
.theme-kids .time-display {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%) !important;
    color: white !important;
    padding: 15px 30px !important;
    border-radius: 50px !important;
    font-size: 24px !important;
    font-weight: bold !important;
    box-shadow: 0 5px 20px rgba(255,107,107,0.5) !important;
    animation: pulse-grow 1s ease-in-out infinite !important;
}

/* Animaciones adicionales */
@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .theme-kids h1 { font-size: 28px !important; }
    .theme-kids h2 { font-size: 24px !important; }
    .theme-kids h3 { font-size: 20px !important; }
    .theme-kids .btn { padding: 12px 24px !important; font-size: 16px !important; }
}
