body {
    font-family: Arial, sans-serif;
    background-color: #2E8B57; 
    background-image: url("fondo.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position:  center;/* Verde casino */
    color: white;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.table {
    margin: 20px 0;
}

.cards {
    display: flex;
    justify-content: center;
    min-height: 120px;
    margin: 10px 0;
}

.card {
    background-color: white;
    color: black;
    border-radius: 8px;
    width: 80px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 5px;
    border: 2px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.red {
    color: red;
}

.btn {
    padding: 10px 20px;
    margin: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #f1c40f;
    color: #333;
    transition: 0.3s;
}

.btn:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
}

.btn:hover:not(:disabled) {
    background-color: #f39c12;
}

#message {
    height: 30px;
    margin-bottom: 20px;
}
/* --- Cabecera y Botón Volver --- */
.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.btn-back {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    margin-bottom: 15px;
    cursor: pointer;
}

.btn-back:hover {
    background: #f1c40f;
    color: #111;
    border-color: #f1c40f;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
    transform: translateY(-2px);
}

/* --- Estilos para las Apuestas (Fachero) --- */
.betting-area {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.75), rgba(15, 15, 15, 0.95));
    border: 2px solid #f1c40f;
    box-shadow: 0 8px 32px 0 rgba(241, 196, 15, 0.25), inset 0 0 15px rgba(241, 196, 15, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 15px 25px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.balance-display {
    font-weight: bold;
    font-size: 22px;
    color: #f1c40f;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.bet-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.bet-controls:focus-within {
    border-color: #f1c40f;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
}

.bet-controls label {
    color: #aaa;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

#bet-amount {
    width: 70px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
    outline: none;
}

/* Eliminar flechas de incremento horribles en el input number */
#bet-amount::-webkit-outer-spin-button,
#bet-amount::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#bet-amount {
    appearance: textfield;
    -moz-appearance: textfield;
}

.btn-small {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 800;
    background: linear-gradient(135deg, #f1c40f, #d4ac0d);
    color: #000;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(241, 196, 15, 0.2);
}

.btn-small:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(241, 196, 15, 0.4);
}

.btn-small:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

/* --- Icono Petocoin con rotación 3D --- */
.petocoin-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    vertical-align: middle;
    animation: spin-coin 4s linear infinite;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

@keyframes spin-coin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}