/* =====================================================
   EL VOL DE LA LULA — CSS
   ===================================================== */

.lula-section {
    padding-top: calc(var(--header-h) + 1rem);
    padding-bottom: 2rem;
    min-height: calc(100vh - 80px);
}

.lula-panel {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    position: relative;
}

/* ==================== INICI ==================== */
.lula-char-preview {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 1rem;
}

.lula-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 900;
    color: var(--verde);
    margin-bottom: .5rem;
}

.lula-intro {
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: .35rem;
}

.lula-hint {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.lula-start-items {
    display: flex;
    gap: .5rem;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

/* ==================== JOC ==================== */
.lula-exit-btn {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
    font-size: .9rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    z-index: 5;
}

.lula-exit-btn:hover {
    background: var(--verde);
    color: var(--white);
}

.lula-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    margin-bottom: .5rem;
    font-weight: 800;
}

.lula-level-label {
    color: var(--verde);
    font-size: .95rem;
}

.lula-timer {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text);
    background: var(--bg);
    padding: .25rem .75rem;
    border-radius: var(--r-full);
    min-width: 55px;
    text-align: center;
    transition: color .2s ease, background .2s ease;
}

.lula-timer-danger {
    color: #e53935;
    background: #ffebee;
    animation: lula-pulse .5s ease infinite alternate;
}

@keyframes lula-pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

/* Progress */
.lula-progress {
    display: flex;
    gap: .4rem;
    justify-content: center;
    margin-bottom: .75rem;
}

.lula-dot {
    font-size: 1.1rem;
    opacity: .3;
    transition: opacity .2s ease, transform .2s ease;
}

.lula-dot-done { opacity: 1; }
.lula-dot-current { opacity: 1; transform: scale(1.25); }

/* Canvas */
.lula-canvas-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: .5rem;
    touch-action: none;
}

#lula-canvas {
    border-radius: var(--r);
    border: 3px solid var(--verde);
    cursor: pointer;
    touch-action: none;
}

/* Feedback */
.lula-feedback {
    font-size: .95rem;
    font-weight: 700;
    color: #e53935;
    margin-top: .5rem;
    animation: lula-shake .4s ease;
}

@keyframes lula-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ==================== VICTÒRIA NIVELL ==================== */
.lula-win-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 900;
    color: var(--verde);
    margin-bottom: .5rem;
}

.lula-win-score {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

/* ==================== TEMPS ESGOTAT ==================== */
.lula-timeup-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 900;
    color: #e53935;
    margin-bottom: .5rem;
}

.lula-timeup-msg {
    font-size: 1.05rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ==================== FINAL ==================== */
.lula-char-winner {
    animation: lula-fly 1s ease infinite alternate;
}

@keyframes lula-fly {
    0%   { transform: translateY(0) rotate(-5deg); }
    100% { transform: translateY(-10px) rotate(5deg); }
}

.lula-final-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    color: var(--verde);
    margin-bottom: .4rem;
}

.lula-final-msg {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.lula-final-items {
    display: flex;
    gap: .5rem;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.lula-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .lula-panel { padding: 1.25rem .75rem; }
    .lula-char-preview { width: 60px; height: 60px; }
    .lula-actions { flex-direction: column; align-items: stretch; }
}
