/* ============================================
   TAPTAP MINIAPP - STYLESHEET
   ============================================ */

/* ============================================
   1. BASE STYLES & RESET
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  background-color: #0C0F1A;
  color: #fff;
  min-height: 100vh;
  touch-action: pan-x pan-y;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

.floating-earn {
  position: absolute;
  color: #00ff88;
  font-weight: 900;
  font-size: 20px;
  pointer-events: none;
  z-index: 999999;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.9);
  animation: floatTop 1s ease-out forwards;
}

@keyframes floatTop {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -120px) scale(1.3);
  }
}

/* ============================================
   2. LOADING SCREEN
   ============================================ */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loading-text {
  background: linear-gradient(to right, #7a7a7a, #5a5a5a);
  border-radius: 30px;
  padding: 15px 60px;
  font-size: 18px;
  color: white;
  letter-spacing: 1px;
  text-align: center;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2),
              inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

.loading-bar-bg {
  width: 300px;
  height: 8px;
  background-color: #333;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #7a7a7a, #5a5a5a);
  border-radius: 10px;
  transition: width 0.1s linear;
}

/* ============================================
   3. APP CONTAINER & LAYOUT
   ============================================ */
.app-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 70px;
  background-color: #0C0F1A;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.app-header {
  background: #111;
  color: #fff;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-header h1 {
  font-size: 18px;
  font-weight: 700;
}

main {
  flex: 1;
  padding: 20px;
  padding-top: 60px;
}

.section {
  display: none;
}

.section.active {
  display: block;
}

#referral.section .card {
  padding-top: 10px;
}

.referral-stats-container {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

.referral-stat-item {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #ffb700;
}

#home.section.active .card {
  animation: none;
}

/* ============================================
   4. USER HEADER
   ============================================ */
.user-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: #0A0F29;
  padding: 2.5vh 5vw;
  margin: 0;
  width: 100%;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 420px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border-bottom: 3px solid rgba(255, 255, 255, 0.4);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 1.5vw;
  color: #fff;
  font-size: 4vw;
}

.user-icon {
  font-size: 5vw;
  color: #fff;
}

.user-label {
  font-weight: 500;
  color: #fff;
}

