
/* =========================================================
   JUEGO DE CARTAS - DIADESUERTE
   Archivo: /assets/css/juega-y-gana.css
========================================================= */

.jyg-page {
    background:
        radial-gradient(circle at 85% 10%, rgba(24, 211, 211, .16), transparent 30%),
        radial-gradient(circle at 10% 0%, rgba(21, 87, 255, .10), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.jyg-hero {
    padding: 70px 0 48px;
    text-align: center;
}

.jyg-hero .hero-badge,
.jyg-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: 999px;
    background: rgba(255, 246, 216, .96);
    border: 1px solid #f0cd67;
    color: #9a6800;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.jyg-hero h1 {
    margin: 18px auto 14px;
    max-width: 850px;
    color: #071a3d;
    font-family: var(--font-title, "Outfit", "Manrope", Arial, sans-serif);
    font-size: clamp(42px, 7vw, 86px);
    line-height: .88;
    letter-spacing: -.065em;
}

.jyg-hero p {
    max-width: 680px;
    margin: 0 auto;
    color: #5d708c;
    font-size: 17px;
    line-height: 1.6;
    font-weight: 700;
}

.jyg-section {
    padding: 38px 0 80px;
}

.jyg-layout {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 28px;
    align-items: start;
}

.jyg-panel {
    background: rgba(255,255,255,.96);
    border: 1px solid #dce7f5;
    border-radius: 30px;
    box-shadow: 0 20px 52px rgba(7, 26, 61, .08);
    padding: 28px;
}

.jyg-panel h2 {
    margin: 12px 0 10px;
    color: #071a3d;
    font-family: var(--font-title, "Outfit", "Manrope", Arial, sans-serif);
    font-size: clamp(28px, 3vw, 42px);
    line-height: .95;
    letter-spacing: -.045em;
}

.jyg-panel p {
    color: #5d708c;
    line-height: 1.6;
    font-weight: 700;
}

.jyg-form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.jyg-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.jyg-field {
    display: grid;
    gap: 8px;
}

.jyg-field label {
    color: #071a3d;
    font-weight: 900;
}

.jyg-field input {
    width: 100%;
    min-height: 52px;
    padding: 13px 15px;
    border-radius: 17px;
    border: 1px solid #cfe0f4;
    background: #fff;
    color: #071a3d;
    font: inherit;
    font-weight: 700;
    outline: none;
}

.jyg-field input:focus {
    border-color: #1557ff;
    box-shadow: 0 0 0 4px rgba(21,87,255,.12);
}

.jyg-privacy-box {
    padding: 14px 16px;
    border-radius: 18px;
    background: #eef7ff;
    border: 1px solid #d7e6fb;
    color: #607492;
    line-height: 1.5;
    font-weight: 750;
}

.game-message {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f1f5f9;
    color: #071a3d;
    font-weight: 850;
}

.game-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.game-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.game-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 22px 0;
}

.game-info-grid div {
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #dce7f5;
    border-radius: 18px;
}

.game-info-grid small {
    display: block;
    margin-bottom: 5px;
    color: #667a96;
    font-weight: 850;
}

.game-info-grid strong {
    display: block;
    color: #071a3d;
    font-size: 1.05rem;
    line-height: 1.15;
}

.jyg-cards-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
    transition: .3s ease;
}

.jyg-cards-grid.is-shuffling {
    pointer-events: none;
    transform: scale(.985);
    opacity: .94;
}

.jyg-card {
    position: relative;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: .22s ease;
    will-change: transform;
}

.jyg-card.disabled {
    cursor: not-allowed;
    opacity: .68;
}

.jyg-card:not(.disabled):hover {
    transform: translateY(-7px) scale(1.02);
}

.jyg-card:not(.disabled):active {
    transform: scale(.96);
}

.jyg-card-inner {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    overflow: hidden;
    background: #071a3d;
    border: 3px solid #fff;
    box-shadow: 0 14px 30px rgba(7, 26, 61, .13);
}

.jyg-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.jyg-card-inner span {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(7, 26, 61, .88);
    color: #fff;
    font-weight: 950;
}

.jyg-card.flipped .jyg-card-inner {
    animation: flipCardJyg .45s ease both;
}

.jyg-card.winner .jyg-card-inner {
    animation: winnerGlowJyg 1.1s ease infinite alternate;
}

.jyg-card.loser .jyg-card-inner {
    animation: loserShakeJyg .28s ease;
    filter: grayscale(.18);
}

.jyg-card.mixing .jyg-card-inner {
    box-shadow:
        0 18px 36px rgba(7, 26, 61, .25),
        0 0 0 4px rgba(240, 181, 42, .22);
}

.game-rules-list {
    margin: 18px 0 0;
    padding-left: 20px;
    color: #5d708c;
    line-height: 1.75;
    font-weight: 700;
}

