@font-face {
  font-family: 'Helvetica-Bold';
  src: url('assets/Helvetica-Bold.ttf');
}


@font-face {
  font-family: 'Helvetica-Medium';
  src: url('assets/Helvetica-Regular.ttf');
}

@font-face {
  font-family: 'Helvetica-Regular';
  src: url('assets/Helvetica-Regular.ttf');
}

* {
  font-family: 'Helvetica-Medium', sans-serif;
}

:root {
  --bg1: #0b1020;
  --accent: #4b9ed4;
  --glass: rgba(255,255,255,0.06);
  --text: #e6eef8;
  --card-bg: rgba(25,25,30,0.9);
  --accent: #4b9ed4;
  --danger: #ff4b4b;
  --success: #2ebf7a;
  --muted: rgba(255,255,255,0.6);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica-Medium', sans-serif;
  background-color: #232b31;
  /*background: linear-gradient(330deg, #54ac8d 25%, #bbc453 100%);
    background-image: url("assets/back.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    height: 100vh;
    background-attachment: fixed;*/
}

.content.active#tap {
  height: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 20px 80px 20px;
  background: linear-gradient(180deg, #000000 30%, #4b9ed4 130%);
  transition: background-position 0.2s ease;
  background-position: 0 0;
  margin-bottom: -50px;
}

.header.active {
  background-position: 0 -20px;
}

.header img {
  height: 40px;
}

.header .user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
}

.header .user-info span {
  font-size: 14px;
  margin-left: -3px;
}

.content {
  text-align: center;
  padding: 20px;
  display: none;
  background: #232b31;
  border-radius: 40px 40px 0 0;
  box-shadow: 0 -4px 0 #4b9ed4;
}

.content.active {
  display: block;
}

.content h1 {
  font-size: 18px;
  color: #666;
  margin-bottom: 20px;
}

.coin-info-boxes {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 35px;
}

.coin-box {
  width: 105px;
  height: 55px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 12px;
  color: #fff;
  padding: 0px;
}

.coin-box p {
  padding: 0;
  margin: 0;
}

.coin-box p:first-child {
  color: #4b9ed4;
  margin-bottom: 4px;
}

.coin-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  width: 300px;
  height: 300px;
  /*background-color: #ffffff42;
    border: 4px solid #ffffff88;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);*/
  border-radius: 15px;
  perspective: 1000px;
  backdrop-filter: blur(2px);
}

.coin-container img {
  max-width: 80%;
  max-height: 80%;
  transition: transform 0.1s ease;
  transform-origin: center;
}

.footer {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px;
  background-color: #00000080;
  border-radius: 20px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: -webkit-fill-available;
  box-shadow: 0 0 7px 2px #4b9ed4e9;
  margin: 15px 20px;
  backdrop-filter: blur(5px);
}

.footer .icon {
  text-align: center;
  border-radius: 10px;
  color: #a5a5a5;
  width: 100%;
  padding: 10px 0px;
  align-content: center;
}

.footer .icon i {
  font-size: 20px;
}

.footer .icon p {
  margin: 5px 0 0;
  font-size: 12px;
}

.footer .icon.active {
  background-color: #4b9ed4;
  color: white;
  border-radius: 10px;
  transition: 0.3s linear;
}

.coin-count {
  font-size: 40px;
  margin: 20px auto;
  color: #fff;
  text-shadow: 0 0 4px #000;
}

.energy-bar-container {
  transition: width 0.3s;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 50px;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 100px;
}

.energy-bar {
  width: 100%;
  max-width: 300px;
  height: 12px;
  background-color: #ffffff88;
  border-radius: 10px;
  overflow: hidden;
}

.energy {
  height: 100%;
  width: 0%;
  background-color: #0088cc;
  border-radius: 0px;
  transition: width 0.4s;
}

#energy-text {
  font-size: 24px;
  color: #fff;
}

.float-number {
  position: absolute;
  font-size: 30px;
  font-weight: bold;
  color: #fff;
  animation: fadeUp 1s forwards;
}

.boost-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  margin-bottom: 100px;
}

.boost-cell {
  background-color: #00000060;
  padding: 15px;
  border-radius: 15px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.4);
  text-align: center;
  backdrop-filter: blur(2px);
}

