.hokm-game-container {
  padding: 0 6px;
}

.game-lobby {
  width: 100%;
  max-width: 1300px;
  background: rgba(10, 35, 22, 0.45);
  backdrop-filter: blur(4px);
  border-radius: 30px;
  padding: 1rem 0.8rem 1.5rem;
  border: 1px solid #dbb45c;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

#hokm-cancel-game-btn {
  display: block;
  margin-bottom: 10px;
  margin-right: auto;
  background: #8b3c2c;
}

/* الطاولة الدائرية */
.round-table {
  position: relative;
  background: radial-gradient(ellipse at 30% 30%, #1c5a3b, #0a301f);
  border-radius: 50%;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 750px;
  margin: 0 auto 1rem auto;
  box-shadow:
    0 25px 35px rgba(0, 0, 0, 0.6),
    inset 0 0 0 6px #dbb24c,
    inset 0 0 0 12px #b3862b;
  border: 2px solid #eac568;
  position: relative;
}

.table-gold-pattern {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle at 20% 30%,
    rgba(218, 165, 32, 0.12) 0px,
    rgba(218, 165, 32, 0.12) 3px,
    transparent 3px,
    transparent 25px
  );
  pointer-events: none;
}

/* المواقع المخصصة للكروت التي تُلعب أمام كل لاعب (داخل الطاولة بالقرب من المقعد) */
.card-spot {
  position: relative;
  width: 70px;
  height: 98px;
  z-index: 20;
  pointer-events: none;
  /* filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)); */
  transition: all 0.2s ease;
}

/* تصميم الكرت الذي يظهر في المساحة */
.played-card-table {
  position: relative;
  /* background: #fff7e8; */
  width: 100%;
  height: 100%;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 8px 18px black;
  border: 1px solid #e6bc73;
  backdrop-filter: blur(2px);
}

.played-card-table.hearts {
  color: #c62a2a;
}
.played-card-table.spades {
  color: #1e2a2e;
  color: #9d7e03;
}
.played-card-table.diamonds {
  color: #2f72c7;
}
.played-card-table.clubs {
  color: #4aa86b;
}

.red-joker {
  color: red;
}

.played-rank {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.played-suit {
  font-size: 1.8rem;
  margin-top: 4px;
}

/* مقاعد اللاعبين */
.player-seat {
  position: absolute;
  width: 24%;
  max-width: 135px;
  aspect-ratio: 1 / 1.1;
  background: linear-gradient(145deg, #2c462e, #142d1b);
  border-radius: 40% 60% 40% 60% / 50% 40% 60% 50%;
  box-shadow:
    0 12px 20px rgba(0, 0, 0, 0.5),
    inset 0 1px 3px rgba(255, 235, 140, 0.5);
  border: 2px solid #dbb75c;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  backdrop-filter: blur(3px);
  transition: all 0.2s;
  z-index: 12;
  cursor: default;
}

.player-seat.hakem::after {
  content: "👑";
  position: absolute;
  font-size: 2rem;
  top: -10px;
}
.player-seat.forced::after {
  content: "🪣";
  position: absolute;
  font-size: 2rem;
  top: -10px;
  transform: rotate(180deg);
}

/* .seat-1 {
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
}
.seat-2 {
  top: 12%;
  right: -5%;
  transform: translateX(0);
}
.seat-3 {
  bottom: 12%;
  right: -5%;
  transform: translateX(0);
}
.seat-4 {
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(145deg, #3a6b3e, #1a4023);
  border: 2px solid #f3cd7a;
}
.seat-5 {
  bottom: 12%;
  left: -5%;
  transform: translateX(0);
}
.seat-6 {
  top: 12%;
  left: -5%;
  transform: translateX(0);
} */

.avatar-icon {
  font-size: 1.8rem;
  filter: drop-shadow(2px 2px 4px black);
}
.player-name {
  font-weight: 800;
  font-size: 0.7rem;
  background: #00000077;
  padding: 2px 8px;
  border-radius: 40px;
  color: #ffeaac;
  margin: 4px 0;
  text-align: center;
}
.ready-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: #d4af37;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
  color: #1b3b1f;
  border: 1px solid white;
}

/* تنسيقات اختيار الفرق في اللوبي */
.hokm-teams-container {
  display: flex;
  justify-content: space-around;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.hokm-team-card {
  /* background: rgba(0, 0, 0, 0.5); */
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 1.5rem;
  min-width: 200px;
  text-align: center;
  border: 2px solid #e9bc6d;
}

.hokm-team-card h3 {
  margin-top: 0;
  color: #ffefb9;
}
.team-members {
  min-height: 80px;
  margin: 1rem 0;
}
.team-member {
  background: #1e2a1f;
  margin: 5px 0;
  padding: 5px;
  border-radius: 20px;
  color: #ffeaac;
}
.empty-message {
  color: #aaa;
  font-size: 0.8rem;
}
.team-join-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  min-width: 100px;
}
.team-join-btn.blue {
  background: #2c6e9e;
  color: white;
}
.team-join-btn.red {
  background: #9e3c2c;
  color: white;
}
.team-join-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#hokm-leave-team-btn {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .hokm-team-card {
    padding: 1rem;
    min-width: auto;
  }
  .hokm-team-card h3 {
    font-size: 0.8rem;
  }

  .team-join-btn {
    padding: 8px 10px;
    border-radius: 12px;
    transition: 0.2s;
  }
}

