body {
    margin: 0;
    background: black;
    font-family: Arial, sans-serif;
    color: #fff;
    overflow-x: hidden;
}

/* ============================= */
/* MESA */
/* ============================= */

.table-container {
    width: min(1000px, 95vw);
    height: auto;
    aspect-ratio: 1000 / 520;
    margin: 30px auto;
    position: relative;
    isolation: isolate;
    border-radius: 300% / 280%;
    background:
        radial-gradient(ellipse at center,
            #2f2f2f 0%,
            #1c1c1c 70%,
            #111 100%);
    box-shadow:
        inset 0 0 80px rgba(0,0,0,0.8),
        0 0 0 20px #3b2a1f,
        0 0 0 26px #24160f,
        0 30px 90px rgba(0,0,0,0.9);
    overflow: visible;
   
}

/* ============================= */
/* JOGADORES */
/* ============================= */

.player {
    position: absolute;
    overflow: visible !important;
    width: 130px;
    text-align: center;
    transform: translate(-50%, -50%);
    font-size: 14px;
    z-index: 20;


}
/* ============================= */
/* NOME DA POSIÇÃO */
/* ============================= */

.player strong{
    display:block;
    font-size:16px;
    font-weight:900;
    letter-spacing:1px;
    color:#ffffff;
    text-shadow:0 2px 6px rgba(0,0,0,0.8);
}

.player .stack {

    background:linear-gradient(180deg,#1c1c1c,#000);

    padding:6px 12px;

    border-radius:20px;

    margin-top:6px;

    font-weight:bold;

    font-size:14px;

    color:#f1c40f;

    border:1px solid #333;

    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.15),
        0 2px 6px rgba(0,0,0,0.6);
}

.player-inner {
    position: relative;
}

.opponent {
    transform: rotateY(180deg);
    opacity: 0.9;
}

/* ============================= */
/* POSIÇÕES 8-MAX */
/* ============================= */

.bottom { top: 75%; left: 50%; }
.left { top: 75%; left: 18%; }
.left-mid { top: 50%; left: -2%; }
.left-top { top: 15%; left: 18%; }
.top { top: 8%; left: 50%; }
.right-top { top: 15%; left: 82%; }
.right-mid { top: 48%; left: 101%; }
.right { top: 75%; left: 82%; }

/* ============================= */
/* CARTAS */
/* ============================= */

.cards {
    display: flex;
    gap: 6px;
    margin-top: 5px;
    z-index: 10;
}

.card-img {
    width: 65px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.6);
}

/* ============================= */
/* AÇÕES */
/* ============================= */

.actions-wrapper{
    position:absolute;
    top: calc(75% + 90px); /* baseado no HERO */
    left:50.5%;
    transform:translateX(-50%);
}

.actions{
    display:flex;
    gap:7px; /* 👈 MESMO GAP DAS CARTAS */
}

