/* =====================================================
   RECICLA BÉ! — CSS
   ===================================================== */

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

.recicla-panel {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    text-align: center;
}

.recicla-game-panel {
    position: relative;
    padding: 1.5rem 2rem 2rem;
}

/* ==================== INICI ==================== */
.recicla-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 900;
    color: var(--verde);
    margin-bottom: .5rem;
}

.recicla-intro {
    font-size: 1.15rem;
    color: var(--text);
    margin-bottom: .3rem;
}

.recicla-hint {
    font-size: .95rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

/* ==================== JOC ==================== */
.recicla-game-top {
    position: relative;
    margin-bottom: 1rem;
}

.recicla-exit {
    position: absolute;
    top: 0;
    right: 0;
    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, color .15s;
}

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

.recicla-score-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: .5rem 0;
}

.recicla-score-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.recicla-score {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--verde);
    transition: transform .15s ease;
}

.recicla-score.bump {
    animation: score-bump .3s ease;
}

@keyframes score-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.recicla-plus {
    background: var(--verde);
    color: var(--white);
    font-size: .8rem;
    font-weight: 900;
    padding: .15rem .5rem;
    border-radius: var(--r-full);
    opacity: 0;
}

.recicla-plus.show {
    animation: plus-pop .8s ease forwards;
}

@keyframes plus-pop {
    0%   { opacity: 0; transform: translateY(4px) scale(.8); }
    15%  { opacity: 1; transform: translateY(0) scale(1.15); }
    50%  { opacity: 1; transform: translateY(-6px) scale(1); }
    100% { opacity: 0; transform: translateY(-14px) scale(.9); }
}

.recicla-timer {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text);
    background: var(--bg);
    padding: .2rem .6rem;
    border-radius: var(--r-full);
    min-width: 50px;
    text-align: center;
}

.recicla-remaining {
    font-size: .95rem;
    font-weight: 700;
    color: var(--muted);
    transition: transform .15s ease;
}

.recicla-remaining.tick {
    animation: remaining-tick .3s ease;
}

@keyframes remaining-tick {
    0% { transform: scale(1); }
    50% { transform: scale(.85); color: var(--verde); }
    100% { transform: scale(1); }
}

.recicla-sound-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
}

.recicla-sound-btn.muted {
    opacity: .4;
}

/* ==================== OBJECTES ==================== */
.recicla-objects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
    min-height: 100px;
    padding: 1rem 0;
    margin-bottom: 1.25rem;
}

.recicla-obj {
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    padding: .4rem;
    background: var(--white);
    border-radius: var(--r);
    border: 2px solid var(--bg);
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: transform .15s, box-shadow .15s, opacity .15s;
}

.recicla-obj:hover {
    border-color: var(--verde);
    transform: scale(1.05);
}

.recicla-obj.dragging {
    opacity: .7;
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    cursor: grabbing;
    z-index: 100;
    position: fixed;
    pointer-events: none;
}

.recicla-obj.correct {
    animation: recicla-pop .4s ease forwards;
}

.recicla-obj.wrong {
    animation: recicla-shake .4s ease;
}

@keyframes recicla-pop {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: .5; }
    100% { transform: scale(0); opacity: 0; }
}

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

.recicla-obj-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    pointer-events: none;
}

.recicla-obj-emoji {
    font-size: 2.2rem;
    line-height: 1;
    pointer-events: none;
}

.recicla-obj-name {
    font-size: .7rem;
    font-weight: 700;
    color: var(--muted);
    line-height: 1;
    pointer-events: none;
    text-align: center;
}

/* ==================== FEEDBACK ==================== */
.recicla-feedback {
    font-size: 1rem;
    font-weight: 800;
    padding: .6rem 1rem;
    border-radius: var(--r-full);
    text-align: center;
    margin-bottom: .75rem;
    animation: recicla-feedback-in .3s ease;
}

.recicla-feedback-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.recicla-feedback-ko {
    background: #ffebee;
    color: #c62828;
}

@keyframes recicla-feedback-in {
    0% { transform: translateY(-8px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ==================== CONTENIDORS ==================== */
.recicla-bins {
    display: flex;
    justify-content: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.recicla-bin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    padding: 1rem .75rem;
    border-radius: var(--r-lg);
    background: var(--white);
    border: 3px solid var(--bg);
    min-width: 95px;
    transition: border-color .15s, background .15s, transform .15s;
}

.recicla-bin.drag-over {
    border-color: var(--verde);
    background: #f0f7e0;
    transform: scale(1.05);
}

.recicla-bin-char {
    width: 60px;
    height: 60px;
    object-fit: contain;
    pointer-events: none;
}

.recicla-bin-label {
    font-size: .8rem;
    font-weight: 800;
    color: var(--white);
    padding: .15rem .5rem;
    border-radius: var(--r-full);
    pointer-events: none;
}

/* ==================== RESULTAT ==================== */
.recicla-result-char {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto 1rem;
}

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

.recicla-result-score {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .35rem;
}

.recicla-result-msg {
    font-size: 1.05rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: .75rem;
}

.recicla-result-errors {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: .5rem;
}

.recicla-result-tip {
    font-size: .95rem;
    font-weight: 700;
    color: var(--verde);
    background: var(--bg);
    padding: .75rem 1rem;
    border-radius: var(--r);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .recicla-obj {
        width: 74px;
        height: 74px;
    }

    .recicla-obj-img {
        width: 40px;
        height: 40px;
    }

    .recicla-bin {
        min-width: 58px;
        padding: .6rem .4rem;
    }

    .recicla-bin-char {
        width: 42px;
        height: 42px;
    }

    .recicla-bin-label {
        font-size: .65rem;
    }

    .recicla-panel {
        padding: 1.5rem 1rem;
    }

    .recicla-result-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
