@import url("card-effects.generated.css");

:root {
  --accent: #6750a4;
  --accent-light: #7f67be;
  --glow: #00e5ff;
  --bg: #f8f7fc;
  --surface: #ffffff;
  --text: #1c1b1f;
  --muted: #49454f;
  --card-aspect: 2.5 / 3.5;
}

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

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

body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* —— Coming soon —— */

.page--landing {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.glow--purple {
  width: 320px;
  height: 320px;
  background: var(--accent);
  top: -80px;
  right: -60px;
}

.glow--cyan {
  width: 280px;
  height: 280px;
  background: var(--glow);
  bottom: -40px;
  left: -80px;
  opacity: 0.2;
}

.landing-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 2.5rem 2rem;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid rgba(103, 80, 164, 0.12);
  box-shadow:
    0 1px 2px rgba(28, 27, 31, 0.06),
    0 12px 40px rgba(103, 80, 164, 0.1);
  text-align: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--accent), var(--accent-light));
  box-shadow: 0 8px 24px rgba(103, 80, 164, 0.35);
}

.logo svg {
  width: 36px;
  height: 36px;
  color: #fff;
}

.landing-card h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.75rem, 5vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.domain {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.badge {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(103, 80, 164, 0.1);
  border-radius: 999px;
}

.landing-card p {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 32ch;
  margin-inline: auto;
}

.landing-footer {
  position: relative;
  z-index: 1;
  margin-top: 2.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* —— Slot page (mirrors app slot screen) —— */

.page--slot {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.slot-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) 1.5rem
    max(2rem, env(safe-area-inset-bottom));
  gap: 1rem;
}

.slot-message {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1.5rem;
  max-width: 28rem;
}

.slot-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(103, 80, 164, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.slot-actions {
  width: min(100%, 340px);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.5rem;
}

.slot-actions .btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
}

/* —— Trading card —— */

.trading-card-wrap {
  width: min(100%, 340px);
}

/* —— Interactive card (holo + flip) —— */

.tc-scene {
  --tc-holo-angle: 126deg;
  --tc-shine-x: 50%;
  --tc-shine-y: 50%;
  width: 100%;
}

.tc-flip {
  position: relative;
  width: 100%;
  aspect-ratio: var(--card-aspect);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.tc-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tc-face--front {
  transform: rotateY(0deg) translateZ(1px);
  z-index: 2;
}

.tc-face--back {
  transform: rotateY(180deg) translateZ(1px);
}

.tc-art {
  isolation: isolate;
}

.tc-holo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
}

.tc-holo--rainbow {
  mix-blend-mode: soft-light;
}

.tc-holo--shine {
  mix-blend-mode: overlay;
}

/* Safari / iOS: holo without mix-blend-mode glitches */
.tc-platform-safari .tc-holo--rainbow {
  mix-blend-mode: normal;
  opacity: 0.55;
}

.tc-platform-safari .tc-holo--shine {
  mix-blend-mode: normal;
  opacity: 0.85;
}

.tc-back {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #eceef2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 14px 10px;
  box-shadow:
    0 0 0 1.5px rgba(0, 229, 255, 0.85),
    0 0 20px rgba(0, 229, 255, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.2);
}

.tc-back__frame {
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 229, 255, 0.55);
  pointer-events: none;
}

.tc-back__avatar {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 27, 31, 0.08);
  border: 1px solid rgba(28, 27, 31, 0.12);
  color: var(--muted);
  overflow: hidden;
  flex-shrink: 0;
}

.tc-back__avatar svg {
  width: 28px;
  height: 28px;
}

.tc-back__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tc-back__name {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tc-back__handle {
  position: relative;
  z-index: 1;
  margin: 3px 0 0;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--muted);
}

.tc-back__bio {
  position: relative;
  z-index: 1;
  margin: 6px 0 0;
  font-size: 0.5625rem;
  line-height: 1.35;
  text-align: center;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tc-back__location {
  position: relative;
  z-index: 1;
  margin: 4px 0 0;
  font-size: 0.5625rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-back__links {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}

.tc-back__link {
  display: block;
  width: 100%;
  padding: 0.4rem 0.65rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(28, 27, 31, 0.08);
  border-radius: 8px;
}

.tc-back__link:hover {
  background: #fff;
}

.trading-card {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: var(--card-aspect);
  border-radius: 14px;
  overflow: hidden;
  background: #0d0d12;
  box-shadow:
    0 0 0 1.5px rgba(0, 229, 255, 0.85),
    0 0 20px rgba(0, 229, 255, 0.25),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.trading-card__art {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #1a1a24 0%, #0a0a0f 100%);
}

.trading-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trading-card__art-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.25);
}

.trading-card__art-placeholder svg {
  width: 28%;
  height: 28%;
}

.trading-card__frame {
  position: absolute;
  inset: 8px;
  border-radius: 12px;
  border: 1.5px solid rgba(0, 229, 255, 0.55);
  pointer-events: none;
}

.trading-card__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 36px 14px;
  pointer-events: none;
}

.trading-card__name {
  margin: 0;
  font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  line-height: 1.15;
}

.trading-card__spacer {
  flex: 1;
}

.trading-card__stats {
  max-width: 62%;
}

.trading-card__stat-label {
  margin: 0 0 2px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--glow);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.trading-card__stat-value {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  line-height: 1.3;
}

.trading-card__stat-value--muted {
  opacity: 0.55;
}

.trading-card__illus {
  position: absolute;
  left: 14px;
  right: 12px;
  bottom: 10px;
  margin: 0;
  font-size: 0.53rem;
  color: rgba(255, 255, 255, 0.65);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* —— Buttons —— */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn--store {
  gap: 0.5rem;
}

.btn__icon {
  display: flex;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
}

.btn__icon svg {
  width: 100%;
  height: 100%;
}

.btn--primary .btn__icon {
  color: #fff;
}

.btn--secondary .btn__icon {
  color: var(--accent);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  color: #fff;
  background: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-light);
}

.btn--secondary {
  color: var(--accent);
  background: rgba(103, 80, 164, 0.12);
}

.btn--secondary:hover {
  background: rgba(103, 80, 164, 0.18);
}

.btn-row {
  display: flex;
  gap: 0.5rem;
}

.btn-row .btn {
  flex: 1;
  font-size: 0.875rem;
  min-height: 40px;
}

/* —— Collect modal —— */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(28, 27, 31, 0.45);
  animation: fadeIn 0.2s ease;
}

@media (min-width: 480px) {
  .modal-backdrop {
    align-items: center;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  width: min(100%, 400px);
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 20px 20px 12px 12px;
  box-shadow: 0 16px 48px rgba(28, 27, 31, 0.2);
  animation: slideUp 0.25s ease;
}

@media (min-width: 480px) {
  .modal {
    border-radius: 20px;
  }
}

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

.modal h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal__close {
  margin-top: 0.75rem;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}
