* {
  box-sizing: border-box;
}

:root {
  --bg-1: #0b1020;
  --bg-2: #1c0f3d;
  --bg-3: #0f2d4a;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --accent-1: #7c3aed;
  --accent-2: #06b6d4;
  --accent-3: #ec4899;
  --success: #22c55e;
  --danger: #ef4444;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 20%, #312e81 0%, transparent 35%),
    radial-gradient(circle at 80% 10%, #0e7490 0%, transparent 30%),
    radial-gradient(circle at 50% 100%, #7e22ce 0%, transparent 35%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2), var(--bg-3));
  min-height: 100vh;
}

#app {
  display: flex;
  min-height: 100vh;
  backdrop-filter: blur(2px);
  position: relative;
}

.drawer {
  width: 240px;
  background: linear-gradient(185deg, rgba(15, 23, 42, 0.92), rgba(51, 65, 85, 0.75));
  color: #fff;
  padding: 20px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease-in-out;
  z-index: 30;
}

.drawer h3 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #e2e8f0;
}

.drawer.closed {
  transform: translateX(-100%);
  position: absolute;
  z-index: 10;
}

.menu-item {
  width: 100%;
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.menu-item:hover {
  transform: translateY(-1px);
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.7), rgba(6, 182, 212, 0.65));
}

.main {
  flex: 1;
  padding: 24px;
  width: 100%;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 12px 18px;
  margin-bottom: 18px;
  box-shadow: 0 12px 35px rgba(2, 6, 23, 0.35);
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, #f472b6, #a78bfa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon-btn {
  border: none;
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.9), rgba(14, 165, 233, 0.9));
  color: #fff;
  padding: 9px 13px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.danger {
  border: none;
  background: linear-gradient(120deg, #ef4444, #f97316);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(127, 29, 29, 0.35);
}

.card {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.38);
}

.premium-auth {
  max-width: 500px;
  margin: 60px auto;
  padding: 0;
  background: #0f172a;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 0% 0%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.auth-content {
  padding: 40px;
  position: relative;
  z-index: 1;
}

.brand-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-1);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
}

.auth-form-premium {
  margin-top: 32px;
}

.input-group {
  position: relative;
  margin-bottom: 24px;
}

.premium-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 16px 16px 48px;
  border-radius: 16px;
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
}

.premium-input:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-1);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.6;
}

.auth-actions-premium {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-status {
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
  color: #f87171;
  min-height: 20px;
}

.auth-footer {
  margin-top: 40px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 24px;
}

.auth-footer p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

.card h2 {
  margin-top: 0;
  color: #f8fafc;
  font-size: 22px;
}

.hidden {
  display: none !important;
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.4);
  color: #e2e8f0;
}

input::placeholder {
  color: #94a3b8;
}

input:focus {
  outline: none;
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: none;
  background: linear-gradient(125deg, var(--accent-1), var(--accent-2));
  color: #fff;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.32);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.pkg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  margin: 10px 0;
  background: linear-gradient(130deg, rgba(30, 41, 59, 0.55), rgba(17, 24, 39, 0.35));
  color: #f8fafc;
}

.pkg span {
  font-weight: 600;
  word-break: break-word;
}

.note {
  color: var(--text-soft);
}

#authMessage {
  margin-top: 10px;
  color: #f8fafc;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

#homeMessage {
  margin-top: 12px;
  color: #e2e8f0;
}

#userStatus {
  color: #e2e8f0;
  line-height: 1.6;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
}

.home-shell {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.premium-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.welcome-text h2 {
  font-size: 28px;
  margin: 4px 0;
  font-weight: 800;
}

.welcome-text .kicker {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
}

.wallet-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 14px;
}

