/* =========================================================
   PROFILE MODAL POSITION - مهم جدًا
========================================================= */

#profile-modal {
  display: none;
  position: fixed;
  top: 2%;
  left: 50%;
  transform: translate(-50%, 0);

  z-index: 100003 !important;

  animation-fill-mode: forwards;
}

#profile-overlay {
  position: fixed;
  top: 0;
  left: 0;

  width: 100vw;
  height: 100vh;

  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2px);

  z-index: 100002 !important;

  opacity: 0;
  animation-fill-mode: forwards;
}
/* =========================================================
   PROFILE CONTENT - SIMPLE OLD STYLE
   نفس أسلوب مودال COINFLIP
========================================================= */

/* تحريك الـ ID - نفس المكان */
#player-id {
  position: relative;
  top: -35px;
  left: -35px;

  font-size: 14px;
  font-weight: bold;
  color: #fff;
}

/* ID بسيط */
.player-id-text {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

/* صورة البروفايل - نفس المكان والحجم */
#profile-pic-box {
  position: relative;
  top: -40px;
  left: -35px;

  background: #1d1d1d !important;
  border: 1px solid #3a3a3a !important;
  border-radius: 6px !important;

  box-shadow: none !important;
}

/* الإحصائيات */
#profile-stats {
  position: relative;
  margin-left: -30px;
  top: -10px !important;

  display: flex;
  gap: 16px;
}

/* بوكسات الإحصائيات */
#profile-stats > div {
  width: 280px !important; /* أطول أفقيًا */
  height: 82px !important;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      110deg,
      rgba(20, 80, 43, 0.22) 0%,
      rgba(28, 45, 34, 0.16) 45%,
      #1d1d1d 100%
    ) !important;

  border: 1px solid rgba(50, 205, 114, 0.38) !important;
  border-radius: 5px !important;

  box-shadow:
    inset 0 0 20px rgba(50, 205, 114, 0.035),
    0 0 4px rgba(50, 205, 114, 0.05) !important;
}

/* عنوان الإحصائية */
#profile-stats > div > div:first-child {
  color: #c7c7c7 !important;
  font-size: 13px !important;
  font-weight: normal !important;
  margin-bottom: 6px;
}

/* الأرقام */
#total-deposited,
#total-won {
  color: #32cd72 !important;
  font-size: 23px !important;
  font-weight: bold !important;
  text-shadow: 0 0 6px rgba(50, 205, 114, 0.18) !important;
}
/* =========================================================
   TRADE URL
========================================================= */

#profile-steam-box {
  position: relative;
  margin-left: 190px;
  top: -110px !important;
}

#profile-steam-box > div:first-child {
  color: #aaa !important;
  font-size: 14px !important;
}

#profile-steam-box a {
  color: #a259ff !important;
}

#profile-steam-box a:hover {
  color: #b878ff !important;
}

/* حقل Trade URL */
#trade-url-input {
  background: #191919 !important;
  color: #fff !important;

  border: 1px solid #3d3d3d !important;
  border-radius: 5px !important;

  outline: none;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

#trade-url-input:hover {
  border-color: #555 !important;
}

#trade-url-input:focus {
  background: #1d1d1d !important;
  border-color: #a259ff !important;
}

/* زر SAVE الخاص بالرابط */
#profile-steam-box button {
  background: linear-gradient(
    180deg,
    #aa68ff 0%,
    #8b3fe0 100%
  ) !important;

  color: #fff !important;

  border: 1px solid #b678ff !important;
  border-radius: 4px !important;

  font-weight: bold;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

#profile-steam-box button:hover {
  background: linear-gradient(
    180deg,
    #b87cff 0%,
    #984cec 100%
  ) !important;

  border-color: #c591ff !important;
}


/* =========================================================
   SETTINGS BAR
========================================================= */

.settings-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #1d1d1d;

  padding: 8px 15px;

  border: 1px solid #333;
  border-radius: 6px;

  margin-top: -70px;
  margin-bottom: 15px;
}

.settings-bar:hover {
  box-shadow: none !important;
}


/* =========================================================
   LEFT - REFERRAL
========================================================= */

.left-section {
  display: flex;
  gap: 8px;
  align-items: center;
}