/*  */

#hokm-blue-trick {
  display: flex;
  gap: 2px;
}

#hokm-blue-trick .nedded-count {
  padding: 6px;
  background: #97939380;
  border-radius: 100%;
}
#hokm-blue-trick .nedded-count.active {
  background: #0670c6;
}

#hokm-red-trick {
  display: flex;
  gap: 2px;
}

#hokm-red-trick .nedded-count {
  padding: 6px;
  background: #97939380;
  border-radius: 100%;
}
#hokm-red-trick .nedded-count.active {
  background: #ef1207;
}

.hokm-game-info {
  display: flex;
  justify-content: space-between;
  color: wheat;
  font-weight: bold;
  margin-bottom: 40px;
  padding: 0 15px;
}

/* يد المستخدم */

#hokm-bidding-panel {
  position: absolute;
  top: 25%;
  right: 50%;
  transform: translateX(50%);
  background: #ffe4c48a;
  backdrop-filter: blur(2px);
  background: linear-gradient(145deg, #1f3b2c, #0f281b);
  color: wheat;
  border-radius: 60px;
  padding: 2rem;
  text-align: center;
  border: 2px solid #e9bc6d;
  box-shadow: 0 20px 35px black;
  width: 90%;
  max-width: 400px;
  z-index: 100;
}
@media (max-width: 768px) {
  #hokm-bidding-panel {
    width: 98%;
    padding: 1.5rem;
  }
}
#bidding-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

#bidding-buttons .btn-style {
  padding: 10px 20px;
}

#bidding-timer {
  background: rgba(0, 0, 0, 0.6);
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  margin-top: 12px;
  font-size: 1.1rem;
}

.player-hand {
  /* background: rgba(0, 0, 0, 0.3); */
  /* backdrop-filter: blur(6px); */
  /* border-radius: 50px; */
  /* padding: 1rem; */
  /* border: 1px solid #eac568; */
  margin-top: 50px;
}
.hand-title {
  text-align: center;
  color: #ffefb9;
  font-weight: bold;
  margin-bottom: 12px;
  font-size: 0.9rem;
}
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* gap: 12px; */
  /* padding: 6px; */
}

.hand-card,
.card-spot {
  font-family: Georgia, "Times New Roman", Times, serif;
}

.hand-card {
  position: relative;
  width: 75px;
  height: 108px;
  /* background: linear-gradient(145deg, #fffef7, #fef1da); */
  border-radius: 12px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s;
  border: 1px solid #e6bc73;
  margin-top: -10px;
}

.hand-card:not(:first-child) {
  margin-right: -7px;
}

.hand-card:hover {
  transform: translateY(-8px);
  background: #fffef0;
}
.card-rank {
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.card-suit {
  font-size: 4.8rem;
  /* margin-top: 10px; */
}
.hand-card.hearts {
  color: #c62a2a;
}
.hand-card.spades {
  color: #1e2a2e;
  color: #9d7e03;
}

.hand-card.diamonds {
  color: #2f72c7;
}
.hand-card.clubs {
  color: #4aa86b;
}

.game-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}
.btn {
  background: #221d12;
  border: 2px solid #dbb051;
  padding: 8px 20px;
  border-radius: 60px;
  color: #ffeaac;
  font-weight: bold;
  font-family: "Tajawal", sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s;
}
.btn:hover {
  background: #dbb051;
  color: #1f3b1f;
  transform: scale(0.97);
}
.turn-indicator {
  background: #00000099;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 40px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  color: #fddf9e;
}
footer {
  text-align: center;
  font-size: 0.65rem;
  margin-top: 1rem;
  color: #cdba8a;
}

