html, body {
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  /* Layer a subtle gradient above the image using multiple backgrounds */
  background-image: url('backgroundcard.png'), linear-gradient(110deg, rgba(11,107,216,0.35), rgba(100,115,190,0.25), rgba(18,26,36,0.35));
  background-repeat: no-repeat, no-repeat;
  background-position: center center, center center;
  background-attachment: fixed, fixed;
  background-size: cover, cover;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
}
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.logo-container img {
  max-width: 120px;
  height: auto;
}

.container {
  position: relative;
  top: 70px;
  max-width: 480px;
  margin: 60px auto;
  padding: 20px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 12px;
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
}

h2, h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #1abc9c;
}

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="password"] {
  width: 91%;
  padding: 12px 14px;
  margin: 10px 0;
  border: none;
  border-radius: 6px;
  font-size: 15px;
}

button {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  font-size: 16px;
  font-weight: bold;
  background-color: #1abc9c;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s ease;
}

button:hover {
  background-color: #149c82;
}

ul {
  list-style: none;
  padding: 0;
}

.card {
  display: inline-block;
  background: #eee;
  color: #000;
  padding: 10px;
  border-radius: 6px;
  margin: 5px;
  font-weight: bold;
  text-align: center;
  min-width: 60px;
}
.hand-container {
  display: flex;
  overflow-y: auto;
  height: 100px;
  
}


 #table {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 15px;
}

#error-message,
#join-error {
  color: #f39c12;
  text-align: center;
  font-size: 14px;
}

.hidden {
  display: none;
}

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  color: #1abc9c;
  font-size: 40px;
  font-weight: bold;
  animation: fadeout 2s ease 1s forwards;
}

@keyframes fadeout {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
.card {
  transition: opacity 0.5s ease;
}

.card.fade-out {
  opacity: 0;
}

.card {
  width: 60px;
  height: 80px;
  border: 1px solid #333;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.2em;
  padding: 5px;
  margin: 4px;
  text-align: center;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: black;
  transition: transform 0.2s ease;
}

.card-value {
  font-size: 1.2em;
}

.card-suit {
  font-size: 1.4em;
}

/* Cores baseadas no naipe */
.card .card-suit:contains("♥"),
.card .card-suit:contains("♦") {
  color: red;
}

/* Estilo ao passar o mouse */
.card.clickable:hover {
  transform: scale(1.1);
  cursor: pointer;
}
.card-back {
  width: 60px;
  height: 80px;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.card-back:hover {
  transform: scale(1.1);
}
.opponent-hand {
  display: flex;
  flex-direction: row;
  justify-content: center;
  overflow-x: auto;
  max-width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  gap: 4px;
}

.card-back {
  width: 50px;
  height: 70px;
  background-image: url('flybet.png');
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #222;
    color: white;
    border-radius: 8px;
    margin-bottom: 10px;
  }
  
  .opponent-info {
    display: flex;
    align-items: center;
  }
  
  .opponent-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: #555;
  }
  
  .bet-info {
    font-weight: bold;
    color: #f1c40f;
  }

.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden {
  display: none;
}


.modal-content {
  background: #1abc9c;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  min-width: 250px;
  position: relative;
}

.modal-content h3 {
  margin-top: 0;
  font-size: 20px;
  color: #333;
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

.modal-buttons button {
  padding: 8px 12px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  background: #3498db;
  color: white;
  cursor: pointer;
}

.modal-buttons button:hover {
  background: #2980b9;
}

.modal-section {
  margin-bottom: 20px;
}

.modal-section input {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.modal-section button {
  width: 100%;
  background: #3498db;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.modal-section button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.close {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 22px;
  cursor: pointer;
  color: #888;
}

/* Estilo para os itens da lista de salas */
#rooms-ul {
  list-style-type: none;
  padding: 0;
  margin-top: 50px; /* Espaço para o botão de atualizar */
}

.room-item {
  padding: 12px;
  margin: 8px 0;
  background-color: #1e1e1e;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.room-item:hover {
  background-color: #2a2a2a;
}

.room-item strong {
  color: #fff;
}

.room-item small {
  color: #bbb;
  font-size: 0.8em;
}

.room-item button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.room-item button:hover {
  background-color: #2980b9;
}

.full-width {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid #333;
  background-color: #222;
  color: white;
}

/* Estilo para o toggle */
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #3498db;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  background-color: #3498db;
}

input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Estilo para o botão de copiar */
#copy-room-code {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

#copy-room-code:hover {
  background-color: #2980b9;
}

/* Estilo para o modal de código privado */
#private-room-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
}

#private-room-modal .modal-content {
  background-color: #222;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
}

#private-room-code-input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: #333;
  color: white;
}

.hidden {
  display: none !important;
}

#game-over-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  border-radius: 10px;
  z-index: 1000;
  text-align: center;
  max-width: 80%;
  display: none; /* Inicialmente escondido */
}

#game-over-modal:not(.hidden) {
  display: block;
}