.confeti-ryr {
    position: fixed;
    top: -24px;
    z-index: 99999;
    border-radius: 4px;
    pointer-events: none;
    opacity: .95;
    animation-name: confetiFallJyg;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes flipCardJyg {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(90deg) scale(.97); }
    100% { transform: rotateY(0deg) scale(1); }
}

@keyframes winnerGlowJyg {
    0% {
        box-shadow:
            0 0 0 5px rgba(240, 181, 42, .28),
            0 12px 28px rgba(7, 26, 61, .16);
        transform: scale(1);
    }
    100% {
        box-shadow:
            0 0 0 8px rgba(240, 181, 42, .52),
            0 18px 42px rgba(240, 181, 42, .32);
        transform: scale(1.025);
    }
}

@keyframes loserShakeJyg {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

@keyframes confetiFallJyg {
    0% { transform: translateY(-30px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(112vh) rotate(920deg); opacity: 0; }
}

@media (max-width: 980px) {
    .jyg-layout {
        grid-template-columns: 1fr;
    }

    .game-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .jyg-hero {
        padding: 44px 0 28px;
    }

    .jyg-panel {
        padding: 20px;
        border-radius: 24px;
    }

    .jyg-form-grid,
    .game-info-grid {
        grid-template-columns: 1fr;
    }

    .jyg-cards-grid {
        gap: 9px;
    }

    .jyg-card-inner {
        border-radius: 16px;
        border-width: 2px;
    }

    .jyg-card-inner span {
        width: 28px;
        height: 28px;
        font-size: .8rem;
    }
}

/* =========================================================
   CASINO UPGRADE - JUEGA Y GANA
========================================================= */
.jyg-page {
    background:
        radial-gradient(circle at 18% 2%, rgba(24,240,255,.18), transparent 30%),
        radial-gradient(circle at 86% 4%, rgba(246,197,86,.18), transparent 30%),
        linear-gradient(180deg, #030713 0%, #081126 45%, #030713 100%) !important;
    color: #f8fbff !important;
}
.jyg-hero {
    position: relative;
    padding-top: 80px !important;
}
.jyg-hero::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 22px;
    width: min(820px, 90vw);
    height: 170px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(246,197,86,.20), transparent 64%);
    filter: blur(20px);
    pointer-events: none;
}
.jyg-hero h1 {
    color: #ffffff !important;
    text-transform: uppercase;
    text-shadow: 0 5px 0 rgba(0,0,0,.34), 0 0 32px rgba(246,197,86,.22) !important;
}
.jyg-panel {
    background:
        radial-gradient(circle at 15% 0%, rgba(24,240,255,.14), transparent 32%),
        linear-gradient(145deg, rgba(11,19,43,.94), rgba(5,8,20,.98)) !important;
    border-color: rgba(246,197,86,.30) !important;
    box-shadow: 0 28px 90px rgba(0,0,0,.46), 0 0 32px rgba(24,240,255,.10) !important;
}
.jyg-card {
    perspective: 1000px;
}
.jyg-card-inner,
.card-inner {
    background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,.14), transparent 32%),
        linear-gradient(145deg, #07142f, #02040c) !important;
    border: 2px solid rgba(246,197,86,.48) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.38), 0 0 24px rgba(246,197,86,.16) !important;
}
.jyg-card:not(.disabled):hover .jyg-card-inner,
.jyg-card:not(.disabled):hover .card-inner {
    transform: translateY(-7px) rotateX(4deg) !important;
    box-shadow: 0 24px 52px rgba(0,0,0,.46), 0 0 36px rgba(246,197,86,.30) !important;
}
.card-back,
.jyg-card-back,
.card-front,
.jyg-card-front {
    background:
        radial-gradient(circle at 50% 20%, rgba(246,197,86,.24), transparent 35%),
        repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 7px, transparent 7px 14px),
        linear-gradient(145deg, #081d45, #030713) !important;
    color: #fff7d4 !important;
}
.jyg-card.winner,
.jyg-card.winner .jyg-card-inner,
.jyg-card.winner .card-inner {
    box-shadow: 0 0 0 4px rgba(246,197,86,.25), 0 0 50px rgba(246,197,86,.55) !important;
}
.game-message,
.jyg-message,
#gameMessage,
#formMessage {
    background: rgba(255,255,255,.08) !important;
    color: #f8fbff !important;
    border: 1px solid rgba(246,197,86,.26) !important;
}


/* =========================================================
   JUEGA Y GANA - MODO CASINO OSCURO
   Igualado visualmente con la página Juegos.
   Este bloque va al final del archivo y pisa el modo claro.
========================================================= */

