*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1e293b, #020617 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #e5e7eb;
}

.page {
  width: 100%;
  max-width: 780px;
}

.hero {
  text-align: center;
  margin-bottom: 16px;
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  object-fit: cover;
  margin-bottom: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.7);
}

.hero h1 {
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.hero p {
  font-size: 0.95rem;
  color: #9ca3af;
}

.card {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.wallet-section {
  margin-bottom: 16px;
}

.wallet-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

#walletStatus {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.25);
  font-size: 0.9rem;
  color: #e5e7eb;
}

.network-hint {
  font-size: 0.85rem;
  color: #facc15;
  margin-top: 4px;
}

.stats-section {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: #9ca3af;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: #22c55e;
}

.stat-remaining {
  font-size: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.full-width {
  width: 100%;
  justify-content: center;
  border-top: 1px solid rgba(34, 197, 94, 0.3);
  padding-top: 12px;
  margin-top: 8px;
}

.form-section {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
}

.field span {
  color: #d1d5db;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:focus,
textarea:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5);
  background: rgba(15, 23, 42, 0.95);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.package-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.package-select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.5);
  background: rgba(15, 23, 42, 0.95);
}

.price-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.3);
  margin-top: 8px;
}

.price-label {
  font-size: 0.95rem;
  color: #d1d5db;
}

.price-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: #22c55e;
}

.unit-label {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
  font-size: 0.9rem;
}

.total-price {
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid rgba(34, 197, 94, 0.5);
  margin-top: 4px;
}

.total-price .price-value {
  font-size: 1.6rem;
}

button {
  cursor: pointer;
  border: none;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button.primary {
  margin-top: 4px;
  width: 100%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #022c22;
  box-shadow: 0 10px 30px rgba(22, 163, 74, 0.5);
}

button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(22, 163, 74, 0.7);
}

button.primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.6);
}

#walletStatus + button {
  background: rgba(15, 118, 110, 0.9);
  color: #ecfeff;
}

#walletStatus + button:hover {
  background: rgba(13, 148, 136, 1);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.tx-status {
  margin-top: 8px;
  min-height: 18px;
  font-size: 0.85rem;
  color: #e5e7eb;
  word-break: break-all;
}

.info-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
}

.info-section h2 {
  font-size: 1rem;
  margin-bottom: 8px;
  margin-top: 16px;
}

.info-section h2:first-child {
  margin-top: 0;
}

.contract-address {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.contract-address:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.5);
  transform: translateY(-1px);
}

.contract-label {
  font-size: 0.85rem;
  color: #9ca3af;
  white-space: nowrap;
}

.contract-value {
  font-size: 0.85rem;
  font-family: 'Courier New', monospace;
  color: #22c55e;
  font-weight: 600;
  word-break: break-all;
  flex: 1;
  min-width: 200px;
}

.copy-hint {
  font-size: 0.75rem;
  color: #22c55e;
  white-space: nowrap;
  opacity: 0.8;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  flex: 1;
  min-width: 140px;
  justify-content: center;
}

.social-link.twitter {
  background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
  color: white;
  box-shadow: 0 4px 12px rgba(29, 161, 242, 0.3);
}

.social-link.twitter:hover {
  background: linear-gradient(135deg, #0d8bd9, #0a6fb8);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(29, 161, 242, 0.5);
}

.social-link.telegram {
  background: linear-gradient(135deg, #0088cc, #006ba6);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.social-link.telegram:hover {
  background: linear-gradient(135deg, #006ba6, #005580);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 136, 204, 0.5);
}

.social-icon {
  font-size: 1.2rem;
  font-weight: bold;
}

.info-section ul {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
}

.info-section li {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 4px;
}


@media (max-width: 600px) {
  .card {
    padding: 16px;
  }

  .stats-section {
    flex-direction: column;
    gap: 12px;
  }

  .stat-item {
    width: 100%;
  }

  .hero h1 {
    font-size: 1.5rem;
  }
}

/* 游戏按钮 */
.game-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  display: flex;
  justify-content: center;
}

.game-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  color: white;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.game-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.game-button:hover::before {
  left: 100%;
}

.game-button:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.6);
}

.game-button:active {
  transform: translateY(-1px) scale(1.02);
}

.game-icon {
  font-size: 1.5rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.game-text {
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .game-button {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
  
  .game-icon {
    font-size: 1.3rem;
  }
}