@media (max-width: 650px) {
  .hand-card {
    width: 65px;
    height: 94px;
  }
  .card-rank {
    font-size: 12px;
  }
  .card-suit {
    font-size: 2rem;
  }
  .card-spot {
    width: 55px;
    height: 77px;
  }
  .played-rank {
    font-size: 12px;
  }
  .played-suit {
    font-size: 2rem;
  }
}
@media (max-width: 500px) {
  .card-spot {
    width: 48px;
    height: 68px;
  }
}

.bid-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffd966, #d4a017);
  border: 2px solid #8b6914;
  color: #1e1e1e;
  font-size: 1.4rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(212, 160, 23, 0.7);
  z-index: 10;
}

/* 4 PLAYER --------------- */

/* حاويات ديناميكية */
/* #playerSeatsContainer,
#cardSpotsContainer {
  position: relative;
  width: 100%;
  height: 400px;
  margin: 20px 0;
} */

#cardSpotsContainer {
  width: 60%;
  height: 60%;
  position: relative;
  margin: auto;
  margin-top: auto;
  align-items: center;
  margin-top: 23%;
}

.player-seat.dynamic-seat:hover {
  transform: scale(1.05);
  border-color: #ffdf9e;
}

.player-seat.dynamic-seat .ready-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #2c2c2c;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid #e9bc6d;
}

.player-seat.dynamic-seat .avatar-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.player-seat.dynamic-seat .player-name {
  font-size: 14px;
  font-weight: bold;
  color: #ffefc0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vote-cancel-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: #ffaa00;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 1px solid #fff;
}

/* مؤقت الدور حول المقعد */
.turn-timer-overlay {
  position: absolute;
  width: 30px;
  height: 30px;
  top: -20px;
  left: -20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 25;
}

.turn-timer-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(#ffd966 0%, #2c2c2c 0%);
  transition: 0.4s linear;
  box-shadow: 0 0 10px rgba(255, 217, 102, 0.5);
}

.turn-timer-text {
  position: absolute;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgb(0, 0, 0);
  color: #ffd966;
  font-weight: bold;
  font-size: 1rem;
  border-radius: 30px;
  white-space: nowrap;
  font-family: "Tajawal", sans-serif;
  border: 1px solid #ffd966;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  z-index: 26;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
  .turn-timer-overlay {
    top: -12px;
    left: -12px;
  }
  .turn-timer-text {
    font-size: 0.6rem;
  }
}

/* بقع الكروت */
.card-spot {
  position: absolute;
  width: 80px;
  height: 110px;
  /* background: rgba(0, 0, 0, 0.5); */
  /* border: 1px dashed #e9bc6d; */
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 20;
}

/* عرض المزايدة على البقعة */
.bid-display {
  font-size: 28px;
  font-weight: bold;
  color: gold;
  text-shadow: 2px 2px 0 #000;
  background: rgba(0, 0, 0, 0.6);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

/* للشاشات الصغيرة */
@media (max-width: 768px) {
  .player-seat.dynamic-seat {
    width: 85px;
  }
  .card-spot {
    width: 60px;
    height: 85px;
  }
  .player-seat.dynamic-seat .avatar-icon {
    font-size: 24px;
  }
  .player-seat.dynamic-seat .player-name {
    font-size: 10px;
  }
}
/* نافذة اختيار لون الحكم */
.hakem-suit-modal {
  position: fixed;
  top: 20%;
  width: 100%;
  right: 0;
  /* height: 100%; */
  /* background: rgba(0, 0, 0, 0.7); */
  /* backdrop-filter: blur(10px); */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;

  z-index: 10000;
}

.hakem-suit-content {
  background: linear-gradient(145deg, #1f3b2c, #0f281b);
  border-radius: 60px;
  padding: 2rem;
  text-align: center;
  border: 2px solid #e9bc6d;
  box-shadow: 0 20px 35px black;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
}
.hakem-suit-content h3 {
  color: #ffefb9;
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
}

.suit-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.suit-btn {
  background: #fff0d0;
  border: none;
  padding: 12px 20px;
  border-radius: 60px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.suit-btn.hearts {
  background: #f9b5b5;
  color: #a12222;
}

.suit-btn.spades {
  background: #c9d8e6;
  color: #1f3b4c;
}
.suit-btn.diamonds {
  background: #e9db8f;
  color: #b8860b;
}
.suit-btn.clubs {
  background: #b0d9b1;
  color: #2e5c2e;
}
.suit-btn:hover {
  transform: scale(1.05);
  filter: brightness(0.95);
}
.timer-display {
  background: #000000aa;
  display: inline-block;
  padding: 6px 20px;
  border-radius: 50px;
  color: #ffeaac;
  font-size: 1.1rem;
}
.scores-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.team-score {
  color: wheat;
  padding: 5px 15px;
  border-radius: 40px;
  font-weight: bold;
}