.boost-image {
  max-width: 150px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.boost-title,
.boost-cell h3 {
  color: #fff;
  font-size: 20px;
  margin-bottom: 5px;
}

.boost-description,
.boost-cell p {
  color: #ccc;
  font-size: 14px;
  font-family: 'Helvetica-Regular', sans-serif;
}

.boost-button {
  width: 90%;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid #fff;
  font-size: 18px;
  font-family: 'Helvetica-Bold', sans-serif;
  padding: 15px 10px;
  margin: 25px 0px 10px;
  background: linear-gradient(45deg, #1d8cff 0%, #1d8cff 48%, #81bfff 49%, #81bfff 51%, #1d8cff 52%, #1d8cff 100%);
  background-size: 300% 300%;
  animation: glow-effect 3s ease infinite;
}

.mission-container {
  /*
    background: #0000005e;
    border-radius: 10px
    box-shadow: 0 0 0px 2px #4b9ed4e9;
    */
  padding: 10px;
  margin-bottom: 100px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mission-container h3 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 24px;
}

.mission-container p {
  color: white;
  font-size: 20px;
}

.mission {
  background: #4b9ed4;
  color: white;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: left;
  transition: transform 0.2s, background 0.3s ease, filter 0.3s ease;
  padding: 15px;
}

.mission.done {
  background: #2b526b;
  filter: blur(2px);
}

.mission-content {
  display: flex;
  align-items: center;
  font-family: 'Helvetica-Regular', sans-serif;
}

.mission-icon {
  width: 50px;
  height: 50px;
  margin-right: 15px;
}

.mission-details h3 {
  margin: 0;
  font-size: 16px;
  color: #fff;
}

.mission-details p {
  margin: 5px 0 0;
  font-size: 14px;
  color: #fff;
}

#leaderboard {
  margin-bottom: 90px;
}

.leaderboard-item {
  padding: 10px;
  margin: 5px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
}

.leaderboard-item.first-place {
  border: 4px solid #ffd700;
  font-weight: bold;
  margin: 5px 0;
  font-size: 22px;
  padding: 15px;
}

.leaderboard-item.second-place {
  border: 3px solid #7e7e7e;
  font-weight: bold;
  margin: 5px 5px;
  font-size: 20px;
  padding: 13px;
}

.leaderboard-item.third-place {
  border: 3px solid #cd7f32;
  font-weight: bold;
  margin: 5px 10px;
  font-size: 18px;
  padding: 11px;
}

.leaderboard-item.current-user {
  background-color: #2b84be;
  color: white;
}

.after-top-ten {
  margin: 15px;
  border-top: 2px solid #ffffff50;
}

#ton-connect {
  display: flex;
  align-items: center;
  justify-content: center;
}

.invite-container {
  display: grid;
  max-width: 400px;
  margin: 20px auto;
  text-align: center;
  background: #00000080;
  border-radius: 10px;
  padding: 20px;
}

.invite-container p {
  color: #fff;
  font-family: 'Helvetica-Regular', sans-serif;
  margin-top: 0;
}

.invite-input {
  padding: 10px;
  font-size: 16px;
  border: 2px solid #4b9ed4;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  outline: none;
  color: #fff;
  font-family: 'Courier New', Courier, monospace;
  background-color: #00000080;
}

.button-container {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
}

.action-button {
  width: 100%;
  padding: 10px;
  background-color: #4b9ed4;
  color: white;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  gap: 7px;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-button:hover {
  background-color: #0d75bb;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: center;
  padding: 12px;
}

.table th {
  background-color: #4b9ed4;
  font-weight: bold;
  color: white;
}

.table tr:nth-child(even) {
  background-color: #1a1a1a;
}

.table tr {
  background-color: #121212;
}

.table td {
  font-family: 'Helvetica-Regular', sans-serif;
  color: #ddd;
}

.table-container {
  overflow-x: auto;
  max-height: 350px;
  scrollbar-width: thin;
  scrollbar-color: #3588be #f5f5f5;
  margin-bottom: 100px;
}

.table-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-container::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 8px;
}

.table-container::-webkit-scrollbar-thumb {
  background-color: #4b9ed4;
  border-radius: 8px;
  /* border: 2px solid #f5f5f5; */
}

.referrals-title {
  margin-top: 50px;
  margin-bottom: 0px;
  background: #00000080;
  padding: 20px;
  border-radius: 20px 20px 0 0;
  color: #fff;
}

.content.active#profile {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding-top: 50px;
  padding-bottom: 150px;
}

