/* Desktop-only layout */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Contract address banner */
.ca-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: #1a1a1a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  z-index: 200;
}

.ca-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  word-break: break-all;
}

.ca-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ca-copy svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ca-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.ca-copy.copied {
  background: #16a34a;
  border-color: #16a34a;
}

/* Hero section */
.hero-wrapper {
  width: 100%;
  max-width: 1559px;
  margin: 0 auto;
  position: relative;
}

.hero {
  position: relative;
  width: 100%;
  line-height: 0;
}

.hero-bg {
  display: block;
  width: 100%;
  height: auto;
}

/* Header overlay */
.hero-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  z-index: 3;
  pointer-events: none;
}

.hero-header > * {
  pointer-events: auto;
}

.hero-header-left {
  flex: 1 1 0;
  min-width: 0;
}

/* Nav centered in the header */
.hero-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #1a1a1a;
  line-height: 1;
  flex: 2 1 0;
}

.hero-nav a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hero-nav a:hover {
  color: #7c3aed;
}

.nav-separator {
  color: #1a1a1a;
  font-size: 10px;
  line-height: 1;
}

/* Right side: wallet + X */
.hero-header-right {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.hero-btn {
  display: block;
  line-height: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.hero-btn img {
  display: block;
  width: 100%;
  height: auto;
}

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

/* Connect wallet — sized for the header */
.btn-primary {
  position: relative;
  width: auto;
  height: 52px;
}

.btn-primary img {
  width: auto;
  height: 100%;
}

.btn-primary .wallet-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 44px; /* leave room for the wallet icon on the left */
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1a1a1a;
  text-transform: uppercase;
}

/* X (Twitter) link */
.x-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000000;
  color: #ffffff;
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.x-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.x-link:hover {
  transform: scale(1.08);
  background: #1d1d1d;
}

/* View all creatures — bottom-center, exact position from the source hero image */
.btn-secondary {
  position: absolute;
  top: 94.3%;
  left: 33.5%;
  width: 33%;
}

/* Second section — gameplay dashboard */
.second-wrapper {
  width: 100%;
  max-width: 1862px;
  margin: 0 auto;
  background: #000000;
  position: relative;
}

.second {
  position: relative;
  width: 100%;
  line-height: 0;
}

.second-bg {
  display: block;
  width: 100%;
  height: auto;
}

/* Third section — pixel world */
.third-wrapper {
  width: 100%;
  max-width: 1983px;
  margin: 0 auto;
  background: #000000;
  position: relative;
}

.third {
  position: relative;
  width: 100%;
  line-height: 0;
}

.third-bg {
  display: block;
  width: 100%;
  height: auto;
}

/* Start rolling — centered under the heading */
.btn-third {
  position: absolute;
  top: 83.5%;
  left: 35%;
  width: 30%;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #666666;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #000000;
}

.modal h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.modal-text {
  font-size: 15px;
  color: #555555;
  line-height: 1.5;
  margin-bottom: 8px;
}

.modal-x-link {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: #7c3aed;
  text-decoration: none;
  margin-bottom: 24px;
}

.modal-x-link:hover {
  text-decoration: underline;
}

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 12px 8px;
  background: #f3f4f6;
  border-radius: 12px;
}

.countdown-item span {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
}

.countdown-item small {
  font-size: 11px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

/* Wallet button in modal */
.wallet-connect-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  background: #7c3aed;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.wallet-connect-btn:hover {
  background: #6d28d9;
  transform: translateY(-1px);
}

.wallet-connect-btn:disabled {
  background: #a78bfa;
  cursor: default;
  transform: none;
}

.wallet-status {
  margin-top: 14px;
  font-size: 13px;
  color: #444444;
  word-break: break-all;
  min-height: 20px;
}

.wallet-status.error {
  color: #dc2626;
}

.wallet-status.success {
  color: #16a34a;
}
