/* ==========================================================================
   MINIJUEGO PESCA EN EL RÍO (CARPINCHO PESCADOR) - JUEGO DE NOVIEMBRE
   ========================================================================== */

/* Botón en la pantalla principal (mismo estilo unificado que los demás) */
.controls .btn-fishing-game {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(135deg, #fde047 0%, #d4af37 50%, #996515 100%) !important;
    color: #07070a !important;
    border: 2px solid #ffffff !important;
    border-radius: 16px !important;
    padding: 0.8rem 1.25rem !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.85rem !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255,255,255,0.6) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    overflow: hidden;
    box-sizing: border-box !important;
    min-height: 64px;
}

.controls .btn-fishing-game:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.55), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}

.controls .btn-fishing-game:active {
    transform: translateY(1px) scale(0.99);
}

.fisher-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #0f111a;
    border: 2px solid #07070a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.btn-fishing-game:hover .fisher-avatar-img {
    transform: rotate(6deg) scale(1.1);
}

.fishing-nov-pill {
    display: inline-block;
    background: #07070a;
    color: #fde047;
    font-size: 0.62rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 4px;
}

/* Modal */
.fishing-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.fishing-modal.hidden {
    display: none !important;
}

.fishing-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 7, 10, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.fishing-game-card {
    position: relative;
    z-index: 2;
    background: #0c121e;
    border: 2px solid #d4af37;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.22);
    width: 100%;
    max-width: 820px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    animation: fishingPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fishingPopIn {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.fishing-game-header {
    background: linear-gradient(180deg, #121c2e 0%, #0b111c 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.fishing-badge {
    font-size: 0.72rem;
    font-weight: 800;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#fishingGameTitle {
    margin: 2px 0 0 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

/* Escenario del Río */
.fishing-stage-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 58vh;
    background: #07131e;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
    transition: max-height 0.35s ease;
}

.fishing-stage-container.stage-completed {
    max-height: 30vh;
}

.fishing-stage-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Línea de pesca SVG */
.fishing-line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 6;
    pointer-events: none;
}

/* Capa interactiva de boyas en el río */
.fishing-interactive-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: auto;
}

/* Boyas de pesca flotantes */
.river-bobber-spot {
    position: absolute;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.river-bobber-spot:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.river-bobber-spot.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.river-bobber-spot.caught {
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    transition: all 0.3s ease;
}

.bobber-ripple {
    position: absolute;
    width: 42px;
    height: 20px;
    bottom: 4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.75);
    animation: riverRipple 2s infinite ease-out;
    pointer-events: none;
}

@keyframes riverRipple {
    0% { transform: scale(0.5); opacity: 0.9; }
    100% { transform: scale(1.55); opacity: 0; }
}

.bobber-float {
    position: relative;
    width: 24px;
    height: 30px;
    animation: bobberFloat 2.2s ease-in-out infinite;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55));
}

@keyframes bobberFloat {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-5px) rotate(4deg); }
}

.bobber-float.biting {
    animation: bobberBite 0.16s ease-in-out infinite;
}

@keyframes bobberBite {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(7px) scale(0.92); }
}

/* Carpincho Pescador en el muelle */
.fisher-sprite {
    position: absolute;
    left: 25%;
    top: 44%;
    width: 17%;
    max-width: 145px;
    min-width: 78px;
    transform: translate(-50%, -58%);
    z-index: 7;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
}

.fisher-sprite img {
    width: 100%;
    height: auto;
    display: block;
}

.fisher-sprite.idle-bob {
    animation: fisherIdleBob 2.6s ease-in-out infinite;
}

@keyframes fisherIdleBob {
    0%, 100% { transform: translate(-50%, -58%) translateY(0); }
    50% { transform: translate(-50%, -58%) translateY(-3px); }
}

.fisher-sprite.catching {
    animation: fisherPull 0.4s ease-in-out infinite alternate;
}

@keyframes fisherPull {
    0% { transform: translate(-50%, -58%) rotate(-3deg) scale(1.03); }
    100% { transform: translate(-50%, -58%) rotate(3deg) scale(1.06); }
}

/* Bolilla dorada pescada */
.fished-ball-reveal {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fde047 0%, #d4af37 60%, #b45309 100%);
    border: 3px solid #ffffff;
    color: #07070a;
    font-size: 1.25rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(253, 224, 71, 0.8), 0 0 18px rgba(56, 189, 248, 0.7);
    z-index: 12;
    transform: translate(-50%, -50%) scale(0);
    animation: fishedBallJump 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: none;
}

@keyframes fishedBallJump {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
    35% { transform: translate(-50%, -140%) scale(1.25); opacity: 1; }
    75% { transform: translate(-50%, -115%) scale(1.08); opacity: 1; }
    100% { transform: translate(-50%, -170%) scale(0.75); opacity: 0; }
}

/* Partículas de agua */
.water-particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.water-splash-drop {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffffff 10%, #7dd3fc 80%);
    pointer-events: none;
    animation: waterSplashFly 0.6s ease-out forwards;
}

@keyframes waterSplashFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0.25);
        opacity: 0;
    }
}