.profile-picture {
  width: 120px;
  height: 120px;
  border-radius: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-picture img {
  width: 100%;
  overflow: hidden;
  outline: 4px solid white;
  outline-offset: -2px;
  border-radius: 100%;
}

.profile-name {
  color: white;
  font-size: 24px;
}
/*
.profile-wallet {
  width: 300px;
  height: 260px;
  border-radius: 30px;
  margin-top: 20px;
  background-color: #141c1f;
  display: flex;
  flex-direction: column;
  color: white;
  align-items: center;
  box-shadow: inset 0px 0px 0px 2px #4b9ed4;
}

.profile-wallet-header {
  width: 100%;
  background-color: #141c1f;
  padding: 15px 0;
  border-radius: 40px;
  font-size: 20px;
  font-family: 'Helvetica-Bold', sans-serif;
  box-shadow: inset 0 0 0px 2px #4b9ed4;
}

.profile-wallet-body {
  width: 80%;
  height: 100%;
  margin: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.profile-wallet-item {
  display: flex;
  justify-content: space-between;
}

.profile-wallet-footer {
  width: 100%;
  background-color: #141c1f;
  padding: 15px 0;
  border-radius: 40px;
  font-size: 16px;
  box-shadow: inset 0 0 0px 2px #4b9ed4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Helvetica-Bold', sans-serif;
}

.wallet-action {
  flex: 1;
  text-align: center;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wallet-action.deposit {
  margin-left: -10px;;
}

.wallet-action.withdraw {
  border-right: 2px solid #4b9ed4;
}

.wallet-action i {
  font-size: 14px;
}*/

/* ================= WALLET BOX ================= */
.wallet-box {
  width: 300px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(75, 158, 212, 0.12);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  padding: 16px;
  margin-top: 18px;
  color: #fff;
  text-align: center;
  backdrop-filter: blur(8px);
}

.wallet-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 22px;
  margin-top: 0px;
  color: var(--accent);
}

.wallet-balances {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.wallet-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
}

.wallet-item i {
  font-size: 20px;
  margin-bottom: 4px;
  display: block;
  color: var(--accent);
}

.wallet-value {
  font-weight: bold;
  font-size: 16px;
}

.wallet-label {
  font-size: 11px;
  opacity: 0.7;
}

.withdraw-btn {
  background: linear-gradient(90deg, #4b9ed4, #0077b6);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  border-radius: 10px;
  padding: 8px 16px;
  margin-top: 8px;
  cursor: pointer;
  width: 100%;
  transition: 0.3s;
}

.withdraw-btn:hover {
  transform: scale(1.03);
  background: linear-gradient(90deg, #5ab8f5, #0094d8);
}

/* ================= POPUP ================= */
.withdraw-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px) brightness(0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.withdraw-popup.hidden {
  display: none;
}

.popup-content {
  background: rgba(25, 25, 30, 0.85);
  padding: 20px;
  border-radius: 16px;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.popup-content h3 {
  color: var(--accent);
  text-align: center;
  margin-bottom: 14px;
}

.popup-content label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  opacity: 0.8;
  color: white;
}

.card-input-group {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 4px;
}

.card-segment {
  width: 22%;
  padding: 8px;
  text-align: center;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
}

#cardOwner {
  width: calc(100% - 16px);
  direction: rtl;
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  margin-bottom: 12px;
  outline: none;
}

#submitWithdraw,
.cancel-btn {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: none;
  margin-top: 6px;
  cursor: pointer;
  transition: 0.2s;
}

#submitWithdraw {
  background: #4b9ed4;
  color: #fff;
  font-weight: bold;
  transition: all 0.3s ease;
}

#submitWithdraw:hover {
  background: #5ab8f5;
}

#submitWithdraw:disabled {
  background: #264f6a;
  color: #ffffff80;
  font-weight: normal;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}


#overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#popup {
  display: none;
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  padding-bottom: 100px;
  background-color: #000000d9;
  border-radius: 30px 30px 0 0;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: bottom 0.3s ease;
}

#closeButton {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #fff;
}

#popupTitle {
  text-align: center;
  font-size: 30px;
  margin: 50px 0;
  color: #fff;
}

#popupDescription {
  font-size: 20px;
  margin: 20px;
  color: #0983e0;
  font-family: 'Helvetica-Regular', sans-serif;
  text-align: center;
}

