header {
    width: 100%;
    height: 60px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0E276C;
    color: #ffffff;
    position: relative;
}

.header__left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header__left i {
    font-size: calc(24 / 16 * 1rem);
}

.header__left h1 {
    font-size: calc(20 / 16 * 1rem);
    text-transform: uppercase;
}

.header__right a {
    font-size: 20px;
    text-decoration: none;
    color: #ffffff;
}

.header__right i {
    padding: 10px 11.25px;
    border-radius: 50%;
    background-color: #25d366;
}

.sidenav__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidenav__top__close i {
    font-size: calc(24 / 16 * 1rem);
}

.sidenav__top__user__container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sidenav__top__icon img {
    height: 40px;
}

.sidenav__top__user p {
    font-size: calc(16 / 16 * 1rem);
}

.sidenav__top__user p:last-child {
    font-size: calc(14 / 16 * 1rem);
    font-weight: bold;
    color: #ffffff;
}

.sidenav__balance {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border-radius: 10px;
}

.sidenav__balance__text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidenav__balance__text p {
    font-size: calc(24 / 16 * 1rem);
    font-weight: bold;
    color: #000000;
}

.sidenav__balance__text p:last-child {
    font-size: calc(14 / 16 * 1rem);
    color: #505050;
}

.sidenav__balance__button a {
    padding: 10px 10.75px;
    background-color: #505050;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: calc(20 / 16 * 1rem);
}

.sidenav__menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidenav__menu a {
    display: flex;
    padding: 10px;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
}

.icon__link {
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(20 / 16 * 1rem);
    margin-right: 10px;
}

