/* ============================================
   TH - La Coti | Custom CSS
   Prefixed with th- to avoid conflicts with demo-crss
   ============================================ */

/* --- Mesh Gradient Dynamic Background --- */
.th-mesh-gradient-bg {
    background:
        radial-gradient(at 0% 0%, hsla(270, 80%, 12%, 1) 0, transparent 50%),
        radial-gradient(at 80% 100%, hsla(30, 90%, 10%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(240, 80%, 10%, 1) 0, transparent 50%),
        radial-gradient(at 40% 60%, hsla(280, 60%, 8%, 1) 0, transparent 60%) !important;
    background-color: #0a0a12 !important;
    background-size: 200% 200%;
    animation: thMeshFlow 15s ease infinite alternate;
}

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

/* --- Glassmorphism Cards --- */
.th-glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.th-glass-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* --- Animations --- */
@keyframes thFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.th-animate-fade-in {
    opacity: 0;
    animation: thFadeIn 0.8s ease-out forwards;
}

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

.th-hero-float {
    animation: thFloat 5s ease-in-out infinite;
}

/* Pulse glow for quest number */
@keyframes thPulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(245, 158, 11, 0.4);
    }
}

.th-pulse-glow {
    animation: thPulseGlow 3s ease-in-out infinite;
}

/* --- Progress Bar --- */
.th-progress-step {
    transition: all 0.3s ease;
}

.th-progress-step.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.th-progress-step.completed {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
}

.th-progress-step.locked {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Answer Buttons --- */
.th-answer-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.th-answer-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.th-answer-btn:hover::before {
    opacity: 1;
}

.th-answer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
}

.th-answer-btn:active {
    transform: translateY(0);
}

/* --- Confetti --- */
@keyframes thConfettiDrop {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(300px) rotate(720deg) scale(0);
    }
}

.th-confetti-particle {
    position: fixed;
    top: -10px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: thConfettiDrop 2s ease-out forwards;
    z-index: 100;
    pointer-events: none;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .th-mesh-gradient-bg {
        animation: none !important;
    }
    .th-hero-float,
    .th-pulse-glow,
    .th-animate-fade-in {
        animation: none !important;
        opacity: 1 !important;
    }
}