#confirmButton {
  display: block;
  width: 90%;
  padding: 15px;
  background: #4b9ed4;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  position: fixed;
  bottom: 5%;
  left: 5%;
  font-size: 20px;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #232b31;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-screen p {
  font-family: 'Helvetica-Regular', sans-serif;
  margin-top: 20px;
  font-size: 18px;
  color: var(--text);
}

.spinner {
  border: 8px solid #fff;
  border-top: 8px solid #4b9ed4;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1.2s ease-in-out infinite;
}

.wallet-container {
  margin-top: 30px;
}

.page-cell {
  position: fixed;
  top: 75px;
  color: white;
  background: #ffffff42;
  text-align: center;
  border-radius: 10px;
  padding: 10px;
  align-content: center;
  border: 2px solid #ffffff88;
  width: 30px;
  height: 30px;
}

.page-cell.right {
  right: 10px;
}


.page-cell.left {
  left: 10px;
}

.page-cell p {
  margin: 5px 0 0 0;
  font-size: 12px;
}

#popupInput {
  display: none;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
  width: -webkit-fill-available;
  margin: 20px;
  text-align: center;
}

#popupInput:focus {
  border-color: #00adee;
  box-shadow: 0 0 5px #008ed180;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes glow-effect {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

@keyframes fadeUp {
  0% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-60px);
  }
}



/* card */
.t-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  padding: 18px;
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(2,6,23,0.6);
  border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin: 20px 5px 120px 5px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700
}
.logo i {
  font-size: 20px;
  color: var(--accent)
}
.balance {
  font-size: 14px;
  opacity: 0.95
}

p.lead {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: rgba(230,238,248,0.85)
}

.field-label {
  display: block;
  font-size: 13px;
  margin: 8px 0 6px;
  color: rgba(230,238,248,0.95);
  text-align: left
}
.select-wrap {
  position: relative
}
select.select {
  outline: none;
  width: 100%;
  padding: 12px 42px 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  background: var(--glass);
  color: var(--text);
  appearance: none;
  font-size: 15px
}
select.select:focus {
  outline: none;
  box-shadow: none;
}
.select-wrap .fa-chevron-down {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.9;
  color: var(--text);
}

.time-group {
  display: flex;
  gap: 8px;
  margin: 10px 0
}
.time-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.03);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  backdrop-filter: blur(4px);
  transition: all .18s
}
.time-btn.actived {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 20px #4b9ed450;
  transform: translateY(-3px)
}

.price-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  color: var(--text);
  margin: 12px 0;
  border: 1px solid rgba(255,255,255,0.03);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent)
}
.price-amount {
  font-size: 20px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px
}
.price-note,.reward-note {
  font-size: 12px;
  opacity: 0.9
}

.rules {
  margin-top: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  text-align: left;
  color: var(--text);
}
.rules h3 {
  margin: 0 0 6px 0
}
.rules ul {
  margin: 0;
  padding: 0 0 0 16px
}
.rules li {
  font-size: 13px;
  line-height: 1.45
}

.actions {
  display: flex;
  justify-content: center;
  margin-top: 14px
}
.btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: 0;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all .22s
}
.start {
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 30px #4b9ed450;
  width: 100%;
  margin-bottom: 5px;
}
.cancel {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.2);
}
.cancel.actived {
  background: rgba(255,255,255,0.12);
}
.cancel.actived i {
  color: #e00;
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 900;
  background: #00000050;
  color: var(--text);
  backdrop-filter: blur(3px);
}
.modal.hidden {
  display: none
}
.modal-inner {
  max-width: 360px;
  min-width: 240px;
  padding: 18px;
  border-radius: 16px;
  text-align: center;
  background: #000000aa;
  border: 1px solid rgba(255,255,255,0.04)
}
.modal-ico {
  font-size: 34px;
  color: var(--accent);
  margin-bottom: 8px
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px
}
.btn-yes {
  background: var(--accent);
  color: white;
  border-radius: 12px;
  padding: 10px 14px;
  border: none;
}
.btn-no {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.1);
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text);
}

.tiny {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 10px
}

/* small responsive */
@media (max-width:420px) {
  .content {
    padding: 14px
  }
  h1 {
    font-size: 18px
  }
}

/* ---------- profile stats (added) ---------- */
.profile-stats {
  width: 300px;
  border-radius: 20px;
  padding: 12px;
  margin-top: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  border: 1px solid rgba(75,158,212,0.12);
  color: var(--text);
  font-family: 'Helvetica-Regular', sans-serif;
}

