html,
body {
    margin: 0px;
    background-color: #2f4f30;
    color: white;
    overflow-x: hidden;
}

.titulo {
    padding: 20px;
    font-size: 25px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: black;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animación de cartas al aparecer */
@keyframes cardDeal {
    0% {
        opacity: 0;
        transform: translateY(-100px) rotate(-15deg) scale(0.5);
    }
    50% {
        transform: translateY(10px) rotate(5deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

/* Efecto de barajas en las cartas */
#jugador-cartas .carta {
    position: relative;
    width: 150px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: cardDeal 0.6s ease-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    cursor: pointer;
}

#jugador-cartas .carta:not(:first-child) {
    margin-left: -75px;
}

/* Efecto hover mejorado */
#jugador-cartas .carta:hover {
    transform: translateY(-30px) rotate(5deg) scale(1.15);
    z-index: 10;
    filter: drop-shadow(0 15px 25px rgba(255, 215, 0, 0.5));
}

/* Efecto de rotación alternada para dar sensación de baraja */
#jugador-cartas .carta:nth-child(odd) {
    transform: rotate(-2deg);
}

#jugador-cartas .carta:nth-child(even) {
    transform: rotate(2deg);
}

#computadora-cartas .carta {
    position: relative;
    width: 150px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: cardDeal 0.6s ease-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    cursor: pointer;
}

#computadora-cartas .carta:not(:first-child) {
    margin-left: -75px;
}

#computadora-cartas .carta:hover {
    transform: translateY(-30px) rotate(-5deg) scale(1.15);
    z-index: 10;
    filter: drop-shadow(0 15px 25px rgba(255, 215, 0, 0.5));
}

#computadora-cartas .carta:nth-child(odd) {
    transform: rotate(2deg);
}

#computadora-cartas .carta:nth-child(even) {
    transform: rotate(-2deg);
}

.carta {
    position: relative;
    width: 150px;
    left: 50px;
    margin-left: -75;
}

#computadora-cartas,
#jugador-cartas {
    height: 230px;
}

/* ============================================ */
/* EFECTOS ESPECTACULARES DE VICTORIA */
/* ============================================ */

/* Contenedor de confeti */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Animación de fuegos artificiales */
@keyframes firework {
    0% {
        transform: translate(0, 0);
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 1);
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y));
        opacity: 0;
        box-shadow: 0 0 50px 20px rgba(255, 215, 0, 0);
    }
}

/* Animación de pulso de victoria */
@keyframes victoryPulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 30px rgba(255, 215, 0, 1),
                     0 0 50px rgba(255, 215, 0, 0.8),
                     0 0 70px rgba(255, 215, 0, 0.6);
    }
}

/* Animación de brillo de fondo */
@keyframes victoryGlow {
    0%, 100% {
        background-color: #2f4f30;
        box-shadow: inset 0 0 0 rgba(255, 215, 0, 0);
    }
    50% {
        background-color: #3a5f3a;
        box-shadow: inset 0 0 100px rgba(255, 215, 0, 0.3);
    }
}

/* Clase para activar victoria */
body.victory {
    animation: victoryGlow 2s ease-in-out infinite;
}

/* Animación del título en victoria */
.titulo.victory {
    animation: victoryPulse 1s ease-in-out infinite;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    background-size: 200% 200%;
    animation: victoryPulse 1s ease-in-out infinite, gradientShift 3s ease infinite;
}

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

/* Efecto de destello en las cartas ganadoras */
@keyframes cardShine {
    0%, 100% {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 1))
                drop-shadow(0 0 50px rgba(255, 215, 0, 0.8))
                brightness(1.3);
    }
}

#jugador-cartas.winner .carta {
    animation: cardShine 1.5s ease-in-out infinite;
}