.gradient-text {
  background: linear-gradient(90deg, #fff, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.status-badge-premium {
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-weight: 700;
  font-size: 14px;
}

.status-badge-premium.is-active {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

/* Balance Card */
.balance-card-premium {
  position: relative;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-glass-effect {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.balance-label {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
}

.balance-amount {
  font-size: 48px;
  font-weight: 800;
  margin: 0 0 24px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.balance-amount .currency {
  font-size: 24px;
  color: var(--accent-2);
}

.card-footer {
  display: flex;
  gap: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.footer-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-item span {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-item strong {
  font-size: 16px;
  color: #fff;
}

/* Stats Grid */
.home-stats-grid-premium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box-premium {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s ease;
}

.stat-box-premium:hover {
  transform: translateY(-5px);
  background: rgba(30, 41, 59, 0.8);
}

.stat-icon {
  font-size: 24px;
  background: rgba(255, 255, 255, 0.05);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
}

.stat-info p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
}

.stat-info h3 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 700;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  background: #0f172a;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: modalPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 32px;
  cursor: pointer;
  box-shadow: none;
  padding: 10px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 1001;
}

.close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 32px;
}

.current-limit-display {
  background: rgba(255, 255, 255, 0.03);
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.current-limit-display span {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.current-limit-display h3 {
  margin: 8px 0 0;
  font-size: 32px;
  color: var(--accent-2);
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 16px;
}

.upgrade-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 8px;
}

.upgrade-grid::-webkit-scrollbar {
  width: 4px;
}

.upgrade-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.upgrade-tier {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upgrade-tier:hover {
  background: rgba(255, 255, 255, 0.06);
}

.upgrade-tier.active {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--accent-1);
}

.tier-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.tier-info {
  flex: 1;
}

.tier-info strong {
  display: block;
  font-size: 16px;
}

.tier-info span {
  font-size: 12px;
  color: #94a3b8;
}

.tier-benefit {
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
}

.full-width {
  width: 100%;
}

.btn-premium {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

.btn-premium.primary {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.btn-premium.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-premium:hover {
  transform: scale(1.02);
  filter: brightness(1.1);
}

.status-msg {
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--accent-2);
  min-height: 20px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(124, 58, 237, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
  }
}

.premium-dashboard-header,
.balance-card-premium,
.home-stats-grid-premium,
.action-buttons-premium {
  animation: fadeInUp 0.6s ease-out both;
}

.balance-card-premium {
  animation-delay: 0.1s;
}

.home-stats-grid-premium {
  animation-delay: 0.2s;
}

.action-buttons-premium {
  animation-delay: 0.3s;
}

.status-badge-premium.is-active {
  animation: pulse 2s infinite;
}

.btn-premium.primary:hover {
  box-shadow: 0 15px 30px rgba(124, 58, 237, 0.4);
}

.action-buttons-premium {
  display: flex;
  gap: 20px;
  margin-top: 24px;
}

.market-shell {
  padding-bottom: 88px;
}

.market-topbar {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.market-chip {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 700;
  text-align: center;
}

.market-balance {
  background: linear-gradient(120deg, rgba(76, 29, 149, 0.7), rgba(14, 116, 144, 0.7));
}

.market-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.market-tab {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.market-tab.active {
  background: linear-gradient(125deg, #8b5cf6, #22d3ee);
}

.market-title {
  margin: 8px 0 12px;
  font-size: 40px;
  line-height: 1.05;
}

.market-timer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.timer-item {
  text-align: center;
}

.timer-box {
  min-width: 68px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #f8fafc;
  color: #020617;
  font-weight: 800;
  font-size: 28px;
}

.timer-item span {
  display: block;
  margin-top: 6px;
  color: #dbeafe;
}

.nft-badge {
  display: inline-block;
  margin: 8px 0 14px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.45);
  font-weight: 700;
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: linear-gradient(135deg, rgba(49, 15, 106, 0.6), rgba(30, 41, 59, 0.5));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 14px;
}

.stat-card p {
  margin: 0 0 8px;
  color: #e2e8f0;
  font-weight: 600;
}

.stat-card h3 {
  margin: 0;
  font-size: 30px;
}

.nft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.nft-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 12px;
}

.nft-card.featured {
  border-color: #22d3ee;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.28);
}

.nft-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: #110e24;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.nft-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-meta {
  margin: 4px 0;
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.nft-meta strong {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-left: 4px;
}

.bid-btn {
  width: 100%;
  background: linear-gradient(90deg, #9b6dff 0%, #68e2cf 100%);
  color: #000;
  font-weight: 800;
  font-size: 16px;
  padding: 14px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s;
}

.history-list-premium {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
}

.history-item {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
  border-color: rgba(124, 58, 237, 0.3);
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.6);
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}

.history-item.expanded {
  border-color: #7c3aed;
  box-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.2);
}

.history-item.expanded .history-header {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.1), rgba(99, 102, 241, 0.1));
}

.history-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-icon {
  width: 40px;
  height: 40px;
  background: rgba(124, 58, 237, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-nft {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.5px;
}

.status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  width: fit-content;
}

.status-not-for-sale {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-in-sale {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-sold {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.history-chevron {
  font-size: 14px;
  color: #94a3b8;
  transition: transform 0.3s;
}

.history-item.expanded .history-chevron {
  color: #7c3aed;
}

.history-detail {
  padding: 20px;
  background: rgba(15, 23, 42, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.history-detail-item span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-detail-item strong {
  display: block;
  font-size: 14px;
  color: #f1f5f9;
  word-break: break-all;
}

.history-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.hash-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a78bfa;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  background: rgba(167, 139, 250, 0.1);
  padding: 8px 16px;
  border-radius: 10px;
  width: fit-content;
  transition: all 0.2s;
}

.hash-link:hover {
  background: rgba(167, 139, 250, 0.2);
  transform: translateX(4px);
}

.history-timer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timer-completed-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.empty-history {
  padding: 60px 20px;
  text-align: center;
  background: rgba(30, 41, 59, 0.2);
  border-radius: 24px;
  border: 2px dashed rgba(255, 255, 255, 0.05);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-history h3 {
  color: #fff;
  margin-bottom: 8px;
  font-size: 18px;
}

.empty-history p {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.5;
}

.hash-link.copied {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.sale-timer {
  display: flex;
  gap: 12px;
}

.sale-timer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sale-timer-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.3);
  color: #fff;
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-family: 'Monaco', monospace;
  font-weight: 700;
  font-size: 18px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sale-timer-item small {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
}

.sale-completed {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(34, 197, 94, 0.2);
  margin: 10px 0;
  display: inline-block;
}

.claim-token-btn {
  width: 100%;
  background: linear-gradient(90deg, #7c3aed, #6366f1);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.claim-token-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(124, 58, 237, 0.4);
  filter: brightness(1.1);
}

.claim-token-btn:active {
  transform: translateY(0);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.pagination button {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  box-shadow: none;
}

.pagination button.active {
  background: #4f46e5;
  border-color: #4f46e5;
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  width: 90%;
  max-width: 500px;
  background: #151129;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 35px;
  display: flex;
  justify-content: space-around;
  padding: 10px;
  z-index: 100;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #71717a;
  text-decoration: none;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  flex: 1;
  cursor: pointer;
}

.bottom-nav-item.active {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
}

.bottom-nav-item .nav-icon {
  font-size: 20px;
}

.page-size-selector {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  margin-right: 8px;
}

.pagination .p-icon {
  font-size: 14px;
}

.refer-shell {
  padding-bottom: 88px;
}

.refer-title {
  margin: 0 0 10px;
  font-size: 46px;
  line-height: 1.04;
}

.refer-title span {
  color: #60a5fa;
}

.refer-subtitle {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 26px;
  line-height: 1.4;
}

.refer-qr-panel {
  background: rgba(10, 5, 35, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

#referQrImage {
  width: min(100%, 420px);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

.refer-info-grid {
  margin: 8px 0 16px;
}

.refer-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 2px;
  font-size: 36px;
  color: #e2e8f0;
}

.refer-info-row strong {
  color: #a78bfa;
}

.refer-address-box {
  background: #e5e7eb;
  color: #111827;
  border-radius: 20px;
  padding: 16px 24px;
  font-size: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.earnings-total-badge {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  padding: 10px 20px;
  border-radius: 16px;
  text-align: right;
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.2);
}

.earnings-total-badge span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.earnings-total-badge strong {
  font-size: 20px;
  font-weight: 800;
}

.earning-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.earning-card-premium {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px;
  border-radius: 24px;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.earning-card-premium:hover {
  background: rgba(30, 41, 59, 0.7);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
}

.earning-card-premium .card-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.earning-card-premium h3 {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  font-weight: 600;
}

.earning-card-premium p {
  margin: 8px 0;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
}

.market-balance-badge {
  background: rgba(30, 41, 59, 0.6);
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.market-balance-badge span {
  font-size: 10px;
  color: #94a3b8;
  display: block;
}

.market-tabs-premium {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.market-tabs-premium .market-tab {
  flex: 1;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px;
  border-radius: 14px;
  color: #94a3b8;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.market-tabs-premium .market-tab.active {
  background: var(--accent-1);
  color: #fff;
  border-color: var(--accent-1);
}

.timer-container-premium {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(6, 182, 212, 0.1));
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.market-timer-premium {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

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

.timer-item div {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.timer-item span {
  font-size: 10px;
  text-transform: uppercase;
  color: #94a3b8;
  display: block;
  margin-top: 4px;
}

.timer-separator {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.2);
  margin-top: -14px;
}

.nft-grid-premium {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-bottom: 100px;
}

.nft-card-premium {
  background: rgba(30, 41, 59, 0.4);
  border-radius: 24px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nft-card-premium:hover {
  transform: translateY(-5px);
  border-color: var(--accent-1);
  background: rgba(30, 41, 59, 0.6);
}

.nft-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 5;
}

.resale-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  background: var(--accent-1);
  color: #fff;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  z-index: 5;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4);
}

.nft-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: radial-gradient(circle at center, #2d2b55, #110e24);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px;
}

.nft-art img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
}

.nft-card-premium:hover .nft-art img {
  transform: scale(1.1) translateY(-5px);
}

.nft-details {
  padding: 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nft-price-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nft-price-row .label {
  font-size: 10px;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.nft-price-row .value {
  font-size: 16px;
  color: #fff;
  font-weight: 800;
}

.nft-stats {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

.nft-stat-item {
  display: flex;
  flex-direction: column;
}

.nft-stat-item .s-label {
  font-size: 9px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
}

.nft-stat-item .s-value {
  font-size: 11px;
  font-weight: 700;
}

.text-success { color: #22c55e; }
.text-accent { color: var(--accent-1); }

.bid-btn {
  width: 100%;
  background: linear-gradient(90deg, var(--accent-1) 0%, var(--accent-2) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bid-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3);
}

.bid-btn:disabled {
  background: #334155;
  color: #64748b;
  cursor: not-allowed;
}

/* Market Info Grid */
.market-info-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.m-info-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.m-info-card:hover {
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.1);
}

.m-info-card.highlighted {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.15));
  border-color: var(--accent-1);
}

.m-info-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.m-info-details span {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.m-info-details strong {
  display: block;
  font-size: 16px;
  color: #fff;
  margin-top: 2px;
}


.refer-card-premium {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 32px;
  padding: 40px;
  display: flex;
  gap: 40px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.qr-section {
  text-align: center;
}

.qr-wrapper {
  background: #fff;
  padding: 16px;
  border-radius: 24px;
  margin-bottom: 16px;
  display: inline-block;
}

.qr-wrapper img {
  width: 200px;
  height: 200px;
}

.qr-hint {
  font-size: 12px;
  color: #94a3b8;
}

.refer-details {
  flex: 1;
}

.refer-item-premium {
  margin-bottom: 24px;
}

.refer-item-premium span {
  font-size: 13px;
  color: #94a3b8;
  display: block;
  margin-bottom: 12px;
}

.copy-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.copy-box code {
  color: var(--accent-2);
  font-size: 14px;
  word-break: break-all;
}

.refer-stats-mini {
  display: flex;
  gap: 24px;
}

.r-mini-stat span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
}

.r-mini-stat strong {
  font-size: 18px;
  color: #fff;
}

.team-stats-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 15px;
  margin-bottom: 32px;
}

.t-stat-card {
  background: rgba(30, 41, 59, 0.4);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.t-stat-card:hover {
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.1);
}

.t-stat-card.highlighted {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.2));
  border-color: var(--accent-1);
}

.t-stat-card .label {
  font-size: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.t-stat-card .value {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.t-stat-card .icon-bg {
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 64px;
  opacity: 0.05;
  pointer-events: none;
}

.referral-list-premium {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ref-item-premium {
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ref-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
}

.ref-info {
  flex: 1;
}

.ref-info strong {
  display: block;
  font-size: 14px;
}

.ref-info span {
  font-size: 12px;
  color: #64748b;
}

.ref-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
}

.ref-status.active {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.ref-status.inactive {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.referrals-section-premium {
  margin-top: 24px;
  background: rgba(15, 23, 42, 0.3);
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.referrals-section-premium h3 {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.levels-container-premium {
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.premium-table th {
  padding: 16px;
  font-size: 12px;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 1px;
}

.premium-table td {
  padding: 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.level-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #fff;
}

.l-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.m-count {
  font-weight: 700;
  color: #cbd5e1;
}

.status-tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  font-weight: 600;
}

.status-tag.active {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.status-tag.empty {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.v-btn {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.v-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.v-btn:disabled {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  cursor: not-allowed;
}

.level-row-anim {
  animation: slideIn 0.3s ease-out forwards;
  animation-delay: calc(var(--i) * 0.05s);
  opacity: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.premium-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.level-details-modal {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 10px;
}

.level-details-modal::-webkit-scrollbar {
  width: 5px;
}

.level-details-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.level-card-premium:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: var(--accent-1);
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.15), rgba(15, 23, 42, 0.9));
  box-shadow: 0 20px 40px rgba(124, 58, 237, 0.2);
}

.level-card-premium::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.level-card-premium:hover::after {
  transform: scaleX(1);
}

.level-card-premium .level-num {
  font-size: 12px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 800;
  margin-bottom: 8px;
}

.level-card-premium .level-count {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
}

.level-card-premium .view-label {
  margin-top: 12px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 99px;
  transition: all 0.3s ease;
}

.level-card-premium:hover .view-label {
  color: #fff;
  background: var(--accent-1);
}

.level-card-premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.level-card-premium:hover::before {
  transform: translateX(100%);
}

.level-card-premium:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--accent-1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.level-card-premium .level-num {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.level-card-premium .level-count {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-top: 8px;
}

.level-card-premium .view-label {
  display: block;
  margin-top: 12px;
  font-size: 10px;
  color: var(--accent-2);
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
}

.level-card-premium:hover .view-label {
  opacity: 1;
}

.level-details-modal {
  max-height: 400px;
  overflow-y: auto;
}

.empty-msg {
  text-align: center;
  color: #64748b;
  padding: 20px;
}

/* Refer Page Premium Overhaul */
.refer-grid-premium {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.refer-card-main {
  background: rgba(30, 41, 59, 0.5);
  border-radius: 28px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.qr-frame {
  background: #fff;
  padding: 12px;
  border-radius: 20px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.qr-frame img {
  width: 180px;
  height: 180px;
  display: block;
}

.qr-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent-2);
  font-weight: 700;
}

.refer-link-section {
  width: 100%;
}

.refer-link-section label {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 12px;
  font-weight: 600;
}

.link-copy-wrapper {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

.link-display {
  flex: 1;
  padding: 16px;
  font-family: 'Monaco', monospace;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-action-btn {
  background: var(--accent-1);
  border: none;
  color: #fff;
  padding: 0 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  transition: all 0.2s;
  box-shadow: none;
  border-radius: 0;
}

.copy-action-btn:hover {
  filter: brightness(1.2);
}

.copy-toast {
  margin-top: 10px;
  font-size: 12px;
  color: #4ade80;
  text-align: center;
  font-weight: 600;
}

.refer-stat-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 24px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.refer-stat-card.gold { border-left: 4px solid #fbbf24; }
.refer-stat-card.blue { border-left: 4px solid #3b82f6; }

.refer-stat-card .icon {
  font-size: 28px;
  background: rgba(255, 255, 255, 0.05);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.refer-stat-card .data span {
  display: block;
  font-size: 12px;
  color: #94a3b8;
}

.refer-stat-card .data strong {
  font-size: 18px;
  color: #fff;
}

.sharing-options {
  margin-top: 24px;
  padding: 24px;
  background: rgba(124, 58, 237, 0.05);
  border-radius: 20px;
  border: 1px dashed rgba(124, 58, 237, 0.2);
}

.sharing-options p {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.share-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.share-btn {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.share-btn:hover {
  transform: translateY(-4px);
}

.share-btn img {
  width: 28px;
  height: 28px;
}

.referral-guide {
  margin-top: 40px;
  padding-bottom: 120px;
}

.referral-guide h3 {
  font-size: 18px;
  margin-bottom: 24px;
  text-align: center;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.step-num {
  width: 32px;
  height: 32px;
  background: var(--accent-1);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}

.step p {
  font-size: 13px;
  color: #94a3b8;
  margin: 0;
}

@media (max-width: 768px) {
  .refer-grid-premium {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  #app {
    overflow-x: hidden;
  }

  .drawer {
    position: absolute;
    height: 100%;
    width: 270px;
    z-index: 20;
  }

  .main {
    padding: 16px;
  }

  .header {
    border-radius: 14px;
    gap: 10px;
  }

  .logo {
    font-size: 17px;
    letter-spacing: 1px;
  }

  .row > button {
    flex: 1 1 180px;
  }

  .market-title {
    font-size: 32px;
  }

  .home-stats-grid {
    grid-template-columns: 1fr;
  }

  .nft-meta {
    font-size: 22px;
  }

  .nft-meta span {
    font-size: 18px;
  }

  .bid-btn {
    font-size: 22px;
  }

  .refer-title {
    font-size: 36px;
  }

  .refer-subtitle {
    font-size: 20px;
  }

  .refer-info-row {
    font-size: 28px;
  }

  .refer-address-box {
    font-size: 30px;
  }

  .earning-card p {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    margin: 8px auto 14px;
  }

  .auth-form {
    padding: 12px;
  }

  .main {
    padding: 12px;
  }

  .header {
    padding: 10px 12px;
  }

  .icon-btn,
  .danger,
  button {
    padding: 10px 12px;
    font-size: 13px;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .card h2 {
    font-size: 18px;
  }

  .pkg {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .pkg button {
    width: 100%;
  }

  .market-topbar {
    grid-template-columns: 1fr;
  }

  .market-title {
    font-size: 22px;
  }

  .home-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .market-timer {
    justify-content: flex-start;
    gap: 8px;
  }

  .timer-box {
    min-width: 52px;
    font-size: 20px;
  }

  .market-stats {
    grid-template-columns: 1fr;
  }

  .nft-grid-premium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .nft-art {
    font-size: 48px;
  }

  .nft-meta {
    font-size: 18px;
  }

  .nft-meta span {
    font-size: 16px;
  }

  .bid-btn {
    font-size: 18px;
  }

  .bottom-nav-item {
    font-size: 12px;
    padding: 10px 4px;
  }

  .history-item {
    padding: 0;
  }

  .history-nft {
    font-size: 20px;
  }

  .status-badge {
    font-size: 14px;
    padding: 5px 10px;
  }

  .history-chevron {
    font-size: 24px;
  }

  .history-detail-item strong {
    font-size: 14px;
  }

  .history-detail-item a {
    font-size: 18px;
  }

  .sale-timer-box {
    min-width: 48px;
    font-size: 16px;
    padding: 7px 8px;
  }

  .sale-timer {
    gap: 8px;
  }

  .sale-completed {
    font-size: 34px;
  }

  .claim-token-btn {
    font-size: 16px;
  }

  .refer-title {
    font-size: 30px;
  }

  .refer-subtitle {
    font-size: 16px;
  }

  .refer-qr-panel {
    border-radius: 14px;
    padding: 14px;
  }

  .refer-info-row {
    font-size: 18px;
  }

  .refer-address-box {
    font-size: 17px;
    padding: 12px 14px;
    border-radius: 14px;
    flex-direction: column;
    align-items: flex-start;
  }

  .earning-grid {
    grid-template-columns: 1fr;
  }

  .earning-card {
    border-radius: 16px;
  }

  .earning-card p {
    font-size: 24px;
  }
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination button {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}

.pagination button.active {
  background: #7c3aed;
  border-color: #7c3aed;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
