/* public/style.css - الإضافات */

/* :root{
  background-imag-2:"../imgs/3.jpg";
} */

/* شاشة الترحيب */
* {
  box-sizing: border-box;
  user-select: none;
}

.container {
  display: flex;
  background:
    linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7)),
    url("../imgs/3.jpg");
  min-height: 100vh;
  padding: 5px 0;
}

.container#blue {
  background:
    linear-gradient(#3498db2e, rgba(0, 0, 0, 0.7)), url("../imgs/3.jpg");
}
.container#red {
  background:
    linear-gradient(#e74c3c29, rgba(0, 0, 0, 0.7)), url("../imgs/3.jpg");
}

/* menu */

#menu #memory-game-btn {
  font-size: 1.5rem;
  position: absolute;
  z-index: 99;
  top: 22px;
  right: 22px;
  background-color: #ffffff26;
  border-radius: 100%;
  width: 35px;
  height: 35px;
  text-align: center;
  backdrop-filter: blur(2px);
  cursor: pointer;
}

#welcome {
  width: 96%;
  margin: auto;
  max-width: 1200px;
  backdrop-filter: blur(3px);
  text-align: center;
  padding: 50px 20px;
  /* background: rgba(20, 25, 40, 0.95); */
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  border-radius: 6px;
  color: white;
  min-height: 100vh;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: welcomeFadeIn 0.8s ease-out;
}

@keyframes welcomeFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
/* تحسين العنوان */
#welcome h1 {
  font-size: 3.5rem;
  margin: 0;
  background: linear-gradient(45deg, #ff9f43, #ff6b6b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 5px 15px rgba(255, 159, 67, 0.3);
  position: relative;
}

#welcome h1::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #ff9f43, #ff6b6b);
  border-radius: 2px;
}

.subtitle {
  color: #b0b7c3;
  font-size: 1.3rem;
  text-align: center;
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* تحسين نموذج الترحيب */
.welcome-form {
  width: 100%;
  max-width: 800px;
  background: rgba(30, 35, 50, 0.8);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
#player-name {
  width: 100%;

  padding: 18px 25px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  color: white;
  font-size: 1.2rem;
  transition: all 0.3s;
}

#player-name:focus {
  outline: none;
  border-color: #ff9f43;
  box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.2);
  background: rgba(0, 0, 0, 0.5);
}

#player-name::placeholder {
  color: #8a94a6;
}
.welcome-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.btn-create {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 20px 30px;
  border-radius: 15px;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

#mg-btn-create {
  background: linear-gradient(135deg, #f4da00 0%, #ff8300 100%);
}
#hokm-create-room {
  background: linear-gradient(135deg, #dd2a2a 0%, #510c0c 100%);
  /* box-shadow: 0 10px 20px rgba(234, 102, 102, 0.3); */
}

.btn-create-chess {
  background: linear-gradient(135deg, #0de1cd 0%, #005779 100%);
}
.btn-create-lodo {
  background: linear-gradient(135deg, #6add2a 0%, #2b510c 100%);
}

.btn-create:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(102, 126, 234, 0.4);
}

#code-input {
  width: calc(70% - 20px);
  padding: 20px 25px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  color: white;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 3px;
  font-weight: bold;
  transition: all 0.3s;
}

#code-input:focus {
  outline: none;
  border-color: #4cd964;
  box-shadow: 0 0 0 3px rgba(76, 217, 100, 0.2);
  background: rgba(0, 0, 0, 0.5);
}

#btn-join {
  width: 30%;
  background: linear-gradient(135deg, #4cd964 0%, #2ecc71 100%);
  border: none;
  padding: 20px 30px;
  border-radius: 15px;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(76, 217, 100, 0.3);
}

#btn-join:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(76, 217, 100, 0.4);
}