/* Estrellas brillantes de fondo */
@keyframes twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Efecto de onda expansiva */
@keyframes shockwave {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Mensaje de victoria flotante */
@keyframes floatVictory {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* Animación de rotación de cartas en victoria */
@keyframes victoryCardRotate {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-10deg) scale(1.1);
    }
    75% {
        transform: rotate(10deg) scale(1.1);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}

#jugador-cartas.winner .carta:nth-child(1) {
    animation: victoryCardRotate 2s ease-in-out infinite;
    animation-delay: 0s;
}

#jugador-cartas.winner .carta:nth-child(2) {
    animation: victoryCardRotate 2s ease-in-out infinite;
    animation-delay: 0.2s;
}

#jugador-cartas.winner .carta:nth-child(3) {
    animation: victoryCardRotate 2s ease-in-out infinite;
    animation-delay: 0.4s;
}

#jugador-cartas.winner .carta:nth-child(4) {
    animation: victoryCardRotate 2s ease-in-out infinite;
    animation-delay: 0.6s;
}

#jugador-cartas.winner .carta:nth-child(5) {
    animation: victoryCardRotate 2s ease-in-out infinite;
    animation-delay: 0.8s;
}

/* Botones con efecto brillante */
.btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* ============================================ */
/* ESTILOS DE CASINO PREMIUM */
/* ============================================ */

/* Fichas de casino flotantes en el fondo */
.casino-chips-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.chip {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 4px solid #ffd700;
    background: radial-gradient(circle, #ff4444, #cc0000);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    animation: floatChip 15s infinite ease-in-out;
    opacity: 0.2;
}

.chip::before {
    content: '$';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 24px;
}

.chip-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.chip-2 {
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    background: radial-gradient(circle, #4444ff, #0000cc);
}

.chip-3 {
    top: 30%;
    left: 70%;
    animation-delay: 4s;
    background: radial-gradient(circle, #44ff44, #00cc00);
}

.chip-4 {
    top: 80%;
    left: 20%;
    animation-delay: 6s;
}

.chip-5 {
    top: 50%;
    left: 50%;
    animation-delay: 8s;
    background: radial-gradient(circle, #ff44ff, #cc00cc);
}

@keyframes floatChip {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* Header estilo casino con luces */
.titulo {
    position: relative;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    border-bottom: 4px solid #ffd700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.casino-lights {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 0 20%;
}

.light {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ffd700;
    box-shadow: 0 0 15px #ffd700;
    animation: blink 2s infinite;
}

.light:nth-child(1) { animation-delay: 0s; }
.light:nth-child(2) { animation-delay: 0.4s; }
.light:nth-child(3) { animation-delay: 0.8s; }
.light:nth-child(4) { animation-delay: 1.2s; }
.light:nth-child(5) { animation-delay: 1.6s; }

@keyframes blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 15px #ffd700;
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 5px #ffd700;
    }
}

.casino-title {
    font-size: 48px;
    font-weight: bold;
    letter-spacing: 8px;
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    animation: titleShine 3s infinite;
}

@keyframes titleShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.3);
    }
}

.casino-subtitle {
    font-size: 16px;
    margin-top: 10px;
    color: #ffd700;
    letter-spacing: 3px;
}

.titulo i {
    font-size: 36px;
    color: #ffd700;
    margin: 0 20px;
    animation: pulse 2s infinite;
}

/* Botones estilo casino */
.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.btn-casino {
    position: relative;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    border: 3px solid;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    overflow: hidden;
    min-width: 200px;
}

.btn-casino::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-casino:hover::before {
    width: 300px;
    height: 300px;
}

.btn-casino i {
    margin-right: 10px;
    font-size: 20px;
}

.btn-casino span {
    position: relative;
    z-index: 1;
}