.actions button {
    padding: 12px 28px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.push { background: #2ecc71; }
.raise { background: #3498db; }
.call  { background: #f1c40f; }
.fold  { background: #e74c3c; }

/* BOTÕES ESTILIZADOS */

.btn-action {
    padding: 18px 60px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 1px;
}

.btn-raise {
    background: #27ae60;
    color: #fff;
}

.btn-raise:hover {
    background: #2ecc71;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(46,204,113,0.6);
}

.btn-fold {
    background: #c0392b;
    color: #fff;
}

.btn-fold:hover {
    background: #e74c3c;
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(231,76,60,0.6);
}

/* ============================= */
/* TIMER & POT */
/* ============================= */

.action-timer {
    position: absolute;
    top: 200px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: bold;
    background: rgba(0,0,0,0.6);
    padding: 10px 25px;
    border-radius: 10px;
    color: #ffffff;
    transition: 0.3s;
}

.pot-display {
    position: absolute;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
}

/* ============================= */
/* TOPO */
/* ============================= */

.top-bar {

    position: relative;

    height: 50px;
    padding: 0 30px;

    background: #111;

    display: flex;
    justify-content: space-between;
    align-items: center;

}

.right-info {
    font-weight: bold;
    font-size: 14px;
}

/* ============================= */
/* LOGO */
/* ============================= */

.logomesa{
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    
    z-index:1;
    pointer-events:none;

    opacity:0.15;
    font-size:28px;
    font-weight:bold;
    text-align:center;
    white-space:nowrap;
}

/* ============================= */
/* POPUP */
/* ============================= */

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.popup-box {
    background: #111;
    padding: 40px;
    border-radius: 12px;
    width: 400px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    border: 1px solid #333;
}

.popup-box h2 { margin-bottom: 20px; }

.correct { color: #2ecc71; }
.wrong { color: #e74c3c; }

.popup-box p {
    margin-bottom: 25px;
    line-height: 1.6;
    color: #ccc;
}

.popup-box button {
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    background: #fff;
    color: #000;
    cursor: pointer;
    transition: 0.3s;
}

.popup-box button:hover {
    background: #000;
    color: #fff;
    border: 1px solid #fff;
}


/* Chip visual base */
.chip-stack {
    border-radius: 50%;
    margin: 0 auto;
    position: relative;

    box-shadow:
        inset 0 3px 6px rgba(255,255,255,0.4),
        inset 0 -4px 8px rgba(0,0,0,0.8),
        0 4px 10px rgba(0,0,0,0.9);
}

/* detalhe interno da ficha */
.chip-stack{
    display:inline-block;
    padding:6px 12px;
    border-radius:50px;
    background:linear-gradient(145deg,#2c3e50,#111);
    color:#f1c40f;
    font-weight:900;
    font-size:12px;
    box-shadow:
        inset 0 2px 5px rgba(255,255,255,0.2),
        0 3px 8px rgba(0,0,0,0.7);
}

/* DEALER */

.chip-dealer{

    width:26px;
    height:26px;

    border-radius:50%;

    background: radial-gradient(circle at 30% 30%, #5dade2, #21618c);

    color:#000;

    font-weight:bold;
    font-size:12px;

    display:flex;
    align-items:center;
    justify-content:center;

    box-shadow:
        inset 0 2px 4px rgba(255,255,255,0.5),
        inset 0 -3px 5px rgba(0,0,0,0.5),
        0 3px 6px rgba(0,0,0,0.7);
}

/* SB */
.chip-sb {

    width:26px;
    height:26px;

    background: radial-gradient(circle at 30% 30%, #7dffb2, #2ecc71);

    border:3px solid #27ae60;

}

/* BB */
.chip-bb {

    width:32px;
    height:32px;

    background: radial-gradient(circle at 30% 30%, #27ae60, #0b3d2e);

    border:3px solid #0b3d2e;

}

/* Valor flutuando */
.blind-value {
    margin-top: 5px;
    font-size: 12px;
    font-weight: bold;
    background: rgba(0,0,0,0.7);
    padding: 3px 8px;
    border-radius: 12px;
}

.raise-chip{
    position:absolute;
    top:50%;
    left:-20px;
    transform:translateY(-50%);

    background:#f39c12;
    color:#fff;
    font-weight:bold;
    font-size:12px;

    padding:4px 8px;
    border-radius:20px;

    box-shadow:0 0 8px rgba(243,156,18,0.7);
    z-index:30;

    white-space:nowrap;
}
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding-right: 45px;   /* espaço pro olho */
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    z-index: 5;            /* maior que o input */
}
#verticalLock{
    display:none;
}

.poker-chip {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 1px;

    border: 3px solid #ffffff;

    box-shadow:
        inset 0 3px 6px rgba(255,255,255,0.4),
        inset 0 -3px 6px rgba(0,0,0,0.5),
        0 4px 10px rgba(0,0,0,0.6);

    position: relative;
}

/* detalhe interno da ficha */
.poker-chip::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.6);
}
.table-blind{
    position:absolute;
    transform:translate(60px, 22px);
    z-index: 5;
}

.table-dealer{
    position:absolute;
    transform:translate(60px, 22px);
}

/* ============================= */
/* POSIÇÃO DOS MARCADORES NA MESA */
/* ============================= */

/* HERO / BOTTOM */

.bottom .table-dealer{
    top:74%;
    left:60%;
}

.bottom .table-blind{
    top:74%;
    left:52%;
}

/* ESQUERDA */

.left .table-dealer{
    top:70%;
    left:24%;
}

.left .table-blind{
    top:70%;
    left:12%;
}

/* DIREITA */

.right .table-dealer{
    top:70%;
    left:76%;
}

.right .table-blind{
    top:70%;
    left:88%;
}

/* TOPO */

.top .table-dealer{
    top:18%;
    left:56%;
}

.top .table-blind{
    top:18%;
    left:44%;
}

/* POSIÇÕES INTERMEDIÁRIAS */

.left-mid .table-dealer{
    top:50%;
    left:10%;
}

.left-mid .table-blind{
    top:50%;
    left:0%;
}

.right-mid .table-dealer{
    top:50%;
    left:90%;
}

.right-mid .table-blind{
    top:50%;
    left:100%;
}

.left-top .table-dealer{
    top:20%;
    left:24%;
}

.left-top .table-blind{
    top:20%;
    left:12%;
}

.right-top .table-dealer{
    top:20%;
    left:76%;
}

.right-top .table-blind{
    top:20%;
    left:88%;
}
.cards .card-img.folded {
    opacity:1;

    filter:
        brightness(0.2)
        grayscale(40%)
        contrast(1.1);
}
/* ============================= */
/* HERO DESTACADO */
/* ============================= */

.hero strong{

    color:#3498db;

    font-size:18px;

    text-shadow:
        0 0 6px rgba(52,152,219,0.7);
}

.hero .stack{

    background:linear-gradient(180deg,#3498db,#1f618d);

    color:#fff;

    font-weight:900;

    border:1px solid #21618c;

    box-shadow:
        0 0 12px rgba(52,152,219,0.6),
        inset 0 2px 6px rgba(255,255,255,0.3);
}
.stack-chip-mode{
    margin-top:6px;
}

/* garante separação só do HERO stack */
.player:not(.hero) .stack-chip-mode{
    margin-top:0;
}

.player.SB .stack,
.player.BB .stack{
    background:none;
    border:none;
    box-shadow:none;
    color:#fff;
    font-weight:700;
}
.table-blind,
.table-dealer{
    z-index: 5000 !important;
}





/* ============================= */
/* MOBILE */
/* ============================= */

@media only screen and (max-width: 1024px) {

    html, body {
        margin: 0;
        padding: 0;
        height: calc(var(--vh, 1vh) * 100);
        width: 100%;
        overflow: hidden;
        background-color: black;
        overscroll-behavior: none;
    }

    .table-container {
        width: 1000px;
        height: 520px;
        position: absolute;
        top: calc(60px + env(safe-area-inset-top, 0px));
        left: 50%;
        transform: translateX(-50%) scale(0.5) translateZ(0);
        transform-origin: top center;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        z-index: 1;
    }


/* AJUSTE APENAS ANDROID */
@supports (-webkit-touch-callout: none) {
    /* iOS (mantém como está) */
}

/* CHROME ANDROID */
@media only screen and (max-width:1024px) and (display-mode: browser) {

    .table-container {

        top: 18px;

        transform:
            translateX(-50%)
            scale(0.4)
            translateZ(0);
    }
}

/* APW / WEBVIEW */
@media only screen and (max-width:1024px) and (display-mode: standalone) {

    .table-container {

        top: 28px;

        transform:
            translateX(-50%)
            scale(0.5)
            translateZ(0);
    }
}

/* AÇÕES */

.actions-wrapper{
    position:absolute;
    top: calc(75% + 90px);
    left:50.5%;
    transform: translateX(-50%);
    z-index: 10000;
}

.actions{
    display:flex;
    gap:7px;
}

/* BOTÕES */

.btn-action {

    padding: 12px 30px;
    font-size: 16px;
}

/* TIMER */

.action-timer {
    position: absolute;
    top: 180px;
    font-size: 25px;
    padding: 6px 15px;
}

/* POT */

.pot-display {

    top: 130px;
    font-size: 14px;
}

/* LOGO */

.logomesa {

    top: 230px;
    left: 50%;
    transform: translateX(-50%);
}

/* POPUP */

.popup-meta {

    width: 85%;
    max-width: 340px;

    padding: 20px;
    font-size: 14px;
}

.popup-meta h2 { font-size: 18px; }

.popup-meta p {
    font-size: 14px;
    line-height: 1.4;
}

.popup-meta button {

    width: 100%;
    padding: 10px;
    font-size: 14px;
}

}