html body .jyg-page {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 0%, rgba(24,240,255,.16), transparent 30%),
        radial-gradient(circle at 86% 5%, rgba(246,197,86,.18), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(21,87,255,.16), transparent 42%),
        linear-gradient(180deg, #030713 0%, #081126 46%, #030713 100%) !important;
    color: rgba(231,240,255,.86) !important;
}

html body .jyg-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .36;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.16) 1px, transparent 1.5px),
        linear-gradient(rgba(246,197,86,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24,240,255,.026) 1px, transparent 1px);
    background-size: 42px 42px, 68px 68px, 68px 68px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 86%);
}

html body .jyg-hero {
    position: relative;
    z-index: 1;
    padding: 58px 0 34px !important;
    text-align: center;
}

html body .jyg-hero .hero-badge,
html body .jyg-section-kicker {
    background: rgba(246,197,86,.12) !important;
    color: #fff0b7 !important;
    border: 1px solid rgba(246,197,86,.34) !important;
    box-shadow: 0 0 24px rgba(246,197,86,.14) !important;
}

html body .jyg-hero h1,
html body .jyg-panel h2,
html body .game-play-header h2 {
    color: #ffffff !important;
    text-shadow:
        0 4px 0 rgba(0,0,0,.26),
        0 0 26px rgba(246,197,86,.20) !important;
}

html body .jyg-hero p,
html body .jyg-panel p,
html body .game-play-header p,
html body .game-rules-list,
html body .game-rules-list li {
    color: rgba(231,240,255,.78) !important;
}

html body .jyg-section {
    position: relative;
    z-index: 1;
    padding: 34px 0 86px !important;
}

html body .jyg-panel {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 0%, rgba(24,240,255,.12), transparent 34%),
        radial-gradient(circle at 90% 12%, rgba(246,197,86,.14), transparent 30%),
        linear-gradient(145deg, rgba(11,19,43,.94), rgba(5,8,20,.98)) !important;
    border: 1px solid rgba(246,197,86,.30) !important;
    box-shadow:
        0 30px 90px rgba(0,0,0,.48),
        0 0 34px rgba(24,240,255,.10),
        inset 0 1px 0 rgba(255,255,255,.07) !important;
}

html body .jyg-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg,#f6c556,#18f0ff,#0b63ff,#f6c556);
    box-shadow: 0 0 28px rgba(24,240,255,.25);
}

html body .jyg-field label {
    color: #ffe79a !important;
}

html body .jyg-field input {
    background: rgba(255,255,255,.075) !important;
    border: 1px solid rgba(246,197,86,.24) !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05) !important;
}

html body .jyg-field input::placeholder {
    color: rgba(231,240,255,.55) !important;
}

html body .jyg-privacy-box,
html body .game-message,
html body .game-info-grid > div {
    background:
        radial-gradient(circle at 20% 0%, rgba(246,197,86,.10), transparent 40%),
        linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.035)) !important;
    border: 1px solid rgba(246,197,86,.26) !important;
    color: rgba(231,240,255,.78) !important;
}

html body .game-info-grid small {
    color: rgba(231,240,255,.66) !important;
}

html body .game-info-grid strong {
    color: #fff0b7 !important;
}

/* Cartas: mantener imagen, mejorar marco casino */
html body .jyg-card {
    background: transparent !important;
}

html body .jyg-card-inner {
    border-radius: 22px !important;
    background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025)) !important;
    border: 1px solid rgba(246,197,86,.38) !important;
    box-shadow:
        0 18px 38px rgba(0,0,0,.34),
        0 0 18px rgba(24,240,255,.08) !important;
}

html body .jyg-card-inner span {
    background: linear-gradient(135deg,#fff0af,#d99f27) !important;
    color: #071326 !important;
    border: 1px solid rgba(255,255,255,.60) !important;
    box-shadow: 0 8px 18px rgba(0,0,0,.24) !important;
}

html body .btn.btn-primary,
html body .jyg-form .btn-primary {
    background: linear-gradient(135deg, #fff0af 0%, #f6c556 45%, #d99f27 100%) !important;
    color: #201400 !important;
    border: 1px solid rgba(255,255,255,.34) !important;
    box-shadow: 0 0 28px rgba(246,197,86,.20), 0 18px 34px rgba(0,0,0,.24) !important;
}

html body .jyg-card:not(.disabled):hover .jyg-card-inner {
    transform: translateY(-5px);
    box-shadow: 0 26px 56px rgba(0,0,0,.42), 0 0 26px rgba(246,197,86,.18) !important;
}

@media (max-width: 760px) {
    html body .jyg-hero {
        padding-top: 36px !important;
    }

    html body .jyg-layout,
    html body .jyg-form-grid {
        grid-template-columns: 1fr !important;
    }

    html body .jyg-panel {
        border-radius: 24px !important;
    }
}