.profile-stats .stats-header {
  font-family: 'Helvetica-Bold', sans-serif;
  color: #fff;
  font-size: 16px;
  margin-bottom: 8px;
  text-align: left;
  padding-left: 6px;
}

.profile-stats .stats-grid {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.stat-item {
  width: 62px;
  text-align: center;
  padding: 8px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.01);
}

.stat-ico {
  width: 36px;
  height: 36px;
  margin: 0 auto 6px auto;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  font-size: 16px;
  color: var(--accent);
}

.stat-ico.total {
  background: rgba(75,158,212,0.12);
  color: #4b9ed4;
}
.stat-ico.win {
  background: rgba(46,204,113,0.10);
  color: #2ecc71;
}
.stat-ico.lose {
  background: rgba(255,80,80,0.08);
  color: #ff6b6b;
}
.stat-ico.draw {
  background: rgba(255,255,255,0.02);
  color: #cfcfcf;
}

.stat-num {
  font-family: 'Helvetica-Bold', sans-serif;
  font-size: 16px;
  margin-bottom: 4px;
  color: #fff;
}

.stat-label {
  font-size: 11px;
  color: rgba(230,238,248,0.6);
}

/* small screens */
@media (max-width: 420px) {
  .profile-stats, .profile-wallet {
    width: 92%;
    max-width: 360px;
  }
  .stat-item {
    width: 22%;
    padding: 6px;
  }
  .stat-ico {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .stat-num {
    font-size: 14px;
  }
}

/* ---------- Deposit Button (next to withdraw) ---------- */
.deposit-btn {
  background: linear-gradient(90deg, #2ebf7a, #25a25f);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  width: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}

.deposit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(38,166,91,0.12);
}

.btnd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg,#2ea7f2,#4b9ed4);
  box-shadow: 0 8px 24px rgba(75,158,212,0.12);
}
.btnd.secondary {
  background: linear-gradient(90deg,#2ebf7a,#25a25f);
}
.btnd.ghost {
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  box-shadow: none;
  border: 1px solid rgba(255,255,255,0.02);
}

/* Popup backdrop / layout */
.deposit-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px) brightness(.7);
  z-index: 2000;
}
.deposit-popup.hidden {
  display: none;
}

.popup {
  width: calc(95% - 32px);
  max-width: 420px;
  background: rgba(20,22,28,0.95);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.7);
  border: 1px solid rgba(255,255,255,0.04);
}
.popup h3 {
  margin: 0 0 10px 0;
  color: var(--accent);
  font-size: 18px
}
.popup p {
  color: white;
  direction: rtl;
}
.popup code {
  background-color: #ffffff20;
  border-radius: 6px;
  font-family: monospace;
  padding: 4px 6px;
}
.popup label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px
}

/* Upload box full width */
.upload-box {
  width: calc(100% - 24px);
  min-height: 120px;
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.upload-box:focus, .upload-box:hover {
  box-shadow: 0 10px 30px rgba(75,158,212,0.06);
  transform: translateY(-2px);
  outline: none;
}
.upload-placeholder {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}
.upload-placeholder small {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}

/* hide native file input (but keep accessible) */
#receiptFile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Preview */
.file-preview {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  position: relative;
}
.file-preview img {
  width: 140px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06)
}
.file-info {
  color: #e6eef8;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* remove (trash) button at top-right */
.remove-file-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: rgba(255,75,75,0.3);
  color: rgb(255,75,75);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(255,75,75,0.16);
  cursor: pointer;
  z-index: 5;
}
.remove-file-btn i {
  font-size: 14px
}

/* note textarea full width */
#depositNote {
  width: calc(100% - 24px);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  min-height: 80px;
  resize: vertical;
  font-size: 14px;
  outline: none;
}
.note-meta {
  display: block;
  text-align: right;
  margin-top: -30px;
}
#charsLeft {
  color: var(--muted);
  padding: 2px 8px;
  font-size: 13px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}