.sidenav__active {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.sidenav__exit {
    display: flex;
    justify-content: center;
}

.sidenav__exit a {
    padding: 10px 25px;
    font-size: calc(16 / 16 * 1rem);
    font-weight: bold;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    background-color: #dc3545;
    text-decoration: none;
}

main {
    width: 100%;
    min-height: calc(100vh - 60px);
    height: 100%;
    padding: 20px;
    background-color: #e5e5e5;
    background-image: url(../images/fundico.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.sinuca {
    position: fixed;
    width: fit-content;
    filter: blur(5px);
}

@keyframes sinucaAnimation1 {
    0% {
        top: 10%;
    }
    100% {
        top: 20%;
    }
}

@keyframes sinucaAnimation2 {
    0% {
        bottom: -10%;
    }
    100% {
        bottom: 5%;
    }
}

@keyframes sinucaAnimation3 {
    0% {
        top: 40%;
    }
    100% {
        top: 50%;
    }
}

.sinuca1 {
    left: -10%; /* ajuste conforme necessário */
    animation: sinucaAnimation1 5s infinite alternate;
}

.sinuca2 {
    left: -10%; /* ajuste conforme necessário */
    animation: sinucaAnimation2 7s infinite alternate;
}

.sinuca3 {
    right: -10%; /* ajuste conforme necessário */
    animation: sinucaAnimation3 6s infinite alternate;
}

.card__games{
    text-align: center;
    background-color: rgba(255, 255, 255, 0.4);
    margin-top: 10px;
    display: flex;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 10px;
    grid-row-gap: 10px;
    padding: 8px;
    border-radius: 8px;
}

.card__cartela__comprada{
    display: flex;
    flex-direction: column;
    background-color: #FABE04;
    padding: 4px;
    border-radius: 8px;
}

.card__cartela__numeros{
    display: flex;
    flex-direction: column;
}

.card__cartela__linha{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    margin-bottom: 2px;
    gap: 2px;
    text-align: center;
}

.card__cartela__numero{
    width: 100%;
    background-color: #Fff;
    border-radius: 4px; 
}

.card__cartela__nome {
    background-color: #0E276C;
    color: #fff;
    margin-bottom: 4px;
    border-radius: 4px;
}

.card__cartela__id {
    background-color: #0E276C;
    color: #fff;
    margin-top: 2px;
    border-radius: 4px;
}

#vencedores_popup {
    border: 2px solid #ffb703 !important; /* Elegant gold border */
    width: 92%;
    max-width: 380px;
    padding: 16px;
    background: rgba(14, 23, 56, 0.96) !important; /* Rich deep blue-gray background */
    backdrop-filter: blur(10px);
    border-radius: 16px;
    color: #fafafa;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 183, 3, 0.3);
    animation: popupShow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#vencedores_popup_header {
    margin-bottom: 16px;
    margin-top: 4px;
    text-align: center;
    align-items: center;
    display: flex;
    justify-content: center;
    gap: 8px;
}

#vencedores_popup_header h2 {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff, #ffb703);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.vencedores_popup_text {
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    background: linear-gradient(135deg, #0e276c, #001243);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffb703;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.vencedores_cartelas_text {
    font-size: 11px;
    font-weight: bold;
    padding: 6px 12px;
    background: linear-gradient(135deg, #001243, #0e276c);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffb703;
    letter-spacing: 0.5px;
    margin: 0;
}

#vencedores_popup_content {
    display: flex;
    text-align: center;
    gap: 12px;
    flex-direction: column;
}

.vencedor_content_data {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#user_qtd_cartelas {
    background-color: #0E276C;
    margin-top: 8px;
    padding: 12px;
    text-align: center;
    color: #fff;
    font-weight: bold;
    border-radius: 8px;
}

#user_saldo_line, #user_qtd_cartelas_compradas {
    color: #FABE04;
}

#vencedores_popup_total {
    background-color: rgba(14, 23, 56, 0.98) !important;
    color: #fff;
    border: 2px solid #ffb703 !important;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 35px rgba(255, 183, 3, 0.4);
    width: 92%;
    max-width: 380px;
    animation: popupShow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.message_popup{
    padding: 12px;
    background-color: #EA6D05;
    margin-bottom: 14px;
    position: relative;
    border-radius: 12px;
    color: #fff;
    border: 1px solid #ff5b03;
}

.message_popup_header {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.message_popup_close {
    width: fit-content;
    height: fit-content;
    padding: 2px 6px;
}

.loader {
    margin: 0 auto;
    width: 60px;
    aspect-ratio: 2;
    --_g: no-repeat radial-gradient(circle closest-side,#fff 90%,#0000);
    background: 
      var(--_g) 0%   50%,
      var(--_g) 50%  50%,
      var(--_g) 100% 50%;
    background-size: calc(100%/3) 50%;
    animation: l3 1s infinite linear;
  }
  @keyframes l3 {
      20%{background-position:0%   0%, 50%  50%,100%  50%}
      40%{background-position:0% 100%, 50%   0%,100%  50%}
      60%{background-position:0%  50%, 50% 100%,100%   0%}
      80%{background-position:0%  50%, 50%  50%,100% 100%}
  }
  
  #await_game_start_popup {
      color: #FEDA00;
      background-color: #0E276C;
      padding: 20px;
      border-radius: 8px;
      text-align: center;
      max-width: 80%;
      border: 1px solid #FEDA00;
  }
  
  #await_game_start_popup h2 {
      margin-bottom: 8px;
  }
  
  #await_game_start_popup p {
      margin-bottom: 12px;
  }

  .cartela_popup_wrapper {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.02);
    gap: 4px;
  }

  .numero_ativo {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #dc2626); /* Pulsing Red */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
    animation: winningBallPulse 1.2s infinite alternate;
    transform: scale(1.05);
    z-index: 2;
  }

  @keyframes winningBallPulse {
      0% {
          box-shadow: 0 0 4px rgba(239, 68, 68, 0.4);
          transform: scale(1.02);
      }
      100% {
          box-shadow: 0 0 12px rgba(239, 68, 68, 0.8), 0 0 16px rgba(239, 68, 68, 0.4);
          transform: scale(1.08);
      }
  }

  .numero_sorteado {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981, #059669); /* Hit Green */
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
  }

  .numero_apagado {
    color: #9ca3af;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.03);
  }

  .cartela_linha_wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 4px;
    text-align: center;
  }
  
  .numero_cartela {
    flex: 1;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
  }

  .numero_cartela p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
  }

  .opcoes_deposito {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    justify-content: space-between;
    gap: 4px;
  }

  .opcoes_deposito button {
    flex: 1 1 0px;
    padding: 8px;
    font-weight: bold;
    background-color: #0E276C;;
    border-radius: 8px;
    border: 1px solid #FABE04;
    color: #FABE04;
  }

  .link_button {
    padding: 10px;
    font-size: 14px!important;
    background-color: #15A402;
    border-radius: 8px;
    border: 1px solid #15A402;
  }

  .whatsapp-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 1000;
}

.whatsapp-icon img {
    width: 100%;
    height: 100%;
}

.premium_link {
    background-color: #EA6D05;
    border-radius: 12px;
    animation-name: smalltobig;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

@keyframes smalltobig {
    0% {
        transform: scale(1.0);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1.0);
    }
}