.secondary-token-badge {
  display: flex;
  align-items: center;
  gap: 1.5vw;
  background: #ffffff;
  color: #1a1a2e;
  padding: 0.9vh 3vw;
  border-radius: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  text-align: center;
  font-size: 3.8vw;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 16vw;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.secondary-token-logo-icon {
  width: 4.5vw;
  height: 4.5vw;
  min-width: 16px;
  min-height: 16px;
  max-width: 20px;
  max-height: 20px;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

.secondary-token-badge:hover {
  background: #ffffff;
  transform: scale(1.02);
}

.secondary-token-badge:active,
.secondary-token-badge:focus {
  background: #ffffff !important;
  color: #1a1a2e !important;
  outline: none;
  transform: scale(1);
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   5. CARDS & COMMON COMPONENTS
   ============================================ */
.card {
  background: #0C0F1A;
  border-radius: 0;
  padding: 20px 15px;
  color: #fff;
  text-align: center;
  box-shadow: none;
  margin-bottom: 25px;
}

#home .card {
  padding-top: 0;
}

.card h2, .card h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.yellow-card {
  background: #1a1a1a;
  color: #fff;
  padding: 15px;
  border-radius: 12px;
  margin: 15px 0;
  font-weight: 600;
}

.yellow-card p {
  margin: 5px 0;
}

.yellow-card .highlight {
  color: #ffffff;
  font-weight: 700;
}

.token-name-dark {
  color: #fff;
  font-weight: 700;
}

.airdrop-coming-soon {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border: 2px solid #ff0000;
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  margin: 20px 0;
}

.airdrop-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.airdrop-title {
  font-size: 22px;
  font-weight: 700;
  color: #ff0000;
  margin-bottom: 12px;
}

.airdrop-message {
  font-size: 16px;
  color: #aaa;
}

.app-container.hide-header-elements .user-info-header,
.app-container.hide-header-elements .secondary-token-badge {
  display: none !important;
}

.info-box {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
  text-align: left;
}

.info-title {
  font-weight: bold;
  color: red;
  font-size: 14px;
}

.info-text {
  color: #fff;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 8px;
}

/* ============================================
   6. HOME/TAP PAGE
   ============================================ */
.usdt-balance-display {
  text-align: center;
  margin: 6vh 0 3vh 0;
}

.balance-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 3vh 0 4vh 0;
}

.coin-icon {
  font-size: 36px;
}

.balance {
  font-size: 5.5vw;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.usdt-label {
  font-size: 5vw;
  color: #fff;
  font-weight: 600;
}

.balance-label {
  color: #aaa;
  font-size: 14px;
  margin: 0 0 15px 0;
}

.tap-image-container {
  margin: 3vh 0 2vh 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transform: translateY(60px);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.tap-image {
  width: 60vw;
  height: 60vw;
  max-width: 280px;
  max-height: 280px;
  border-radius: 50%;
  margin-top: -30px;
  display: none;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 30px rgba(12, 15, 26, 0.4), 0 0 60px rgba(12, 15, 26, 0.3), 0 0 90px rgba(12, 15, 26, 0.2);
  object-fit: cover;
  border: 5px solid #FFFFFF;
}

.tap-image.visible {
  display: block;
}

.tap-image:hover {
  transform: scale(1.05);
}

.tap-image.tap-animation {
  animation: tapMove 0.3s ease;
}

@keyframes tapMove {
  0% { transform: scale(1); }
  50% { transform: scale(0.9) translateY(5px); }
  100% { transform: scale(1); }
}

.tap-message {
  color: #fff;
  font-size: 4.5vw;
  margin-top: 2vh;
  font-weight: 500;
  text-align: center;
  transform: translateY(60px);
}

/* ============================================
   7. ENERGY & TIMER DISPLAY
   ============================================ */
.energy-time-container {
  display: flex;
  gap: 3vw;
  justify-content: center;
  align-items: center;
  margin: 0;
  flex-wrap: wrap;
  position: fixed;
  bottom: 160px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 50;
  animation: none !important;
}

.energy-pill,
.time-pill {
  background: #ffffff;
  color: #1a1a2e;
  padding: 1.8vh 5vw;
  border-radius: 25px;
  font-size: 4vw;
  font-weight: 600;
  min-width: 38vw;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.energy-bar-container {
  margin: 0;
  width: 100%;
  position: fixed;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 380px;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 50;
  animation: none !important;
}

.energy-bar {
  width: 100%;
  height: 2vh;
  background: #2a2a3e;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.energy-fill {
  height: 100%;
  background: #FBC02D;
  border-radius: 10px;
  transition: width 0.3s ease;
  width: 100%;
}

.energy-text {
  color: #1a1a2e;
  font-size: 14px;
  text-align: center;
  font-weight: 600;
}

/* ============================================
   8. REFERRAL PAGE
   ============================================ */
.ref-box {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  position: relative;
  margin-bottom: 12px;
}

.ref-box input {
  flex: 1;
  padding: 10px;
  border-radius: 25px;
  border: none;
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  font-size: 13px;
  width: 100%;
  padding-right: 50px;
}

.referral-stats {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 15px;
  margin: 15px 0;
  text-align: left;
}

.referral-stats p {
  margin: 8px 0;
  font-size: 14px;
  color: #fff;
}

.referral-stats strong {
  color: #ffeb00;
}

/* ============================================
   9. TASK PAGE
   ============================================ */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 15px;
}

.task {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  color: #fff;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.task:last-child {
  border-bottom: none;
}

.task-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.task-icon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0088cc 0%, #00aaff 100%);
}

.task-icon.telegram {
  background: linear-gradient(135deg, #0088cc 0%, #00aaff 100%);
  padding: 0;
}

.task-icon.twitter {
  background: #000;
  border: 1px solid #333;
}

.task-icon.discord {
  background: #5865F2;
}
.task-icon.youtube {
  background: #ffffff;
}

.task-icon.default {
  background: linear-gradient(135deg, #0088cc 0%, #00aaff 100%);
}

.task-icon i {
  font-size: 22px;
  color: #fff;
}

.task-icon img {
  width: 26px;
  height: 26px;
}

.task-platform-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.task-icon.telegram .task-platform-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.task-icon.twitter .task-platform-logo {
  width: 36px;
  height: 36px;
  filter: invert(1);
}

.task-icon.discord .task-platform-logo {
  width: 36px;
  height: 36px;
}

.task-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.task-rewards {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.task-reward-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #0af;
}

.task-reward-item.secondary-token {
  color: #9945FF;
}

.task-reward-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  overflow: hidden;
}

.task-reward-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.task-reward-icon.token {
  background: transparent;
  color: #fff;
}

.task-reward-icon.secondary-token {
  background: #9945FF;
  color: #fff;
}

.task button {
  background: #fff;
  color: #000;
  padding: 5px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.task button:hover {
  background: #f0f0f0;
  transform: scale(1.02);
}

.task button:disabled {
  background: #666;
  color: #aaa;
  cursor: not-allowed;
}

/* ============================================
   10. WALLET PAGE
   ============================================ */
.wallet-input {
  width: 100%;
  padding: 12px;
  border-radius: 25px;
  border: none;
  outline: none;
  margin-top: 10px;
  text-align: center;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
}

.wallet-input::placeholder {
  color: #888;
}

.withdraw-balance-display {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 25px;
  text-align: center;
}

.withdraw-balance-display .balance-label {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 10px;
}

.withdraw-balance-display .balance-amount {
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
}

.withdraw-balance-display .balance-amount .token-name {
  font-size: 20px;
  color: #aaa;
  margin-left: 5px;
}

.withdraw-balance-display .balance-usd-value {
  color: #888;
  font-size: 14px;
  margin-top: 8px;
}

.balance-amount-large {
  font-size: 48px;
  font-weight: 700;
  color: #7FFF00;
  margin: 20px 0;
  text-align: center;
}

.withdraw-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.withdraw-step.active {
  display: block;
}

.section-divider {
  margin: 25px 0;
}

.section-header {
  color: #aaa;
  font-size: 14px;
  text-align: left;
  margin-bottom: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wallet-option-btn {
  width: 100%;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.wallet-option-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(5px);
}

.wallet-icon {
  font-size: 24px;
}

.wallet-name {
  font-weight: 500;
}

.wallet-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
}

.wallet-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-status-view {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.wallet-status-text {
  color: #888;
  font-size: 13px;
  flex: 1;
}

.wallet-status-text.connected {
  color: #4caf50;
}

.wallet-address-display {
  width: 100%;
  font-size: 12px;
  color: #aaa;
  word-break: break-all;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 8px;
  margin: 5px 0;
}

.wallet-connect-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wallet-connect-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.wallet-remove-btn {
  background: rgba(255, 68, 68, 0.15);
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: 8px;
  color: #ff4444;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.wallet-remove-btn:hover {
  background: rgba(255, 68, 68, 0.25);
  border-color: rgba(255, 68, 68, 0.5);
}

.tx-input-container {
  text-align: left;
  margin-bottom: 20px;
  margin: 20px 0;
}

.input-with-max {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-max .wallet-input {
  padding-right: 70px;
}

.max-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #ffd700, #ffb800);
  color: #1a1a2e;
  border: none;
  border-radius: 15px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s ease;
}

.max-btn:hover {
  background: linear-gradient(135deg, #ffb800, #ffd700);
  transform: translateY(-50%) scale(1.05);
}

.max-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* ============================================
   11. SECONDARY TOKEN (SOL) SECTION
   ============================================ */
.secondary-token-open-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9945FF 0%, #14F195 100%);
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(153, 69, 255, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.secondary-token-open-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(153, 69, 255, 0.6);
}

.secondary-token-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.secondary-token-modal.active {
  display: flex;
}

.secondary-token-modal-content {
  background: #000;
  border: 2px solid #9945FF;
  border-radius: 20px;
  max-width: 400px;
  width: 100%;
  padding: 30px 20px;
  position: relative;
  box-shadow: 0 0 30px rgba(153, 69, 255, 0.3);
}

.secondary-token-close-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.secondary-token-close-btn:hover {
  color: #9945FF;
}

.secondary-token-modal-balance {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin: 20px 0 30px 0;
}

.secondary-token-action-buttons-modal {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.secondary-token-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.secondary-token-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.secondary-token-action-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.secondary-token-action-label {
  font-size: 10px;
  color: #fff;
  font-weight: 600;
}

.secondary-token-info {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.secondary-token-icon-modal {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #000;
  flex-shrink: 0;
}

.secondary-token-modal-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

.secondary-token-details {
  flex: 1;
}

.secondary-token-name-display {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.secondary-token-amount-display {
  font-size: 12px;
  color: #aaa;
}

.secondary-token-value {
  text-align: right;
}

.secondary-token-usd-display {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.secondary-token-wallet-header {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.close-secondary-token-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 20px;
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.close-secondary-token-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.secondary-token-main-balance {
  text-align: center;
  margin-bottom: 30px;
}

.secondary-token-main-balance .secondary-token-usd-value {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
}

.secondary-token-action-buttons-new {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
}

.secondary-token-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.secondary-token-action-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.secondary-token-action-circle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.action-circle-icon {
  font-size: 42px;
}

.action-label {
  color: #aaa;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.secondary-token-list {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 20px;
}

.token-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.token-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-icon {
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -moz-user-select: none;
  -ms-user-select: none;
  pointer-events: none;
}

.token-info {
  text-align: left;
}

.token-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.secondary-token-label {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.token-amount {
  font-size: 13px;
  color: #aaa;
}

.token-right {
  text-align: right;
}

.token-usd {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.token-price {
  font-size: 11px;
  color: #aaa;
}

.secondary-token-balance-display {
  background: rgba(153, 69, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  margin-bottom: 20px;
}

.secondary-token-balance-display .balance-label {
  color: #aaa;
  font-size: 12px;
  margin-bottom: 8px;
}

.secondary-token-balance-display .balance-amount {
  font-size: 28px;
  font-weight: 700;
  color: #9945FF;
}

.secondary-token-action-desc {
  color: #aaa;
  font-size: 13px;
  text-align: center;
  margin-bottom: 20px;
}

.secondary-token-transaction-list {
  max-height: 400px;
  overflow-y: auto;
}

.secondary-token-transaction-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.secondary-token-tx-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.secondary-token-tx-details {
  flex: 1;
}

.secondary-token-tx-type {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.secondary-token-tx-amount {
  color: #aaa;
  font-size: 12px;
}

.secondary-token-tx-date {
  color: #666;
  font-size: 11px;
  margin-top: 4px;
}

/* ============================================
   12. DAILY CLAIM SECTION
   ============================================ */
.secondary-token-daily-claim {
  background: rgba(153, 69, 255, 0.1);
  border: 1px solid rgba(153, 69, 255, 0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.secondary-token-claim-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.secondary-token-claim-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.secondary-token-claim-amount {
  font-size: 24px;
  font-weight: 700;
  color: #9945FF;
  margin-bottom: 15px;
}

.secondary-token-claim-button {
  background: #444;
  border: none;
  border-radius: 8px;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 40px;
  cursor: not-allowed;
  margin-bottom: 10px;
  width: 100%;
  max-width: 200px;
}

.secondary-token-claim-button.active {
  background: linear-gradient(135deg, #9945FF 0%, #14F195 100%);
  color: #fff;
  cursor: pointer;
}

.secondary-token-claim-timer {
  font-size: 12px;
  color: #aaa;
}

.daily-claim-section {
  margin-top: 20px;
}

.claim-card {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.claim-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 15px;
}

.claim-icon {
  font-size: 24px;
}

.claim-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.claim-amount-display {
  margin-bottom: 15px;
}

.claim-amount-value {
  font-size: 32px;
  font-weight: 700;
  color: #ffc107;
  margin-right: 8px;
}

.claim-token {
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}

.claim-btn {
  background: #444;
  border: none;
  border-radius: 12px;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 50px;
  cursor: not-allowed;
  margin-bottom: 10px;
  width: 100%;
  max-width: 250px;
  transition: all 0.3s ease;
}

.claim-btn:not(:disabled) {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: #000;
  cursor: pointer;
}

.claim-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.claim-timer {
  font-size: 13px;
  color: #aaa;
  margin-top: 10px;
}

/* ============================================
   13. MODALS
   ============================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1001;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #0e0e12;
  border: 2px solid #ffc107;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 30px rgba(255, 193, 7, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.close-modal {
  font-size: 28px;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

.close-modal:hover {
  color: #ffc107;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.input-label {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-top: 15px;
  margin-bottom: 8px;
  display: block;
}

/* ============================================
   14. BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: #0A0F29;
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 3px solid rgba(255, 255, 255, 0.4);
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.5);
}

.bottom-nav button {
  background: none;
  border: none;
  color: #8899aa;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  line-height: 1.3;
}

.bottom-nav button i {
  font-size: 20px;
  margin-bottom: 4px;
}

.bottom-nav button .nav-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  opacity: 0.6;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.bottom-nav button.active {
  color: #ffd700;
}

.bottom-nav button.active .nav-icon {
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(255, 215, 0, 0.4));
  transform: scale(1.1);
  opacity: 1;
}

/* ============================================
   15. BUTTONS & FORM ELEMENTS
   ============================================ */
.btn {
  display: inline-block;
  background: #1a1a1a;
  color: #fff;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 10px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.btn:hover {
  background: #333;
}

.btn-secondary {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.withdraw-btn-gradient {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  cursor: pointer;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.withdraw-btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.withdraw-btn-gradient:active {
  transform: translateY(0);
}

.withdraw-btn-gradient:disabled {
  background: #444;
  color: #888;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================
   16. UTILITY CLASSES
   ============================================ */
.small {
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
}

.hint {
  color: #aaa;
  font-size: 12px;
  margin-top: 10px;
}

.info-text {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 20px;
  text-align: center;
}

/* ============================================
   17. WITHDRAW DISABLED POPUP
   ============================================ */
.withdraw-disabled-modal {
  max-width: 350px;
}

.withdraw-disabled-modal .modal-body {
  padding: 35px 25px;
}

/* ============================================
   18. ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* ═══════════════════════════════════════════
   SHARE + INVITE ROW
═══════════════════════════════════════════ */
.ref-actions{display:flex;gap:10px;margin-bottom:8px}
.ref-copy-btn{flex:1}
.ref-share-btn{
  flex-shrink:0;display:flex;align-items:center;gap:7px;
  padding: 20px;height:100%;
  background:linear-gradient(135deg,rgba(99,102,241,.22),rgba(147,51,234,.15));
  border:1px solid rgba(99,102,241,.40);
  color:#a5b4fc;border-radius:12px;font-size:14px;font-weight:600;
  cursor:pointer;transition:opacity .15s,transform .15s;
  -webkit-tap-highlight-color:transparent}
.ref-share-btn:active{transform:scale(.97);opacity:.8}

/* ═══════════════════════════════════════════
   DAILY BONUS ENTRY BUTTON
═══════════════════════════════════════════ */
.db-entry-btn{
  width:100%;display:flex;align-items:center;justify-content:space-between;
  background:linear-gradient(135deg,rgba(99,102,241,.20),rgba(139,92,246,.12));
  border:1px solid rgba(99,102,241,.32);
  border-radius:16px;padding:14px 16px;margin-bottom:14px;
  cursor:pointer;text-align:left;
  transition:opacity .15s,transform .12s;-webkit-tap-highlight-color:transparent}
.db-entry-btn:active{transform:scale(.97);opacity:.8}
.db-entry-left{display:flex;align-items:center;gap:13px}
.db-entry-icon-wrap{
  width:48px;height:48px;flex-shrink:0;
  background:rgba(99,102,241,.22);border-radius:14px;
  display:flex;align-items:center;justify-content:center}
.db-entry-text{display:flex;flex-direction:column;gap:3px}
.db-entry-title{font-size:15px;font-weight:700;color:#fff;display:block}
.db-entry-sub{font-size:12px;color:rgba(255,255,255,.5);display:block}
.db-entry-right{display:flex;align-items:center;gap:9px;flex-shrink:0}
.db-entry-streak{
  display:none;font-size:11px;font-weight:700;color:#fbbf24;
  background:rgba(251,191,36,.14);border:1px solid rgba(251,191,36,.30);
  border-radius:20px;padding:3px 11px}
.db-entry-streak.show{display:inline-block}

/* ═══════════════════════════════════════════
   OVERLAY
═══════════════════════════════════════════ */
.db-overlay{
  display:none;position:fixed;inset:0;
  background:rgba(0,0,0,.80);z-index:99998}
.db-overlay.open{display:block}

/* ═══════════════════════════════════════════
   BOTTOM SHEET  — TON Kombat style
   Dark navy, rounded top, white text
═══════════════════════════════════════════ */
.db-sheet{
  position:fixed;left:0;right:0;bottom:0;
  background:#101c30;
  border-radius:26px 26px 0 0;
  padding:0 16px calc(36px + env(safe-area-inset-bottom)) 16px;
  z-index:99999;
  transform:translateY(110%);
  transition:transform .34s cubic-bezier(.32,.72,0,1);
  max-height:92vh;overflow-y:auto;
  -webkit-overflow-scrolling:touch}
.db-sheet.open{transform:translateY(0)}

.db-drag-handle{
  width:40px;height:4px;
  background:rgba(255,255,255,.20);
  border-radius:2px;margin:12px auto 18px}

/* ✕ close button top-right */
.db-close-btn{
  position:absolute;top:14px;right:14px;
  width:30px;height:30px;
  background:rgba(255,255,255,.10);
  border:none;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;-webkit-tap-highlight-color:transparent}
.db-close-btn:active{opacity:.6}

/* gift icon */
.db-sheet-icon{
  width:72px;height:72px;
  background:rgba(99,102,241,.18);
  border:1px solid rgba(99,102,241,.22);
  border-radius:22px;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 14px}

.db-sheet-title{
  font-size:24px;font-weight:800;color:#fff;
  text-align:center;margin:0 0 6px;letter-spacing:-.4px}
.db-sheet-sub{
  font-size:13px;color:rgba(255,255,255,.40);
  text-align:center;margin:0 0 22px;line-height:1.5}

/* ═══════════════════════════════════════════
   7-DAY GRID  — exactly like TON Kombat
   3 cols × 2 rows + Day 7 full width
═══════════════════════════════════════════ */
.db-days-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;margin-bottom:18px}

/* base card */
.db-day-card{
  position:relative;
  background:rgba(255,255,255,.05);
  border:1.5px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:14px 8px 12px;
  display:flex;flex-direction:column;
  align-items:center;gap:8px;
  min-height:110px}

/* DONE — green tint */
.db-day-card.db-done{
  background:rgba(16,185,129,.08);
  border-color:rgba(16,185,129,.22)}

/* TODAY — bright highlight */
.db-day-card.db-today{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.35);
  box-shadow:0 0 0 2px rgba(255,255,255,.06)}

/* DAY 7 full width */
.db-day-card.db-day7{
  grid-column:1/-1;
  flex-direction:row;
  justify-content:center;
  padding:16px 24px;
  gap:18px;min-height:unset}
.db-day-card.db-day7.db-today{
  background:linear-gradient(135deg,rgba(251,191,36,.14),rgba(245,158,11,.08));
  border-color:rgba(251,191,36,.40);
  box-shadow:0 0 24px rgba(251,191,36,.12)}

/* day label */
.db-day-label{
  font-size:10px;font-weight:700;
  color:rgba(255,255,255,.35);
  text-transform:uppercase;letter-spacing:.6px}
.db-day-card.db-today .db-day-label{color:rgba(255,255,255,.80)}
.db-day-card.db-done  .db-day-label{color:rgba(16,185,129,.7)}
.db-day-card.db-day7.db-today .db-day-label{color:#fbbf24;font-size:12px}

/* TODAY badge */
.db-today-badge{
  position:absolute;top:-7px;right:-7px;
  background:#6366f1;color:#fff;
  font-size:8px;font-weight:800;letter-spacing:.4px;
  padding:2px 6px;border-radius:7px;
  border:2px solid #101c30}

/* icons */
.db-icon-wrap{width:38px;height:38px;display:flex;align-items:center;justify-content:center}

/* gold padlock */
.db-lock-icon{
  width:26px;height:30px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 30'%3E%3Crect x='1' y='13' width='24' height='16' rx='4' fill='%23f59e0b'/%3E%3Cpath d='M6.5 13V9.5a6.5 6.5 0 0113 0V13' fill='none' stroke='%23f59e0b' stroke-width='2.6' stroke-linecap='round'/%3E%3Ccircle cx='13' cy='21' r='2.5' fill='%2392400e' opacity='0.5'/%3E%3Crect x='11.75' y='21' width='2.5' height='3.5' rx='1.25' fill='%2392400e' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-size:contain;background-position:center}

/* green checkmark */
.db-check-icon{
  width:32px;height:32px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%2310b981'/%3E%3Cpath d='M9 16.5l5 5 9-10' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-size:contain}

/* gold coin (today active) */
.db-coin-icon{
  width:34px;height:34px;border-radius:50%;
  background:radial-gradient(circle at 35% 35%,#fde68a,#f59e0b 55%,#d97706);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 12px rgba(245,158,11,.45)}
.db-coin-inner{
  width:16px;height:16px;border-radius:50%;
  background:rgba(255,255,255,.30);
  box-shadow:inset 0 1px 3px rgba(0,0,0,.2)}

/* gold star (day 7 today) */
.db-star-icon{
  width:36px;height:36px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Ccircle cx='18' cy='18' r='17' fill='%23f59e0b'/%3E%3Ccircle cx='18' cy='18' r='12' fill='%23fbbf24' opacity='0.4'/%3E%3Cpath d='M18 8l2.8 8.4H30l-7.1 5.2 2.8 8.4L18 25.2l-7.7 4.8 2.8-8.4L6 16.4h9.2z' fill='white'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-size:contain;
  filter:drop-shadow(0 3px 8px rgba(245,158,11,.55))}

/* reward text */
.db-day-rew{
  font-size:12px;font-weight:700;
  color:rgba(255,255,255,.30);text-align:center;line-height:1.3}
.db-day-card.db-today .db-day-rew{color:#fff;font-size:13px}
.db-day-card.db-done  .db-day-rew{color:rgba(16,185,129,.75)}
.db-day-card.db-day7.db-today .db-day-rew{color:#fbbf24;font-size:15px;font-weight:800}

/* ═══════════════════════════════════════════
   CHECK IN BUTTON
═══════════════════════════════════════════ */
.db-claim-btn{
  width:100%;background:#fff;color:#0f172a;
  font-size:17px;font-weight:800;
  border:none;border-radius:16px;padding:17px;
  cursor:pointer;letter-spacing:-.2px;
  transition:transform .12s,opacity .12s;
  -webkit-tap-highlight-color:transparent}
.db-claim-btn:active{transform:scale(.97);opacity:.9}
.db-claim-btn.db-disabled{
  background:rgba(255,255,255,.07);
  color:rgba(255,255,255,.25);
  cursor:default;font-size:15px;font-weight:600;letter-spacing:0}
.db-claim-btn.db-loading{
  background:rgba(255,255,255,.07);
  color:rgba(255,255,255,.38);cursor:wait;font-size:15px}