/* تحسين قسم التعليمات */
.instructions {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  padding: 25px;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.instructions h3 {
  color: #ff9f43;
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.instructions ul {
  list-style: none;
  padding: 0;
}

.instructions li {
  color: #b0b7c3;
  padding: 10px 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.instructions li:last-child {
  border-bottom: none;
}

/* تحسين عرض الغرف المتاحة */
.welcome-room-container {
  width: 100%;
  max-width: 800px;
  background: rgba(30, 35, 50, 0.8);
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-room-container h2 {
  color: #ff9f43;
  font-size: 1.8rem;
  margin-bottom: 25px;
  text-align: center;
}

#welcome-rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 10px;
}

/* تخصيص شريط التمرير */
#welcome-rooms::-webkit-scrollbar {
  width: 8px;
}

#welcome-rooms::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

#welcome-rooms::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
}

.welcome-room-list {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #b0b7c3;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
}

.welcome-room-list::before {
  content: "🎮";
  margin-left: 10px;
}

.welcome-room-list:hover {
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.2),
    rgba(118, 75, 162, 0.2)
  );
  border-color: rgba(102, 126, 234, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.welcome-room-list::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.welcome-room-list:hover::after {
  transform: translateX(100%);
}
/* تحسينات للهواتف */
@media (max-width: 768px) {
  #welcome h1 {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .welcome-form {
    padding: 25px;
  }

  #player-name,
  #code-input {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .btn-create,
  #btn-join {
    padding: 18px 5px;
    font-size: 0.9rem;
  }

  .instructions {
    padding: 20px;
  }

  .instructions li {
    font-size: 1rem;
  }

  .welcome-room-container {
    padding: 20px;
  }

  #welcome-rooms {
    grid-template-columns: 1fr;
  }
}

/* تأثيرات إضافية */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 159, 67, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 159, 67, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 159, 67, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* أنماط النافذة المنبثقة */
.create-room-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.create-room-modal .create-room-modal-content {
  background-color: #1a1a2e;
  border-radius: 15px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 2px solid #2d4059;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.create-room-modal .modal-header {
  background: linear-gradient(135deg, #2d4059, #1a1a2e);
  padding: 20px;
  /* border-bottom: 2px solid #00adb5; */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.create-room-modal .modal-header h2 {
  margin: 0;
  color: #eeeeee;
  font-size: 1.5rem;
}

.create-room-modal .close-modal {
  color: #eeeeee;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.create-room-modal .close-modal:hover {
  color: #00adb5;
}

.create-room-modal .modal-body {
  padding: 25px;
}

.create-room-modal .modal-footer {
  padding: 20px;
  background-color: #16213e;
  border-top: 1px solid #2d4059;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* عناصر النموذج */
.create-room-modal .form-group {
  margin-bottom: 25px;
}

.create-room-modal .form-group label {
  /* display: block; */
  width: 100%;
  margin-bottom: 8px;
  color: #eeeeee;
  font-weight: bold;
  font-size: 1rem;
}

.create-room-modal .form-group input[type="text"],
.create-room-modal .form-group input[type="password"],
.create-room-modal .form-group select {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 2px solid #2d4059;
  background-color: #16213e;
  color: #eeeeee;
  font-size: 1rem;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.create-room-modal .form-group input:focus,
.create-room-modal .form-group select:focus {
  outline: none;
  border-color: #00adb5;
}

/* مجموعة الأزرار الراديوية */
.create-room-modal .radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.create-room-modal .radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 15px;
  border-radius: 8px;
  border: 2px solid #2d4059;
  background-color: #16213e;
  transition: all 0.3s;
}

/* اخفاء دائرة الاختيار */
.radio-option input {
  display: none;
}

.create-room-modal .radio-option:hover {
  border-color: #00adb5;
  background-color: rgba(0, 173, 181, 0.1);
}

.create-room-modal .radio-option input[type="radio"] {
  margin-left: 10px;
  transform: scale(1.2);
}

.create-room-modal .radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
}

.create-room-modal .radio-icon {
  font-size: 1.2rem;
  width: 30px;
  text-align: center;
}

.create-room-modal .radio-text {
  color: #eeeeee;
  font-size: 1rem;
}

.create-room-modal .radio-option input:checked + .radio-label {
  color: #00adb5;
}

/* في حالة أنك تستخدم .radio-option مباشرة بدلاً من label */
.radio-option:has(input[type="radio"]:checked) {
  border-color: #00adb5 !important;
  background-color: rgba(0, 173, 181, 0.1) !important;
}

/* الأزرار */
.create-room-modal .btn-primary,
.btn-secondary {
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00adb5, #0097a7);
  color: white;
}

.create-room-modal .btn-primary:hover {
  background: linear-gradient(135deg, #0097a7, #00838f);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 173, 181, 0.4);
}

.create-room-modal .btn-secondary {
  background-color: #2d4059;
  color: #eeeeee;
}

.create-room-modal .btn-secondary:hover {
  background-color: #394867;
}

/* نصوص المساعدة */
.create-room-modal .hint {
  display: block;
  margin-top: 5px;
  color: #888;
  font-size: 0.85rem;
}

/* استجابة للهواتف */
@media (max-width: 600px) {
  .create-room-modal .modal-content {
    width: 95%;
    margin: 10px;
  }

  .create-room-modal .radio-group {
    flex-direction: row;
  }

  .create-room-modal .modal-footer {
    /* flex-direction: column; */
  }

  .create-room-modal .btn-primary,
  .btn-secondary {
    width: 100%;
    margin-bottom: 10px;
  }
}

/* شاشة اللوبي */
.lobby {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  #lobby .lobby-header {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

#lobby h2,
#lobby h3 {
  color: #cccbcb;
}

.lobby-controls {
  display: flex;
  gap: 20px;
  margin: 30px 0;
}

.lobby-controls button {
  padding: 12px 10px;
  border-radius: 5px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 165px;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#ready-btn {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
}

#ready-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(46, 204, 113, 0.4);
}

#start-game-btn {
  background: linear-gradient(135deg, #ff9f43, #ff7f00);
  color: white;
}

#start-game-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(255, 159, 67, 0.4);
}

#start-game-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

#leave-btn {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
}