.error-text {
  color: var(--danger);
  font-size: 13px;
  min-height: 18px;
  margin-top: 8px;
}
.status-text {
  color: var(--success);
  font-size: 13px;
  min-height: 18px;
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

@media (max-width:420px) {
  .file-preview img {
    width: 110px;
    height: 78px;
  }
  .remove-file-btn {
    width: 34px;
    height: 34px;
    top: 6px;
    right: 6px
  }
}

.shop-btn {
  background: #a229e0;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  border-radius: 10px;
  padding: 8px 16px;
  margin-top: 16px;
  cursor: pointer;
  width: 100%;
  transition: 0.3s;
}

.shop-btn:hover {
  transform: scale(1.03);
}

.rank-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  border-radius: 10px;
  padding: 8px 16px;
  margin-top: 16px;
  cursor: pointer;
  width: 100%;
  transition: 0.3s;
}

.rank-btn:hover {
  transform: scale(1.03);
}

:root {
  --uxd-bg: #0b0f14;
  --uxd-card: rgba(255,255,255,0.03);
  --uxd-card-border: rgba(255,255,255,0.06);
  --uxd-text: #e6eef6;
  --uxd-muted: #9aa9b8;
  --uxd-accent: #4b9ed4;
  /* user-provided */
  --uxd-sell-accent: rgba(255,99,71,0.6);
  --uxd-radius: 14px;
  --uxd-glass-blur: 10px;
  --uxd-transition: 220ms cubic-bezier(.2,.9,.3,1);
}

html,body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  /* disable blue tap highlight globally */
}

/* Remove default focus ring and tap highlight for buttons */
button {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
}
button:focus {
  outline: none;
  box-shadow: none;
}
button::-moz-focus-inner {
  border: 0;
}

/* Mobile container */
.uxd-container {
  max-width: 480px;
  margin: 18px auto;
  padding: 18px;
  box-sizing: border-box;
}

.uxd-sub {
  color: var(--uxd-muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.uxd-card {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: var(--uxd-radius);
  background: var(--uxd-card);
  border: 1px solid var(--uxd-card-border);
  backdrop-filter: blur(var(--uxd-glass-blur));
  box-shadow: 0 8px 30px rgba(2,6,12,0.6);
  transition: transform var(--uxd-transition), box-shadow var(--uxd-transition);
}
.uxd-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(3,7,14,0.7);
}

.uxd-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.uxd-card-head .uxd-left {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
}
.uxd-card-head .uxd-left i {
  font-size: 20px;
  color: var(--uxd-accent);
  background: rgba(75,158,212,0.08);
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(75,158,212,0.08);
}

.uxd-balance {
  color: var(--uxd-muted);
  font-size: 12px;
  text-align: right;
}

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

.uxd-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.02);
  transition: border-color var(--uxd-transition), box-shadow var(--uxd-transition);
}
.uxd-input:focus-within {
  border-color: rgba(75,158,212,0.28);
  box-shadow: 0 8px 18px rgba(75,158,212,0.06);
}

.uxd-input input {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--uxd-text);
  font-size: 16px;
  width: 100%;
  padding: 6px;
}

.uxd-max-btn {
  font-size: 13px;
  color: var(--uxd-accent);
  background: transparent;
  border: 0;
  padding: 6px 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: opacity var(--uxd-transition);
}
.uxd-max-btn:hover {
  opacity: 0.85;
}

.uxd-result {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: var(--uxd-muted);
  font-size: 13px;
}

.uxd-rate-inline {
  margin-top: 8px;
  font-size: 12px;
  color: var(--uxd-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.uxd-action {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform var(--uxd-transition), box-shadow var(--uxd-transition);
  color: var(--uxd-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(6px);
}
.uxd-action:active {
  transform: translateY(2px);
}

.uxd-action.buy {
  background: rgba(75,158,212,0.6);
  color: var(--uxd-text);
}
.uxd-action.sell {
  background: var(--uxd-sell-accent);
  border: 1px solid rgba(255,99,71,0.7);
  color: var(--uxd-text);
}

/* Modal */
.uxd-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2,6,12,0.6);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--uxd-transition);
}
.uxd-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.uxd-modal {
  width: calc(95% - 32px);
  max-width: 420px;
  border-radius: 12px;
  padding: 16px;
  background: var(--uxd-bg);
  border: 1px solid var(--uxd-card-border);
  color: var(--uxd-text);
  box-shadow: 0 0px 20px #4b9ed430;
}
.uxd-modal h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}
.uxd-modal p {
  margin: 0 0 14px 0;
  color: var(--uxd-muted);
  font-size: 13px;
}
.uxd-modal .uxd-modal-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.uxd-modal .uxd-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.uxd-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
}
.uxd-btn.cancel {
  background: rgba(255,255,255,0.05);
  color: var(--uxd-muted);
  border: 1px solid rgba(255,255,255,0.1);
}
.uxd-btn.confirm {
  background: var(--uxd-accent);
  color: var(--uxd-text);
}