.btn-new {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    border-color: #ff6666;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

.btn-new:hover {
    background: linear-gradient(135deg, #ff6666, #ff4444);
    box-shadow: 0 6px 25px rgba(255, 68, 68, 0.6);
    transform: translateY(-3px);
}

.btn-hit {
    background: linear-gradient(135deg, #44ff44, #00cc00);
    border-color: #66ff66;
    color: #004400;
    box-shadow: 0 4px 15px rgba(68, 255, 68, 0.4);
}

.btn-hit:hover {
    background: linear-gradient(135deg, #66ff66, #44ff44);
    box-shadow: 0 6px 25px rgba(68, 255, 68, 0.6);
    transform: translateY(-3px);
}

.btn-stand {
    background: linear-gradient(135deg, #4444ff, #0000cc);
    border-color: #6666ff;
    color: white;
    box-shadow: 0 4px 15px rgba(68, 68, 255, 0.4);
}

.btn-stand:hover {
    background: linear-gradient(135deg, #6666ff, #4444ff);
    box-shadow: 0 6px 25px rgba(68, 68, 255, 0.6);
    transform: translateY(-3px);
}

.btn-casino:active {
    transform: translateY(0) scale(0.95);
}

.btn-casino:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Separadores decorativos */
.divider {
    text-align: center;
    margin: 30px 0;
    color: #ffd700;
    font-size: 24px;
    position: relative;
    z-index: 10;
}

.divider i {
    margin: 0 15px;
    animation: rotate 3s infinite linear;
}

.divider i:nth-child(2) {
    animation-direction: reverse;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Panel de jugadores estilo premium */
.player-panel {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(20, 40, 20, 0.6));
    border: 2px solid #ffd700;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.2),
                inset 0 0 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

.player-panel:hover {
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.4),
                inset 0 0 50px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.player-icon,
.dealer-icon {
    font-size: 48px;
    margin-right: 20px;
    color: #ffd700;
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px #ffd700);
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 20px #ffd700);
    }
}

.player-title {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 3px;
    margin: 0;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.score-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    padding: 10px 20px;
    border-radius: 25px;
    margin-left: 15px;
    font-size: 28px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    animation: scorePulse 1.5s infinite;
}

@keyframes scorePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.score-badge i {
    margin-right: 8px;
    animation: coinSpin 2s infinite linear;
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.dealer-badge {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
}

.cards-area {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    position: relative;
}

/* Separador VS */
.vs-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    z-index: 10;
}

.vs-text {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    font-size: 36px;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    animation: vsRotate 3s infinite ease-in-out;
}

@keyframes vsRotate {
    0%, 100% {
        transform: rotate(-5deg) scale(1);
    }
    50% {
        transform: rotate(5deg) scale(1.1);
    }
}

/* Modal de resultado */
.result-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.result-modal.show {
    display: flex;
    animation: fadeIn 0.5s;
}

.result-content {
    background: linear-gradient(135deg, #1a1a1a, #000000);
    border: 4px solid #ffd700;
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.5),
                0 0 100px rgba(255, 215, 0, 0.3),
                inset 0 0 30px rgba(255, 215, 0, 0.1);
    animation: modalSlideIn 0.5s;
    position: relative;
    overflow: hidden;
}

.result-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent 30%,
        rgba(255, 215, 0, 0.1) 50%,
        transparent 70%);
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px) rotate(-2deg);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px) rotate(2deg);
    }
}

.result-icon {
    font-size: 100px;
    margin-bottom: 20px;
    animation: iconBounce 0.6s ease-out;
    filter: drop-shadow(0 0 20px currentColor);
    position: relative;
    z-index: 1;
}

@keyframes iconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.result-title {
    font-size: 48px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5),
                 0 0 40px rgba(255, 215, 0, 0.3);
    letter-spacing: 3px;
    animation: titlePulse 0.5s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes titlePulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
        letter-spacing: 10px;
    }
    100% {
        transform: scale(1);
        opacity: 1;
        letter-spacing: 3px;
    }
}

.result-message {
    font-size: 24px;
    color: white;
    line-height: 1.5;
    animation: messageFade 0.8s ease-out;
    position: relative;
    z-index: 1;
}

@keyframes messageFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer estilo casino */
.casino-footer {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #1a1a1a, #000000);
    border-top: 2px solid #ffd700;
    margin-top: 50px;
    position: relative;
    z-index: 10;
}

.footer-icons {
    font-size: 24px;
    color: #ffd700;
    margin-bottom: 15px;
}