.referral-input {
  padding: 6px 9px;

  background: #191919;
  color: #fff;

  border: 1px solid #3d3d3d;
  border-radius: 4px;

  outline: none;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.referral-input:hover {
  border-color: #555;
}

.referral-input:focus {
  background: #1d1d1d;
  border-color: #a259ff;
}

/* Referral SAVE */
.left-section .save-btn {
  padding: 6px 13px;

  background: linear-gradient(
    180deg,
    #aa68ff 0%,
    #8b3fe0 100%
  );

  color: #fff;

  border: 1px solid #b678ff;
  border-radius: 4px;

  font-weight: bold;
  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.left-section .save-btn:hover {
  background: linear-gradient(
    180deg,
    #b87cff 0%,
    #984cec 100%
  );

  border-color: #c591ff;

  transform: none;
  box-shadow: none;
}


/* =========================================================
   RIGHT - SOUND + SELFBAN
========================================================= */

.right-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* SOUND label */
.sound-label {
  color: #aaa;
  font-size: 12px;
  font-weight: bold;
}

/* SOUND ON */
.sound-toggle {
  min-width: 46px;
  padding: 6px 11px;

  background: linear-gradient(
    180deg,
    #38bd70 0%,
    #238b4e 100%
  );

  color: #fff;

  border: 1px solid #43cb7c;
  border-radius: 4px;

  font-size: 11px;
  font-weight: bold;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.sound-toggle:hover {
  background: linear-gradient(
    180deg,
    #45cf80 0%,
    #2a9c5a 100%
  );

  border-color: #59dc91;
}

/* SOUND OFF */
.sound-toggle.off {
  background: linear-gradient(
    180deg,
    #d95862 0%,
    #a8323c 100%
  );

  border-color: #e66a74;
}

.sound-toggle.off:hover {
  background: linear-gradient(
    180deg,
    #e96872 0%,
    #bd3b47 100%
  );
}


/* =========================================================
   SELFBAN
========================================================= */

.slafban {
  padding: 6px 12px;

  background: linear-gradient(
    180deg,
    #d95862 0%,
    #a8323c 100%
  );

  color: #fff;

  border: 1px solid #e66a74;
  border-radius: 4px;

  font-size: 11px;
  font-weight: bold;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.slafban:hover {
  background: linear-gradient(
    180deg,
    #e96872 0%,
    #bd3b47 100%
  );

  border-color: #f07b84;
}

/* =========================================================
   GAME HISTORY TITLE
========================================================= */

.section-title {
  text-align: center;
  margin: 30px 0;
}

.divider-line {
  width: 100%;
  height: 1px;

  background: #333;

  margin-bottom: 8px;
}

.section-title span {
  font-size: 14px;
  font-weight: bold;
  color: #fff;
}


/* =========================================================
   GAME HISTORY - OLD SIMPLE SITE STYLE
========================================================= */

.history-container {
  width: 100%;
  margin-top: 15px;

  background: #1a1a1a;

  border: 1px solid #333;
  border-radius: 6px;

  box-sizing: border-box;

  overflow-y: auto;
  overflow-x: hidden;

  position: relative;

  scrollbar-width: thin;
  scrollbar-color: #555 #1a1a1a;
}

.history-container::-webkit-scrollbar {
  width: 8px;
}

.history-container::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.history-container::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.history-container::-webkit-scrollbar-thumb:hover {
  background: #a259ff;
}


/* TABLE */
.history-table {
  width: 100%;
  border-collapse: collapse;

  font-family: "Segoe UI", Tahoma, sans-serif;
}


/* رأس الجدول */
.history-table thead th {
  background: #222;

  color: #ccc;

  font-size: 12px;
  font-weight: bold;

  padding: 10px;

  border-right: 1px solid #333;
  border-bottom: 1px solid #444;
}

.history-table thead th:last-child {
  border-right: none;
}


/* الصفوف */
.history-table tbody td {
  background: #1d1d1d;

  color: #fff;

  padding: 10px;

  text-align: center;

  font-size: 12px;
  font-weight: 600;

  border-right: 1px solid #2d2d2d;
  border-bottom: 1px solid #333;
}

.history-table tbody td:last-child {
  border-right: none;
}

.history-table tbody tr:nth-child(even) td {
  background: #202020;
}


/* Hover بسيط جدًا */
.history-table tbody tr {
  cursor: pointer;
}

.history-table tbody tr:hover td {
  background: #29252f !important;
  box-shadow: none !important;
}


/* =========================================================
   COIN
========================================================= */

.coin-img {
  width: 26px;
  height: 26px;

  border-radius: 50%;

  display: block;
  margin: auto;
}


/* =========================================================
   STATUS - TEXT ONLY (NOT CLICKABLE)
========================================================= */

.badge {
  display: inline-block;
  padding: 4px 6px;

  background: none !important;
  border: none !important;
  border-radius: 0 !important;

  font-size: 12px;
  font-weight: bold;
  text-align: center;

  cursor: default;
}

/* COMPLETED */
.badge.accepted {
  color: #3cff9b;
}

/* LOST */
.badge.lost {
  color: #ff6b6b;
}

/* PENDING */
.badge.pending {
  color: #aaa;
}

/* CANCELED */
.badge.canceled,
.badge.cancelled {
  color: #999;
}

/* ERROR */
.badge.error,
.badge.expired {
  color: #ff6b6b;
}


/* =========================================================
   CLICKABLE ACTIONS
   TEXT + SMALL ANIMATED UNDERLINE
========================================================= */

.btn {
  position: relative;
  display: inline-block;

  min-width: 0;
  padding: 5px 8px 8px;

  background: none !important;
  border: none !important;
  border-radius: 0 !important;

  font-size: 12px;
  font-weight: bold;

  cursor: pointer;
  overflow: visible;

  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

/* الخط الصغير تحت الكلمة */
.btn::after {
  content: "";

  position: absolute;
  left: 50%;
  bottom: 2px;

  width: 16px;
  height: 1px;

  background: currentColor;

  transform: translateX(-50%);

  transition: width 0.25s ease;
}

/* عند وضع الماوس يتمدد الخط أفقياً */
.btn:hover::after {
  width: calc(100% - 8px);
}


/* CANCEL */
.btn.cancel {
  color: #ff6b6b;
}


/* RESEND */
.btn.resend {
  color: #6ab0ff;
}

/* ACCEPT TRADE */
.btn.accept {
  color: #3cff9b;
}


/* =========================================================
   BUTTON INTERACTIONS
========================================================= */

.btn:hover {
  background: none !important;
  transform: none !important;
}

.btn:active {
  transform: none !important;
  opacity: 0.7;
}


/* =========================================================
   DISABLED
========================================================= */

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* لا يتمدد الخط للزر المعطل */
.btn:disabled:hover::after {
  width: 16px;
}


/* =========================================================
   LOADING
========================================================= */

.spinner {
  width: 16px;
  height: 16px;

  border: 2px solid rgba(255,255,255,0.25);
  border-top: 2px solid #fff;

  border-radius: 50%;
  display: inline-block;

  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.btn.loading {
  opacity: 0.7;
}

/* =========================================================
   HISTORY PAGINATION - FINAL
========================================================= */

#history-pagination {
  display: flex;
  justify-content: center;
  align-items: center;

  gap: 16px;
  margin-top: 16px;
}

/* الزرين */
#history-prev,
#history-next {
  position: relative;

  min-width: 90px;
  height: 34px;

  padding: 0 14px;

  background: #222 !important;
  color: #ddd !important;

  border: 1px solid #444 !important;
  border-radius: 4px !important;

  font-size: 11px;
  font-weight: bold;

  cursor: pointer;

  transform: none !important;
  box-shadow: none !important;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease !important;
}

/* إلغاء اللمعة القديمة */
#history-prev::before,
#history-prev::after,
#history-next::before,
#history-next::after {
  display: none !important;
}

/* Hover */
#history-prev:hover:not(:disabled),
#history-next:hover:not(:disabled) {
  background: #2c2633 !important;
  color: #fff !important;
  border-color: #a259ff !important;

  transform: none !important;
  box-shadow: none !important;
}

/* الزر غير المتاح */
#history-prev:disabled,
#history-next:disabled {
  background: #1b1b1b !important;
  color: #555 !important;
  border-color: #2d2d2d !important;

  opacity: 1 !important;
  cursor: not-allowed;
}

/* رقم الصفحة */
#history-page-info {
  min-width: 80px;

  color: #aaa !important;

  font-size: 12px !important;
  font-weight: bold !important;

  text-align: center;
}