/* tiny toast */
.uxd-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 28px;
  background: rgba(10,13,17,0.9);
  color: var(--uxd-text);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
  z-index: 80;
  font-size: 13px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.uxd-toast.show {
  opacity: 1;
  pointer-events: auto;
}

.uxd-small {
  font-size: 12px;
  color: var(--uxd-muted);
}
.uxd-strong {
  color: var(--uxd-text);
  font-weight: 700;
}
@media (min-width:600px) {
  .uxd-container {
    padding: 22px;
    margin-top: 30px;
  }
}

:root {
  --ap-card: #0f1720;
  /* modal card */
  --ap-accent-500: #4b9ed4;
  /* site color (fixed) */
  --ap-muted: #94a3b8;
  --ap-radius: 14px;
  --ap-gap: 12px;
  --ap-thumb-size-xs: 68px;
  --ap-thumb-size-sm: 84px;
  --ap-glass: rgba(255,255,255,0.02);
}

/* Overlay */
.ap_overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  background: rgba(2,6,23,0.72);
  /* solid darker overlay */
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  padding: 18px;
}
.ap_overlay.ap_show {
  display: flex
}

/* Modal (mobile-first) */
.ap_modal {
  width: 100%;
  max-width: 480px;
  border-radius: var(--ap-radius);
  padding: 14px;
  background: var(--ap-card);
  box-shadow: 0 10px 40px rgba(2,6,23,0.7);
  border: 1px solid rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
  backdrop-filter: blur(6px);
}

.ap_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px
}
.ap_title {
  color: white;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px
}
.ap_sub {
  margin: 0;
  font-size: 13px;
  color: var(--ap-muted)
}

.ap_closeBtn {
  background: transparent;
  border: 0;
  color: var(--ap-muted);
  font-size: 18px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer
}
.ap_closeBtn i {
  font-size: 16px
}
.ap_closeBtn:focus {
  outline: 2px solid rgba(75,158,212,0.16);
}

/* Avatar grid - mobile first: 4 columns small thumbs */
.ap_grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 10px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.ap_item {
  position: relative;
  border-radius: 10px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center
}
.ap_btn {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 6px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s cubic-bezier(.2,.9,.2,1), box-shadow .12s ease;
}
.ap_img {
  width: var(--ap-thumb-size-xs);
  height: var(--ap-thumb-size-xs);
  object-fit: cover;
  border-radius: 9px;
  display: block;
  box-shadow: 0 8px 20px rgba(2,6,23,0.6);
  border: 1px solid rgba(255,255,255,0.03)
}

.ap_selected .ap_btn {
  transform: translateY(-4px);
  outline: 2px solid rgba(75,158,212,0.12);
}

.ap_selected {
  transform: scale(1.04);
  box-shadow: 0 14px 36px rgba(75,158,212,0.16);
}
.ap_item.ap_selected::after {
  content: '✔';
  color: white;
  position: absolute;
  right: 8px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ap-accent-500);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(75,158,212,0.18);
}

/* footer actions */
.ap_actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px
}
.ap_btnBase {
  padding: 10px 14px;
  border-radius: 12px;
  border: 0;
  font-weight: 700;
  cursor: pointer
}
.ap_btnGhost {
  background: transparent;
  border: 1px solid #ffffff15;
  color: var(--ap-muted)
}
.ap_btnConfirm {
  background: var(--ap-accent-500);
  color: white
}
.ap_btnConfirm[disabled] {
  opacity: .5;
  cursor: not-allowed
}

/* larger screens - adjust sizes */
@media(min-width:560px) {
  .ap_modal {
    padding: 18px
  }
  .ap_img {
    width: var(--ap-thumb-size-sm);
    height: var(--ap-thumb-size-sm)
  }
  .ap_grid {
    grid-template-columns: repeat(4,1fr);
    gap: 14px
  }
}

@media(min-width:920px) {
  .ap_modal {
    max-width: 640px
  }
  .ap_grid {
    grid-template-columns: repeat(6,1fr)
  }
}

.opp-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.opp-pic {
  width: 100px;
  outline: 4px solid white;
  outline-offset: -2px;
  border-radius: 100%;
}
.opp-name {
  margin: 8px 0;
  font-size: 24px;
}

