/* style.css — единый стиль */

:root {
  --bg: #0f1113;
  --card: #161718;
  --muted: #9aa0a6;
  --accent: #007aff;
  --gray: #6b7280;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Inter, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: #e7e7e7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 90px;
}

.empty-msg {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

/* Фильтры */
#filters {
  display: flex;
  gap: 10px;
  padding: 12px;
}
.filter-btn {
  flex: 1;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(0,122,255,0.3);
}
.filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,122,255,0.4);
}

.popup {
  display: none;
  position: absolute;
  top: 60px;
  background: var(--card);
  border-radius: 14px;
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  width: calc(50% - 20px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}
.popup-item {
  padding: 8px;
  cursor: pointer;
  color: #e7e7e7;
  border-radius: 8px;
}
.popup-item:hover { background: rgba(255,255,255,0.02); }
.popup-item.selected {
  background: rgba(0,122,255,0.12);
  color: var(--accent);
}

/* Поиск */
.search-input {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #3c3c3c;
  background: var(--card);
  color: #e7e7e7;
  font-size: 14px;
  outline: none;
}
.search-input:focus {
  border-color: var(--accent);
}

/* Нижняя навигация */
.bottom-tabs {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  background: rgba(22,22,22,0.92);
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 8px 0;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  z-index: 999;
}
.bottom-tabs .tab-btn {
  background: none;
  border: none;
  color: #cfcfcf;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  padding: 6px 0;
  transition: transform 0.2s ease, color 0.2s ease;
  border-radius: 12px;
}
.bottom-tabs .tab-btn.active {
  color: var(--accent);
  transform: translateY(-2px);
}
.tab-emoji { font-size: 20px; }
.tab-text { margin-top: 3px; font-size: 11px; }

/* Контент табов */
.tab { 
  display: none; 
  padding: 12px;
  position: relative;
  padding-bottom: 120px;
}
.tab.active { display: block; }

/* Help button */
/* Help button - DISABLED */
.help-button {
  display: none !important;
}

/* Сетка карточек */
.nft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-bottom: 20px;
}

/* NFT карточка */
.nft-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(255,255,255,0.02), 0 4px 10px rgba(0,0,0,0.4);
}
.nft-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 12px rgba(255,255,255,0.03), 0 8px 20px rgba(0,0,0,0.6);
}

.nft-img-wrap {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--card);
}

.nft-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
  background: var(--card);
}

.nft-name {
  color: #e7e7e7;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  word-break: break-word;
  margin-top: 6px;
  padding: 0 6px;
}

/* Попап / модалка */
.nft-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2,6,10,0.7);
  justify-content: center;
  align-items: center;
  z-index: 1200;
  padding: 20px;
}
.nft-popup-overlay.visible { display: flex; }
.nft-popup {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #121212, #141414);
  border-radius: 16px;
  padding: 18px;
  color: #e7e7e7;
  box-shadow: 0 18px 50px rgba(0,0,0,0.7);
  position: relative;
}
.nft-popup img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  margin: 0 auto 12px;
  background: rgba(255,255,255,0.02);
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: #cfcfcf;
  font-size: 20px;
  cursor: pointer;
}

.nft-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}
.nft-info-table td {
  padding: 6px 4px;
  vertical-align: top;
}
.nft-info-table td:first-child {
  color: var(--muted);
  width: 36%;
  font-weight: 600;
}

.ton-text {
  color: var(--accent);
  font-weight: 700;
  margin-left: 6px;
}

/* ЕДИНЫЙ СТИЛЬ КНОПОК */
.transfer-btn, .nft-popup .transfer-btn {
  margin: 14px auto 0;
  width: auto;
  max-width: 200px;
  padding: 12px 20px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,122,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

button:hover, .transfer-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0,122,255,0.4);
}

@media (min-width: 900px) {
  .nft-grid { grid-template-columns: repeat(3, 1fr); }
  .popup { width: 240px; }
}

/* Toast */
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(20,20,20,0.95);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  max-width: 90%;
  text-align: center;
}
#toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Transfer section */
.transfer-section {
  text-align: center;
  padding: 20px 0;
}

.transfer-info {
  background: linear-gradient(135deg, #23272f, #2e323d);
  border: 1px solid #383c48;
  border-radius: 16px;
  padding: 15px 20px;
  margin-bottom: 22px;
  color: #e0e0e0;
  text-align: left;
  line-height: 1.6;
  font-size: 15px;
}
.transfer-info p {
  margin: 8px 0;
}
.blue {
  color: var(--accent);
  font-weight: 600;
}

.transfer-text {
  margin-bottom: 12px;
  font-size: 16px;
  color: #fff;
  font-weight: 500;
}

.transfer-options {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.transfer-option {
  min-width: 110px;
  padding: 12px 20px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 3px 10px rgba(0,122,255,0.3);
}

.transfer-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0,122,255,0.4);
}