/* Footer */
.fishing-game-footer {
    padding: 14px 18px;
    background: #0b111c;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    flex-shrink: 0;
}

.fishing-status-msg {
    font-size: 0.95rem;
    color: #e2e8f0;
    font-weight: 500;
}

.fishing-status-msg.hidden {
    display: none;
}

/* Responsive móvil */
@media (max-width: 600px) {
    .fishing-game-header {
        padding: 8px 12px;
    }
    #fishingGameTitle {
        font-size: 1rem;
    }
    .river-bobber-spot {
        width: 40px;
        height: 40px;
    }
    .bobber-float {
        width: 20px;
        height: 25px;
    }
    .fishing-stage-container {
        aspect-ratio: 4 / 3;
        max-height: 55vh;
    }
}

/* ==========================================================================
   POPUP DE BIENVENIDA: SELECTOR DE MINIJUEGOS
   ========================================================================== */
.welcome-games-modal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
}

.welcome-games-modal.hidden {
    display: none !important;
}

.welcome-games-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 7, 10, 0.84);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.welcome-games-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #131826 0%, #0b0e17 100%);
    border: 2px solid #d4af37;
    border-radius: 22px;
    padding: 22px 20px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 36px rgba(212, 175, 55, 0.25);
    text-align: center;
    animation: fishingPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.welcome-games-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f8fafc;
    font-size: 1.45rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.welcome-games-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.welcome-games-pill {
    display: inline-block;
    background: rgba(212, 175, 55, 0.16);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #fde047;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.welcome-games-title {
    margin: 0 0 6px 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    padding-right: 28px;
    padding-left: 28px;
}

.welcome-games-sub {
    margin: 0 0 16px 0;
    font-size: 0.88rem;
    color: #cbd5e1;
}

.welcome-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.welcome-game-option {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #0f1523;
    border: 2px solid rgba(212, 175, 55, 0.55);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s, box-shadow 0.22s;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.welcome-game-option:hover {
    transform: translateY(-4px) scale(1.015);
    border-color: #fde047;
    box-shadow: 0 14px 32px rgba(212, 175, 55, 0.35);
}

.welcome-game-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #070b13;
}

.welcome-game-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.welcome-game-option:hover .welcome-game-thumb {
    transform: scale(1.06);
}

.welcome-game-avatar {
    position: absolute;
    bottom: 8px;
    left: 10px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #fde047;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    background: #0b0e17;
}

.welcome-game-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #fde047 0%, #d4af37 100%);
    color: #07070a;
    font-size: 0.68rem;
    font-weight: 900;
    padding: 3px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.welcome-game-tag.tag-new {
    background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
    color: #ffffff;
}

.welcome-game-info {
    padding: 11px 12px 13px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.welcome-game-info strong {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
}

.welcome-game-info span:not(.welcome-game-cta) {
    font-size: 0.79rem;
    color: #cbd5e1;
    line-height: 1.3;
}

.welcome-game-cta {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    font-size: 0.84rem;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 9px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

#welcomePickFishingBtn .welcome-game-cta {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.welcome-games-skip {
    background: linear-gradient(135deg, #fde047 0%, #d4af37 50%, #996515 100%);
    border: 2px solid #ffffff;
    color: #07070a;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.welcome-games-skip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

@media (max-width: 600px) {
    .welcome-games-modal {
        padding: 10px;
    }
    .welcome-games-card {
        padding: 14px 12px 12px;
        border-radius: 18px;
    }
    .welcome-games-close {
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
    .welcome-games-pill {
        font-size: 0.66rem;
        padding: 3px 9px;
        margin-bottom: 5px;
    }
    .welcome-games-title {
        font-size: 1.05rem;
        margin-bottom: 3px;
        padding-left: 24px;
        padding-right: 24px;
    }
    .welcome-games-sub {
        font-size: 0.76rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    .welcome-games-grid {
        grid-template-columns: 1fr;
        gap: 9px;
        margin-bottom: 10px;
    }
    .welcome-game-option {
        flex-direction: row;
        align-items: stretch;
        border-radius: 13px;
    }
    .welcome-game-thumb-wrap {
        width: 112px;
        min-width: 112px;
        aspect-ratio: auto;
        min-height: 92px;
    }
    .welcome-game-avatar {
        width: 34px;
        height: 34px;
        bottom: 6px;
        left: 6px;
    }
    .welcome-game-tag {
        top: 6px;
        left: 6px;
        right: auto;
        font-size: 0.56rem;
        padding: 2px 6px;
    }
    .welcome-game-info {
        padding: 8px 10px;
        flex: 1;
        justify-content: center;
        gap: 2px;
    }
    .welcome-game-info strong {
        font-size: 0.92rem;
    }
    .welcome-game-info span:not(.welcome-game-cta) {
        font-size: 0.73rem;
        line-height: 1.25;
    }
    .welcome-game-cta {
        margin-top: 5px;
        padding: 5px 10px;
        font-size: 0.76rem;
        border-radius: 7px;
    }
    .welcome-games-skip {
        font-size: 0.8rem;
        padding: 7px 14px;
        width: 100%;
    }
}