:root {
    --blue:       #0E276C;
    --blue-dark:  #0B1C4D;
    --green:      #28A745;
    --gold:       #FFC107;
    --white:      #ffffff;
    --light-gray: #F0F4FA;
    --dark-gray:  #222222;
    --muted:      #AAAAAA;
    --radius:     8px;
    --header-h:   56px;
    --menu-w:     260px;
    --shadow:     0 2px 8px rgba(0,0,0,0.2);
  }

  /* HEADER */
  .site-header {
    position:fixed; top:0; left:0; right:0;
    height:var(--header-h);
    background:var(--blue);
    display:flex; align-items:center; justify-content:space-between;
    padding:0 16px; box-shadow:var(--shadow); z-index:1000;
  }

  .menu-btn, .live-btn {
    background:none; border:none; color:var(--white);
    font-size:1.2rem; cursor:pointer;
  }

  .header-title {
    font-size:1.25rem; font-weight:600; text-transform:uppercase;
  }

  .live-btn {
    background:var(--green); padding:6px 12px; border-radius:var(--radius);
    font-weight:600; transition:background .2s;
  }

  .live-btn:hover { background:#218838; }

  /* OVERLAY */
  .overlay {
    position:fixed; top:0; left:0; right:0; bottom:0;
    background:rgba(0,0,0,0.5);
    opacity:0; visibility:hidden;
    transition:opacity .2s, visibility .2s;
    z-index:998;
  }

  .overlay.show {
    opacity:1; visibility:visible;
  }

  /* SIDENAV */
  .sidenav {
    position:fixed; top:0; left:0; bottom:0;
    width:var(--menu-w);
    background: linear-gradient(160deg, var(--blue), var(--blue-dark));
    transform:translateX(-100%);
    transition:transform .3s;
    box-shadow:2px 0 8px rgba(0,0,0,0.3);
    overflow-y:auto;
    z-index:10000;
  }

  .sidenav.open { transform:translateX(0); }

  .sidenav .close-btn {
    position:absolute; top:12px; right:12px;
    background:none; border:none; color:var(--white);
    font-size:1.2rem; cursor:pointer;
  }

  /* LOGO + NOME */
  .profile {
    display:flex; align-items:center; justify-content:center;
    gap:8px; margin:16px;
    color:var(--light-gray); font-size:0.9rem;
  }

  .profile img {
    width:32px;
  }

  .profile span {
    color:var(--gold); font-weight:600;
  }

  /* SALDO */
  .saldo-menu {
    background:var(--white); color:var(--dark-gray);
    margin:0 16px 16px; padding:12px 16px;
    border-radius:var(--radius);
    box-shadow:inset 0 1px 4px rgba(0,0,0,0.1);
    display:flex; align-items:center; gap:12px;
  }

  .saldo-menu i {
    font-size:1.5rem; color:var(--gold);
  }

  .saldo-text .label {
    font-size:0.75rem; color:var(--muted); text-transform:uppercase;
  }

  .saldo-text .value {
    font-size:1.1rem; font-weight:700; color:var(--green);
  }

  /* DIVISOR & TÍTULO DE SEÇÃO */
  .divider {
    border:0; border-top:1px solid var(--muted);
    margin:8px 0;
  }

  .section-title {
    font-size:0.75rem; color:var(--muted);
    text-transform:uppercase; margin:8px 16px;
  }

  /* LINKS */
  nav ul { list-style:none; padding:0; margin:0; }
  nav li + li { margin-top:2px; }

  nav a {
    display:flex; align-items:center; padding:6px 16px;
    color:var(--white); text-decoration:none;
    border-left:4px solid transparent;
    border-radius:0 var(--radius) var(--radius) 0;
    transition:background .2s, border-left-color .2s;
  }

  nav a:hover,
  nav a:focus,
  nav a.active {
    background:rgba(255,255,255,0.1);
    border-left-color:var(--gold);
  }

  nav a i {
    width:20px; text-align:center; margin-right:12px;
    font-size:1rem;
  }

  .highlighted {
    background:rgba(255,255,255,0.1);
    font-weight:600;
    border-left-color:#50dfff;
  }

  /* BOTÃO SAIR */
  .logout {
    display: block;
    margin: 0 auto 24px;
    padding: 10px 30px;
    background: #3d414d;
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
 }

  .logout:hover {
    background:#218838;
  }

  #popupBackground {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 9998;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
}