/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* FONDO + CENTRADO */
body {
    min-height: 100vh;
    padding: 20px;
    color: #fff;
    background: linear-gradient(135deg, #0a1b3d, #061024 50%, #030914);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    overflow-x: hidden;
}

/* 🔥 Para pantallas pequeñas (móvil) */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
}

/* IMAGEN CENTRAL DINÁMICA (SIN DEFAULT) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1400px;
    height: 100%;
    background: var(--fondo) center no-repeat;
    background-size: contain;
    z-index: -1;
}

/* CONTENEDOR */
.qm-page {
    width: 100%;
    max-width: 420px;
}



/* ===========================
   BOLSA
=========================== */
.qm-bolsa {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.qm-bolsa-monto {
    color: #ffe600;
}

/* ===========================
   CARD PRINCIPAL
=========================== */
.qm-card {
    background: #7d0f1f; /* rojo elegante */
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

/* Header */
.qm-card-header {
    position: relative;
    background: linear-gradient(to bottom, #ff0033, #800014); /* rojo fuerte */
    padding: 10px 16px 14px;
    text-align: center;
}

.qm-titulo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.qm-subtitulo {
    font-size: 11px;
    margin-top: 2px;
}

.qm-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: rgba(0,0,0,0.25);
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
}

.qm-close:hover {
    background: rgba(255, 0, 0, 0.35);
}


/* ===========================
   PARTIDOS
=========================== */
.qm-partidos {
    background: #ffffff;
    padding: 8px 10px 12px;
}

.qm-row {
    display: grid;
    grid-template-columns: 2fr 0.6fr 2fr;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #e3e3e3;
}

.qm-row:last-of-type {
    border-bottom: none;
}

.qm-team {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
}

.qm-team-local { justify-content: flex-start; }
.qm-team-visit { justify-content: flex-end; }

.qm-empate {
    display: flex;
    justify-content: center;
}

.qm-team-name {
    font-size: 12px;
    font-weight: 700;
    color: #222;
}
.qm-team-name {
    text-align: center;
    flex: 1;
}

.qm-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ===========================
   CASILLAS CUADRADAS (NUEVO)
=========================== */
.qm-pick {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid #888;
    background: #fff;
    cursor: pointer;
    transition: 0.15s ease;

    /* Mostrar SIEMPRE la letra */
    color: #555 !important;   /* gris suave */

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 15px;
    font-weight: 900;
}

/* Hover */
.qm-pick:hover {
    background: #f3f3f3; 
}

/* ===========================
   CASILLA ACTIVADA (VERDE)
=========================== */
.qm-pick.activo {
   background: linear-gradient(to bottom right, #ff6b6b, #b00020) !important;
    border-color: #b00020 !important;
    color: #ffffff !important;
}

/* ===========================
   BOTONES CON DEGRADADOS Y BORDES NEGROS
=========================== */
.qm-btn {
    border: 2px solid #000; /* Borde negro */
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, #00b300, #009933); /* Degradado verde */
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
}

.qm-btn:hover {
    transform: scale(1.03);
    background: linear-gradient(135deg, #009933, #00b300); /* Cambia el degradado al pasar el rat�n */
}

.qm-btn-add { 
    background: linear-gradient(135deg, #00b8a9, #009e91) !important; /* Degradado verde menta azulado brillante */
    border: 2px solid #000; /* Borde negro */
}

.qm-btn-enviar { 
    background: linear-gradient(135deg, #25D366, #1aab5d) !important; /* Degradado verde claro */
    border: 2px solid #000; /* Borde negro */
}
.qm-btn-red { 
    background: linear-gradient(135deg, #d90429, #b8001c) !important; /* Degradado rojo */
    border: 2px solid #000; /* Borde negro */
}

/* ==== Bot�n sec (dobles/triples) ==== */
.qm-btn-sec {
    background: linear-gradient(135deg, #f0f0f0, #dcdcdc); /* Degradado gris claro */
    color: #222;
    border: 2px solid #000; /* Borde negro */
}

.qm-btn-sec.dobles-activo {
    background: linear-gradient(135deg, #ff8c00, #ff7f00) !important; /* Degradado naranja */
    color: #fff !important;
    border: 2px solid #000; /* Borde negro */
}


/* ===========================
   VISTA PREVIA
=========================== */
.qm-preview {
    margin-top: 12px;
    background: linear-gradient(to bottom right, #c40000, #000000); /* rojo → negro */
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    font-size: 15px;
    letter-spacing: 5px;
}



/* ===========================
   ENTRADA NOMBRE
=========================== */
.qm-nombre-row {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.qm-input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 14px;
}

/* ===========================
   BOTONES INFERIORES
=========================== */
.qm-controles2 {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.qm-controles-bottom {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.qm-controles-bottom .qm-btn {
    flex: 1;
}

/* ===========================
   TABLA FINAL (versión roja)
=========================== */
.qm-tabla-final {
    margin-top: 16px;
    background: #ffd5d5; /* rojo muy claro elegante */
    color: #000;
    padding: 8px;
    border-radius: 10px;
    border: 2px solid #7a0000;
    font-size: 13px;
    font-weight: 700;
}

.qm-save-row {
    display: flex;
    align-items: stretch;
    margin-bottom: 2px;
}

.qm-save-row:last-child {
    margin-bottom: 0;
}

/* === AHORA SOLO 7 PARTIDOS === */
.qm-save-cols {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr) 1.3fr 0.8fr; /* <-- antes 10 */
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #7a0000;
}

.qm-save-cell {
    padding: 2px 3px;
    text-align: center;
    border-left: 1px solid #7a0000;
}

.qm-save-cell:first-child {
    border-left: none;
}

.qm-save-del {
    margin-left: 5px;
    border: none;
    background: #b00020; /* rojo fuerte */
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* SOLO la columna del NOMBRE — celda #10 */
.qm-save-cols .qm-save-cell:nth-child(8) {
    max-width: 90px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- LOGO �0�3NICO DETR�0�9S DE TODA LA TABLA --- */
.qm-partidos {
    position: relative;
    overflow: hidden;
}

.qm-partidos::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 330px;           /* tama�0�9o del logo */
    height: 330px;

    background: url("../images/revanchitalogo.png") center no-repeat;
    background-size: contain;

    opacity: 0.08;          /* transparencia */
    pointer-events: none;   /* no afecta clicks */
    z-index: 1;
}

/* el contenido va encima del logo */
.qm-row {
    position: relative;
    z-index: 2;
}
#btnRandom {
    background: #7e3ff2 !important; /* Morado */
    color: #fff !important;
}
.qm-hand {
    position: absolute;
    width: 70px;
    height: 70px;
    z-index: 999999;
    pointer-events: none;
    animation: bounce 0.9s infinite ease-in-out;
}

.qm-hand img {
    width: 100%;
}

@keyframes bounce {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}
/* ===========================
   FIX SIMPLE Y GLOBAL
   (sin mover nada más)
=========================== */

/* 1) Que los nombres NO se vayan a 2 renglones */
.qm-team-name {
    white-space: nowrap !important;      /* una sola línea */
    overflow: hidden !important;         /* por si acaso */
    text-overflow: ellipsis !important;  /* si algún día no cabe */
}
/* =======================================
   FIX REAL PARA NOMBRES LARGOS
======================================= */
.qm-team {
    min-width: 105px !important; /* cada lado tiene espacio seguro */
}