#leave-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(231, 76, 60, 0.4);
}

.players-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 30px 0;
}

.player-item {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 200px;
  margin-bottom: 2px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.2),
    rgba(118, 75, 162, 0.2)
  );
  color: #ccc;
}

.word-type {
  margin: 5px;
}

.word-type > label {
  color: #cccbcb;
  font-weight: bold;
  font-size: 1.2rem;
  display: block;
  margin-bottom: 5px;
}

.word-type .radio-group .radio-option {
  display: inline-block;
  background-color: white;
  padding: 10px;
  margin-left: 5px;
  border-radius: 5px;
  font-size: 0.8rem;
}

.word-type .radio-option input[type="radio"] + .radio-label {
  color: #00adb5;
  background-color: rgba(0, 173, 181, 0.1) !important;
}

.word-type .radio-option:has(input[type="radio"]) {
  border-color: #00adb5 !important;
  background-color: rgba(0, 173, 181, 0.1) !important;
}

.word-type .radio-group .radio-option input[type="radio"]:checked ~ * {
  border-color: rgb(255, 159, 67);

  background: rgba(255, 159, 67, 0.2);

  box-shadow: rgba(255, 159, 67, 0.2) 0px 5px 15px;
}

.word-type
  .radio-group
  .radio-option
  input[type="radio"]:checked
  + .radio-label {
  color: rgb(255, 159, 67);
}
/*  */
.player-item.blue {
  border-right: 5px solid #3498db;
}

.player-item.red {
  border-right: 5px solid #e74c3c;
}

.player-item.ready {
  background: #e8f8f1;
  color: #555;
}

.player-name {
  font-weight: bold;
}

.player-status {
  color: #666;
  font-size: 0.9em;
}