.footer-icons i {
    margin: 0 15px;
    animation: bounce 2s infinite;
}

.footer-icons i:nth-child(1) { animation-delay: 0s; }
.footer-icons i:nth-child(2) { animation-delay: 0.2s; }
.footer-icons i:nth-child(3) { animation-delay: 0.4s; }
.footer-icons i:nth-child(4) { animation-delay: 0.6s; }

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

.casino-footer p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

/* ============================================ */
/* RESPONSIVIDAD MÓVIL - OPTIMIZADO */
/* ============================================ */

/* Tablets y dispositivos medianos */
@media (max-width: 992px) {
    .casino-title {
        font-size: 38px;
        letter-spacing: 5px;
    }

    .casino-lights {
        padding: 0 10%;
    }

    .btn-casino {
        min-width: 180px;
        padding: 12px 30px;
        font-size: 16px;
    }

    #jugador-cartas .carta,
    #computadora-cartas .carta,
    .carta {
        width: 120px;
    }

    #jugador-cartas .carta:not(:first-child),
    #computadora-cartas .carta:not(:first-child) {
        margin-left: -60px;
    }

    .player-title {
        font-size: 28px;
    }

    .score-badge {
        font-size: 24px;
        padding: 8px 16px;
    }
}

/* Modo Móvil - Pantallas pequeñas */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    /* Header móvil optimizado */
    .titulo {
        padding: 20px 10px;
    }

    .casino-title {
        font-size: 28px;
        letter-spacing: 3px;
        display: block;
        margin: 10px 0;
    }

    .titulo i {
        font-size: 24px;
        margin: 0 10px;
        display: inline-block;
    }

    .casino-subtitle {
        font-size: 12px;
        letter-spacing: 2px;
        margin-top: 8px;
    }

    .casino-lights {
        padding: 0 5%;
    }

    .light {
        width: 10px;
        height: 10px;
    }

    /* Botones móviles - Touch friendly */
    .button-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 15px 20px;
    }

    .btn-casino {
        width: 100%;
        min-width: unset;
        padding: 16px 20px;
        font-size: 15px;
        letter-spacing: 1px;
        border-radius: 12px;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-casino i {
        font-size: 18px;
        margin-right: 8px;
    }

    /* Cartas móviles - Optimizadas */
    #jugador-cartas .carta,
    #computadora-cartas .carta,
    .carta {
        width: 80px;
        left: 0;
    }

    #jugador-cartas .carta:not(:first-child),
    #computadora-cartas .carta:not(:first-child) {
        margin-left: -40px;
    }

    /* Efecto hover reducido en móvil */
    #jugador-cartas .carta:hover,
    #computadora-cartas .carta:hover {
        transform: translateY(-15px) scale(1.05);
        filter: drop-shadow(0 8px 15px rgba(255, 215, 0, 0.4));
    }

    #computadora-cartas,
    #jugador-cartas {
        height: 150px;
        min-height: 150px;
    }

    /* Paneles de jugadores móvil */
    .row.container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-top: 20px !important;
    }

    .player-panel {
        padding: 20px 15px;
        border-radius: 15px;
        margin-bottom: 15px;
    }

    .panel-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px;
    }

    .player-icon,
    .dealer-icon {
        font-size: 36px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .player-title {
        font-size: 20px;
        letter-spacing: 2px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .score-badge {
        font-size: 18px;
        padding: 8px 16px;
        margin-left: 0;
        min-width: 80px;
    }

    .cards-area {
        min-height: 150px;
        padding: 15px 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    /* Separadores móvil */
    .divider {
        margin: 15px 0;
        font-size: 20px;
    }

    .divider i {
        margin: 0 10px;
    }

    .vs-divider {
        margin: 15px 0;
    }

    .vs-text {
        font-size: 28px;
        padding: 12px 30px;
    }

    /* Fichas de fondo - Reducidas en móvil */
    .chip {
        width: 35px;
        height: 35px;
        border: 3px solid #ffd700;
    }

    .chip::before {
        font-size: 18px;
    }

    /* Footer móvil */
    .casino-footer {
        padding: 20px 10px;
        margin-top: 30px;
    }

    .footer-icons {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .footer-icons i {
        margin: 0 10px;
    }

    .casino-footer p {
        font-size: 12px;
    }

    /* Modal móvil */
    .result-content {
        padding: 30px 20px;
        max-width: 90%;
        margin: 0 15px;
    }

    .result-icon {
        font-size: 70px;
    }

    .result-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .result-message {
        font-size: 18px;
    }
}

/* Modo Móvil Pequeño - Smartphones */
@media (max-width: 480px) {
    /* Header ultra compacto */
    .titulo {
        padding: 15px 5px;
    }

    .casino-title {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .titulo i {
        font-size: 20px;
        margin: 0 5px;
    }

    .casino-subtitle {
        font-size: 10px;
        letter-spacing: 1px;
    }

    /* Botones compactos */
    .button-container {
        gap: 10px;
        padding: 10px 15px;
    }

    .btn-casino {
        padding: 14px 15px;
        font-size: 13px;
        min-height: 55px;
    }

    .btn-casino i {
        font-size: 16px;
        margin-right: 6px;
    }

    /* Cartas ultra pequeñas */
    #jugador-cartas .carta,
    #computadora-cartas .carta,
    .carta {
        width: 65px;
    }

    #jugador-cartas .carta:not(:first-child),
    #computadora-cartas .carta:not(:first-child) {
        margin-left: -35px;
    }

    #computadora-cartas,
    #jugador-cartas {
        height: 120px;
        min-height: 120px;
    }

    /* Paneles compactos */
    .player-panel {
        padding: 15px 10px;
    }

    .player-icon,
    .dealer-icon {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .player-title {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .score-badge {
        font-size: 16px;
        padding: 6px 12px;
    }

    .cards-area {
        min-height: 120px;
        padding: 10px 5px;
    }

    .vs-text {
        font-size: 24px;
        padding: 10px 25px;
    }

    /* Fichas ocultas en móvil pequeño para mejor rendimiento */
    .chip {
        display: none;
    }

    /* Modal compacto */
    .result-content {
        padding: 25px 15px;
    }

    .result-icon {
        font-size: 60px;
    }

    .result-title {
        font-size: 26px;
    }

    .result-message {
        font-size: 16px;
    }
}

/* Optimizaciones táctiles */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos táctiles */
    .btn-casino:hover::before {
        width: 0;
        height: 0;
    }

    .btn-casino:active {
        transform: scale(0.96);
        transition: transform 0.1s;
    }

    #jugador-cartas .carta:hover,
    #computadora-cartas .carta:hover {
        transform: none;
    }

    .player-panel:hover {
        transform: none;
        box-shadow: 0 8px 30px rgba(255, 215, 0, 0.2),
                    inset 0 0 50px rgba(0, 0, 0, 0.3);
    }
}

/* Modo landscape en móvil */
@media (max-width: 768px) and (orientation: landscape) {
    .titulo {
        padding: 10px;
    }

    .casino-title {
        font-size: 20px;
        margin: 5px 0;
    }

    .casino-subtitle {
        display: none;
    }

    .button-container {
        flex-direction: row;
        gap: 8px;
        padding: 10px;
    }

    .btn-casino {
        min-height: 50px;
        font-size: 12px;
        padding: 10px 15px;
    }

    .btn-casino span {
        display: none;
    }

    .btn-casino i {
        margin-right: 0;
        font-size: 20px;
    }

    #computadora-cartas,
    #jugador-cartas {
        height: 100px;
        min-height: 100px;
    }

    .cards-area {
        min-height: 100px;
        padding: 10px;
    }

    .player-panel {
        padding: 15px 10px;
    }

    .vs-divider {
        margin: 10px 0;
    }

    .vs-text {
        font-size: 20px;
        padding: 8px 20px;
    }

    .casino-footer {
        padding: 15px 10px;
        margin-top: 20px;
    }
}