.transfer-option.selected {
  background: #005fcc;
  box-shadow: 0 0 15px rgba(0,122,255,.5);
}

.transfer-main-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 3px 12px rgba(0,122,255,0.3);
}

.transfer-main-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(0,122,255,0.4);
}

.transfer-main-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Dashboard */
.dashboard-placeholder {
  text-align: center;
  color: #bfbfcf;
  font-size: 16px;
  margin-top: 60px;
  padding: 0 20px;
}

.dashboard-item {
  margin: 12px 0;
}

/* Transfer modal */
.transfer-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s;
  z-index: 1000;
  pointer-events: none;
}
.transfer-modal.visible { 
  opacity: 1;
  pointer-events: all;
}

.transfer-modal-content {
  background: #1b1f2b;
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.transfer-modal-content h3 {
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

.transfer-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.transfer-method-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 3px 10px rgba(0,122,255,0.3);
}
.transfer-method-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0,122,255,0.4);
}

.transfer-info-box {
  margin: 15px 0;
}

.transfer-info-box p {
  margin: 12px 0;
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.5;
}

.transfer-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 12px 0;
}

.action-btn {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  box-shadow: 0 3px 10px rgba(0,122,255,0.3);
  white-space: nowrap;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0,122,255,0.4);
}

.ton-address {
  display: inline-block;
  word-break: break-all;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  color: var(--accent);
  font-weight: 600;
}

.confirm-hash {
  margin-top: 15px;
}

.confirm-hash p {
  color: #fff;
  font-size: 14px;
  margin-bottom: 10px;
}

.hash-input {
  width: 100%;
  padding: 12px;
  background: #2b2b2b;
  color: #fff;
  border: 1px solid #3c3c3c;
  border-radius: 14px;
  outline: none;
  margin-top: 8px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.hash-input:focus {
  border-color: var(--accent);
}

.confirm-box {
  margin-top: 15px;
}

.confirm-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 3px 12px rgba(0,122,255,0.3);
  margin-top: 10px;
}
.confirm-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(0,122,255,0.4);
}

.transfer-cancel-btn {
  background: #4a5058;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px;
  width: 100%;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 3px 10px rgba(74,80,88,0.3);
}
.transfer-cancel-btn:hover {
  background: #3a4048;
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(74,80,88,0.4);
}

/* Transfer Pending Box */
.transfer-pending-box {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 20px;
  margin: 10px 0;
  box-shadow: 0 4px 15px rgba(0,122,255,0.2);
}

.pending-title {
  font-size: 18px;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 12px;
}

.pending-text {
  color: #ccc;
  line-height: 1.6;
  font-size: 14px;
}

.pending-text strong {
  color: #fff;
  font-weight: 600;
}

/* Horizontal Gift Card */
.gift-card-horizontal {
  background: linear-gradient(135deg, #1a1a1a, #0f1113);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 18px;
  margin: 12px 0;
  box-shadow: 0 4px 15px rgba(0,122,255,0.25);
}

.gift-left {
  margin-bottom: 16px;
}

.gift-name-only {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.gift-details-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gift-detail-row-compact {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,122,255,0.15);
}

.detail-label {
  color: #fff;
  font-size: 14px;
  font-weight: normal;
}

.detail-value-bold {
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

.gift-right {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,122,255,0.2);
}

.gift-countdown-compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.countdown-label-small {
  color: #fff;
  font-size: 13px;
}

.countdown-time-compact {
  color: var(--accent);
  font-weight: bold;
  font-size: 16px;
  font-family: 'Courier New', monospace;
}

.withdraw-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 3px 10px rgba(0,122,255,0.3);
  white-space: nowrap;
}
.withdraw-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(0,122,255,0.4);
}

/* Dashboard fallback item */
.dashboard-item-fallback {
  background: linear-gradient(135deg, #1a1a1a, #0f1113);
  border: 2px solid var(--gray);
  border-radius: 16px;
  padding: 18px;
  margin: 12px 0;
  box-shadow: 0 4px 15px rgba(107,114,128,0.2);
}

.dashboard-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.dashboard-info {
  color: #fff;
  font-size: 14px;
  margin-bottom: 6px;
}

.dashboard-item-time {
  color: #888;
  font-size: 13px;
}