.team-selection {
  background: white;
  padding: 25px;
  border-radius: 15px;
  margin: 20px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.team-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.team-select {
  /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
  padding: 15px 25px;
  border: 2px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 200px;
  text-align: center;
}

.team-select:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.team-select.selected {
  border-color: #2ecc71;
  background: #e8f8f1;
  font-weight: bold;
}

.team-select.blue {
  background: #e8f2ff;
  border-color: #3498db;
}

.team-select.red {
  background: #ffe8e8;
  border-color: #e74c3c;
}

/* تحسينات للهواتف */
@media (max-width: 768px) {
  .lobby-controls {
    gap: 10px;
  }
  .lobby-controls button {
    font-size: 0.8rem;
    min-width: unset;
    padding: 10px;
  }
}

.game {
  height: fit-content;
  /* min-height: 100vh; */
  width: 100%;
}

.game-container {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.current-clue-section {
  width: 100%;
  margin: 15px;
  padding: 0 10px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-board {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* شاشة اللعبة */
.game-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* background: white; */
  padding: 15px 25px;
  border-radius: 10px;
  margin-bottom: 20px;
  /* box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1); */
}

.game-header .room-info {
  display: none;
}

.scores {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  width: 50%;
  color: white;
}
@media (max-width: 768px) {
  .scores {
    width: 100%;
  }
}

.scores .score-info {
  display: flex;
  width: 100%;
  text-align: center;
}

.scores .score-info > div {
  width: 100%;
}

.scores .score-info .score {
  border-radius: 0px 5px 5px 0px;
  background-color: black;
}

.scores .score-info .score.blue {
  background-color: #3498db;
}

.scores .score-info .score.red {
  background-color: #e74c3c;
}

.scores .score-info .remaining {
  background-color: #dbdad1;
  color: #333;
}

.scores .score-info .foul-word {
  background-color: #000;
  color: white;
}

.scores .score-info .clue-word-count {
  background-color: yellow;
  color: #000;
  border-radius: 5px 0px 0px 5px;
}

.scores .foul-word,
.scores .clue-word-count {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scores .word-icon {
  /* position: absolute; */
  /* opacity: 0.5; */
  font-size: 0.8rem;
}

.turn-indicator {
  padding: 10px 20px;
  border-radius: 20px;
  color: white;
  font-weight: bold;
}

.turn-blue {
  background: #3498db;
}

.turn-red {
  background: #e74c3c;
}

.game-controls {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin: 20px 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.clue-section {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 2px dashed #ddd;
}

.current-clue {
  font-size: 1.5em;
  text-align: center;
  /* margin: 15px 0; */
  /* padding: 15px; */
  /* background: white; */
  /* border-radius: 10px; */
  /* border: 2px solid #3498db; */
}

.current-clue #currentClueSpan {
  background: #3a3b3c;
  width: 30px;
  display: inline-block;
  border-radius: 60px;
}

@media (max-width: "768px") {
  .current-clue {
    font-size: 1.2em;
    border: none;
  }
}

.spymaster-tools {
  width: 100%;
}

.spymaster-tools h3 {
  color: white;
}

.clue-inputs {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.spymaster-tools input {
  padding: 10px;
  margin: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
}
.spymaster-tools #clue-input {
  width: 40%;
}
.spymaster-tools button {
  background: #2ecc71;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px;
}

.spymaster-tools button:disabled {
  background: #95a5a6;
  cursor: not-allowed;
}

.spymaster-tools .hint {
  color: white;
}

.chat-container {
  /* background: white; */
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-top: 20px;
  width: 50%;
}
@media (max-width: 768px) {
  .game-board {
    width: 100%;
  }
  .chat-container {
    width: 100%;
  }
}
.chat-messages {
  height: 300px;
  overflow-y: auto;
  padding: 15px;
  /* background: #f8f9fa; */
}

.chat-input-container {
  display: flex;
  padding: 15px;
}

@media (max-width: 768px) {
  .chat-input-container {
    padding: 10px;
  }
}

#chat-input {
  width: 100%;
}

.chat-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
  margin-left: 2px;
}

.chat-send {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 10px;
  margin-left: 10px;
  border-radius: 5px;
  cursor: pointer;
}

.chat-message {
  padding: 10px;
  margin: 5px 0;
  border-radius: 5px;
  background: white;
}

.chat-message.system {
  background: #ecf0f1;
  text-align: center;
  font-style: italic;
  color: #666;
}

.chat-message.clue {
  background: #fffde7;
  border-left: 4px solid #f39c12;
}

.chat-message.reveal {
  background: #e8f8f1;
  border-left: 4px solid #2ecc71;
}

.chat-message.blue {
  border-left: 4px solid #3498db;
}

.chat-message.red {
  border-left: 4px solid #e74c3c;
}

/* الكروت في اللعبة */
.card {
  background: #00000091;
  backdrop-filter: blur(2px);
  /* border: 2px solid #ddd; */
  padding: 20px 10px;
  text-align: center;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  width: 18%;
  margin: 2px;
  position: relative;
  color: white;
}

.card:not(.spymaster-cards) {
  border-radius: 8px;
}

.card:not(.spymaster-cards):not(.card.revealed) {
  /* background: url("./imgs/4.jpg"); */
  /* background-size: cover; */
  background-color: white;
  background: linear-gradient(135deg, #aaa 0%, #fff 100%);
  color: #000;
  /* border: 13px solid #ddd; */
}
@media (max-width: 768px) {
  .card:not(.spymaster-cards):not(.card.revealed) {
    /* border: 5px solid #ddd; */
  }
}
.card.mark {
  border: 2px solid rgb(0, 255, 64) !important;
  transition: 0.1s;
}

.card:hover:not(.revealed) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* للملمحين: ألوان خلفية */
.card.spymaster-blue {
  background: rgba(52, 152, 219, 0.2);
  border-color: #3498db;
}

.card.spymaster-red {
  background: rgba(231, 76, 60, 0.2);
  border-color: #e74c3c;
}

.card.spymaster-neutral {
  background: rgba(243, 156, 18, 0.2);
  border-color: #f39c12;
}

.card.spymaster-assassin {
  background: rgba(44, 62, 80, 0.2);
  border-color: #2c3e50;
}

/* الكروت المقلوبه */
.card.revealed {
  cursor: default;
  opacity: 0.9;
}

.card.blue {
  background: #3498db;
  color: white;
}

.card.red {
  background: #e74c3c;
  color: white;
}

.card.neutral {
  background: #f39c12;
  color: white;
}

.card.assassin {
  background: #2c3e50;
  color: white;
}

.card .reveal-card-btn {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 18px;
  z-index: 999;
}

.card.spymaster-cards .reveal-card-btn {
  display: none;
}

/* نافذة نهاية اللعبة */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 15px;
  max-width: 500px;
  text-align: center;
  animation: popup 0.5s;
}

@keyframes popup {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal h2 {
  color: #2c3e50;
  margin-bottom: 20px;
}

.modal .winner {
  font-size: 2em;
  font-weight: bold;
  color: #2ecc71;
  margin: 20px 0;
}

.modal button {
  background: #3498db;
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 25px;
  font-size: 1.2em;
  cursor: pointer;
  margin-top: 20px;
}

/* تنسيقات للهواتف */
@media (max-width: 768px) {
  .container {
    display: block;
  }
  #board {
    grid-template-columns: repeat(3, 1fr);
  }

  .card {
    min-height: 80px;
    padding: 15px 5px;
    /* font-size: 0.8em; */
  }
  .card .reveal-card-btn {
    font-size: 16px;
    top: 2px;
    left: 4px;
  }
  .game-header {
    flex-direction: column;
    gap: 15px;
  }

  .team-buttons {
    flex-direction: column;
  }
}