.winner-style {
  background-color: rgba(76, 175, 80, 0.95);
  color: white;
  border: 3px solid #45a049;
}

.loser-style {
  background-color: rgba(244, 67, 54, 0.95);
  color: white;
  border: 3px solid #d32f2f;
}

.btn-victory {
  background-color: white;
  color: #4CAF50;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  margin-top: 15px;
  font-weight: bold;
}

#countdown {
  font-size: 1.2em;
  margin-top: 15px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
}
.btn-leave-now {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: bold;
}

.btn-leave-now:hover {
  background-color: #c0392b;
}

/* Spinner CSS */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 5px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

#chat-container {
  border-top: 2px solid #333;
  padding: 10px;
  background: linear-gradient(to bottom, #1a1a1a, #0d0d0d);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  height: 250px;
  max-width: 100%;
  box-sizing: border-box;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 8px;
  font-size: 13px;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: #555 #222;
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: #222;
  border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: #777;
}

#chat-input-area input {
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #2a2a2a;
  color: #f0f0f0;
  outline: none;
  transition: all 0.3s;
}

#chat-input-area input:focus {
  border-color: #1877F2;
  box-shadow: 0 0 8px rgba(24, 119, 242, 0.3);
}

#chat-input-area button {
  background-color: #1877F2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  font-weight: bold;
}

#chat-input-area button:hover {
  background-color: #165ec9;
  transform: translateY(-2px);
}

#emoji-btn {
  background-color: #34495e !important;
  padding: 10px 12px !important;
}

#emoji-btn:hover {
  background-color: #3d5a80 !important;
}


#emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding: 8px;
  background-color: #2a2a2a;
  border-radius: 4px;
  max-height: 120px;
  overflow-y: auto;
}

#emoji-picker::-webkit-scrollbar {
  width: 4px;
}

.hidden { 
  display: none; 
}

.chat-time {
  color: #888;
  font-size: 11px;
  margin-left: 4px;
}

.chat-msg {
  color: #ccc;
  margin-bottom: 6px;
  word-break: break-word;
  padding: 4px 6px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.05);
  line-height: 1.3;
}

.chat-msg.self {
  color: #1877F2;
  font-weight: bold;
  background-color: rgba(24, 119, 242, 0.1);
}

/* ============== CHAT DE SUPORTE ============== */

#support-chat-container {
  background: rgba(0, 0, 0, 0.85) !important;
  border: 2px solid #16a34a !important;
  box-shadow: 0 0 20px rgba(22, 163, 74, 0.3);
}

#support-messages {
  scrollbar-width: thin;
  scrollbar-color: #16a34a #222;
}

#support-messages::-webkit-scrollbar {
  width: 6px;
}

#support-messages::-webkit-scrollbar-track {
  background: #222;
  border-radius: 3px;
}

#support-messages::-webkit-scrollbar-thumb {
  background: #16a34a;
  border-radius: 3px;
}

#support-messages::-webkit-scrollbar-thumb:hover {
  background: #22c55e;
}

.support-msg {
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 3px solid #666;
  word-break: break-word;
  line-height: 1.4;
}

.support-msg.user {
  border-left-color: #1877F2;
  background-color: rgba(24, 119, 242, 0.1);
  color: #1877F2;
}

.support-msg.admin {
  border-left-color: #16a34a;
  background-color: rgba(22, 163, 74, 0.1);
  color: #22c55e;
}

.support-msg-sender {
  font-weight: bold;
  font-size: 12px;
  color: #999;
  margin-bottom: 3px;
}

.support-msg-time {
  font-size: 11px;
  color: #666;
  margin-top: 3px;
}

#open-support-chat-btn {
  position: relative !important;
  top: 0 !important;
  margin: 10px auto !important;
  display: block !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  animation: pulse 2s infinite;
}

#open-support-chat-btn.hidden {
  display: none !important;
  animation: none !important;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(22, 163, 74, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(22, 163, 74, 0.8);
  }
}

#close-support-chat-btn:hover {
  background-color: #dc2626 !important;
}

#send-support-btn:hover {
  background-color: #165ec9 !important;
  transform: translateY(-2px);
}

/* ============== CHAT DE SUPORTE - INPUT ============== */

#support-input {
  transition: all 0.3s !important;
}

#support-input:focus {
  border-color: #1877F2 !important;
  box-shadow: 0 0 8px rgba(24, 119, 242, 0.3) !important;
}

#support-input::placeholder {
  color: #666;
}

/* ============== EMOJI REACTION DISPLAY ============== */

#emoji-reaction-display {
  line-height: 1;
  user-select: none;
  pointer-events: none;
  animation: emojiPop 1.5s ease-out forwards !important;
}

#emoji-reaction-display.hidden {
  display: none !important;
  animation: none !important;
}

@keyframes emojiPop {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.3);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 412px) {
 .container {
  position:relative;
  top: 20px;
  height: 100%;
}
body{
  height: 500px;}
}



