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

:root {
  --bg: #1b1934;
  --paper: #2e3044;
  --paper-glass: rgba(46, 48, 68, 0.6);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --accent: #63b5e4;
  --accent-2: #c094dc;
  --gradient: linear-gradient(90deg, #c094dc 0%, #63b5e4 100%);
  --gradient-135: linear-gradient(135deg, #c094dc, #63b5e4);
  --border: rgba(99, 181, 228, 0.15);
  --border-soft: rgba(99, 181, 228, 0.1);
  --danger: #f44336;
  --warn: #ff9800;
  --radius: 12px;
  --radius-lg: 16px;
  --header-h: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

input,
textarea,
select,
button {
  font-family: inherit;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c094dc, #63b5e4);
  border-radius: 3px;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding-top: calc(var(--header-h) + 16px);
  padding-bottom: 48px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-lg {
  max-width: 1024px;
}
.container-md {
  max-width: 768px;
}
.container-sm {
  max-width: 480px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(27, 25, 52, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.nav-desktop {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-auth-only {
  display: none;
}

body.is-authenticated .nav-auth-only {
  display: inline-flex;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px;
}

/* Footer */
.footer {
  margin-top: auto;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: rgba(27, 25, 52, 0.6);
}

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

.footer-muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-socials {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.2s;
}

.icon-btn:hover {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
  text-align: center;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

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

.btn-gradient:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(99, 181, 228, 0.4);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(99, 181, 228, 0.08);
}

.btn-danger-outline {
  border-color: rgba(244, 67, 54, 0.5);
  color: var(--danger);
  background: transparent;
}

.btn-danger-outline:hover:not(:disabled) {
  border-color: var(--danger);
  background: rgba(244, 67, 54, 0.08);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.btn-wallet {
  background: rgba(99, 181, 228, 0.12);
  border: 1px solid rgba(99, 181, 228, 0.3);
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-wallet:hover {
  background: rgba(99, 181, 228, 0.2);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: rgba(27, 25, 52, 0.6);
  border: 1px solid rgba(99, 181, 228, 0.3);
  border-radius: 8px;
  color: #fff;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
}

.form-error {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 4px;
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 4px;
}

/* Cards / paper */
.paper {
  background: var(--paper-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}
@media (max-width: 480px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* NFT Card */
.nft-card {
  display: block;
  background: rgba(46, 48, 68, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: 0.3s ease;
}

.nft-card:not(.locked):hover {
  transform: translateY(-4px);
  border-color: rgba(99, 181, 228, 0.3);
  box-shadow: 0 8px 32px rgba(99, 181, 228, 0.15);
}

.nft-card.locked {
  cursor: default;
}

.nft-card-media {
  position: relative;
  height: 240px;
  overflow: hidden;
}

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

.nft-card.locked .nft-card-media img {
  filter: blur(20px) brightness(0.4);
}

.nft-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(27, 25, 52, 0.6);
  text-align: center;
  padding: 16px;
}

.nft-lock-overlay .lock-icon {
  font-size: 2rem;
  color: var(--warn);
  margin-bottom: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
}

.chip-warn {
  background: rgba(255, 152, 0, 0.85);
  color: #fff;
}

.chip-accent {
  background: rgba(99, 181, 228, 0.15);
  color: var(--accent);
}

.chip-danger {
  background: rgba(244, 67, 54, 0.15);
  color: var(--danger);
}

.chip-gradient {
  background: var(--gradient);
  color: #fff;
}

.chip-outline {
  border: 1px solid rgba(99, 181, 228, 0.3);
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}

.chip-outline:hover {
  border-color: var(--accent);
}

.nft-card-body {
  padding: 20px;
}

.nft-card-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.nft-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--paper);
}

.avatar-lg {
  width: 120px;
  height: 120px;
  border: 3px solid transparent;
  background-image: linear-gradient(#2e3044, #2e3044), var(--gradient);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.price-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.price-value {
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-usd {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.price-usd-lg {
  font-size: 1rem;
  margin-top: 6px;
}

.eth-usd-hint {
  margin-top: 6px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 64px 0 48px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  padding: 12px 16px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--accent);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 2px;
  background: var(--gradient);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Empty / loading */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.skeleton {
  height: 320px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    90deg,
    rgba(46, 48, 68, 0.4),
    rgba(99, 181, 228, 0.08),
    rgba(46, 48, 68, 0.4)
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 768px) {
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: rgba(46, 48, 68, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 181, 228, 0.2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 420px;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 600;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: rgba(99, 181, 228, 0.06);
  border: 1px solid rgba(99, 181, 228, 0.12);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  text-align: left;
}

.wallet-option:hover {
  background: rgba(99, 181, 228, 0.15);
  border-color: rgba(99, 181, 228, 0.35);
}

.wallet-option img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
}

.wallet-option-fallback {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wallet-provider-list {
  max-height: min(50vh, 360px);
  overflow-y: auto;
  margin-bottom: 4px;
}

.wallet-option:disabled {
  opacity: 0.6;
  cursor: wait;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: rgba(46, 48, 68, 0.95);
  border: 1px solid rgba(99, 181, 228, 0.2);
  border-radius: 8px;
  padding: 8px;
  display: none;
  z-index: 120;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: rgba(99, 181, 228, 0.1);
}

.dropdown-item.danger {
  color: var(--danger);
}

.wallet-wrap {
  position: relative;
}

/* Mobile drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: rgba(27, 25, 52, 0.98);
  border-left: 1px solid var(--border);
  z-index: 160;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  padding: 24px;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.drawer-nav a {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.drawer-nav a:hover,
.drawer-nav a.active {
  color: var(--accent);
}

/* Auth layout */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(192, 148, 220, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(99, 181, 228, 0.12), transparent 50%),
    var(--bg);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: rgba(46, 48, 68, 0.5);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 32px;
  text-align: center;
}

.auth-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-135);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.stat-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Explore filters */
.filters-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.search-input {
  min-width: 200px;
}

/* Mint stepper */
.stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 8px;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(99, 181, 228, 0.1);
  border: 1px solid rgba(99, 181, 228, 0.25);
  color: var(--text-muted);
}

.step.active .step-dot,
.step.done .step-dot {
  background: var(--gradient);
  border: none;
  color: #fff;
}

.step-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.step.active .step-label {
  color: var(--accent);
}

.mint-step {
  display: none;
}

.mint-step.active {
  display: block;
}

.file-drop {
  display: block;
  width: 100%;
  border: 2px dashed rgba(99, 181, 228, 0.45);
  border-radius: 16px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #fff;
  background: rgba(99, 181, 228, 0.04);
  position: relative;
  box-sizing: border-box;
}

.file-drop:hover,
.file-drop.dragover {
  border-color: #63b5e4;
  background: rgba(99, 181, 228, 0.1);
  box-shadow: 0 0 0 4px rgba(99, 181, 228, 0.08);
}

.file-drop:focus {
  outline: none;
  border-color: #63b5e4;
  box-shadow: 0 0 0 4px rgba(99, 181, 228, 0.15);
}

.file-drop.has-file {
  border-color: rgba(192, 148, 220, 0.55);
  background: rgba(192, 148, 220, 0.06);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.file-drop-inner {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.file-drop-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  background: linear-gradient(135deg, #c094dc, #63b5e4);
  margin-bottom: 4px;
  box-shadow: 0 8px 24px rgba(99, 181, 228, 0.25);
}

.file-drop-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  word-break: break-all;
  max-width: 100%;
  padding: 0 8px;
}

.file-drop-caption {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
}

.file-drop-btn {
  margin-top: 8px;
  pointer-events: none;
  border-color: rgba(99, 181, 228, 0.5) !important;
  color: #63b5e4 !important;
}

.preview-media {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  max-height: 300px;
  border: 1px solid rgba(99, 181, 228, 0.15);
  background: rgba(27, 25, 52, 0.5);
}

.preview-media video,
.preview-media img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

.explicit-box {
  padding: 16px;
  background: rgba(255, 152, 0, 0.08);
  border: 1px solid rgba(255, 152, 0, 0.2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .switch-slider {
  background: var(--warn);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.range-row {
  margin-top: 8px;
}

.range-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.mint-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  background: rgba(99, 181, 228, 0.05);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

/* NFT Cube Preview (mint step 5) */
.nft-cube-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  overflow: visible;
  padding: 16px 0 24px;
}

.nft-cube-title {
  font-size: 1.15rem;
  font-weight: 600;
}

.nft-cube-hint {
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.nft-cube-stage {
  width: min(100%, 440px);
  height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
  box-sizing: border-box;
  overflow: visible;
}

.nft-cube-scene {
  width: 280px;
  height: 280px;
  perspective: 900px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  overflow: visible;
  flex-shrink: 0;
}

.nft-cube-scene.is-dragging {
  cursor: grabbing;
}

.nft-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}

.cube-face {
  position: absolute;
  width: 280px;
  height: 280px;
  backface-visibility: hidden;
  border: 1px solid rgba(99, 181, 228, 0.25);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(46, 48, 68, 0.9);
  box-sizing: border-box;
}

.cube-face-front { transform: translateZ(140px); }
.cube-face-back { transform: rotateY(180deg) translateZ(140px); }
.cube-face-right {
  transform: rotateY(90deg) translateZ(140px);
  background: linear-gradient(135deg, rgba(46, 48, 68, 0.95), rgba(27, 25, 52, 0.95));
}
.cube-face-left {
  transform: rotateY(-90deg) translateZ(140px);
  background: linear-gradient(135deg, rgba(46, 48, 68, 0.95), rgba(27, 25, 52, 0.95));
}
.cube-face-top {
  transform: rotateX(90deg) translateZ(140px);
  background: linear-gradient(135deg, rgba(46, 48, 68, 0.95), rgba(27, 25, 52, 0.95));
}
.cube-face-bottom {
  transform: rotateX(-90deg) translateZ(140px);
  background: linear-gradient(135deg, rgba(46, 48, 68, 0.95), rgba(27, 25, 52, 0.95));
}

.cube-face-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.cube-face-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 4px;
}

.cube-face-heading {
  color: #fff;
  margin-bottom: 16px;
}

.cube-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.cube-face-back .cube-media {
  cursor: pointer;
}

.cube-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 25, 52, 0.35);
  cursor: pointer;
  transition: opacity 0.2s;
}

.cube-play-overlay.hidden {
  display: none !important;
}

.cube-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #c094dc, #63b5e4);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  padding-left: 4px;
  transform-origin: center center;
}

@keyframes cube-play-press {
  0% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
  35% {
    transform: scale(0.78);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }
  70% {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(99, 181, 228, 0.45);
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
    box-shadow: 0 0 0 transparent;
  }
}

.cube-play-overlay.is-pressing {
  display: flex !important;
  opacity: 1;
  pointer-events: none;
  background: rgba(27, 25, 52, 0.28);
}

.cube-play-overlay.is-pressing .cube-play-btn {
  animation: cube-play-press 0.58s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cube-face-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  z-index: 2;
}

.cube-face-footer strong {
  color: #fff;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.cube-edition-chip {
  margin-top: 6px;
  display: inline-flex;
}

.cube-video-chip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.cube-social-row {
  width: 100%;
  margin-bottom: 6px;
  padding: 0 8px;
  text-align: left;
}

.cube-social-value {
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cube-price {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.cube-avatar-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c094dc, #63b5e4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.cube-avatar-alt {
  background: linear-gradient(135deg, #63b5e4, #c094dc);
}

.cube-overline {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .nft-cube-stage {
    width: 100%;
    height: 360px;
    padding: 60px;
  }
  .nft-cube-scene,
  .cube-face {
    width: 240px;
    height: 240px;
  }
  .cube-face-front { transform: translateZ(120px); }
  .cube-face-back { transform: rotateY(180deg) translateZ(120px); }
  .cube-face-right { transform: rotateY(90deg) translateZ(120px); }
  .cube-face-left { transform: rotateY(-90deg) translateZ(120px); }
  .cube-face-top { transform: rotateX(90deg) translateZ(120px); }
  .cube-face-bottom { transform: rotateX(-90deg) translateZ(120px); }
}


/* Details */
.details-page {
  max-width: none;
  width: 100%;
  padding-left: 32px;
  padding-right: 32px;
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: start;
  width: 100%;
}

.details-cube-col {
  overflow: visible;
  min-width: 0;
}

.details-cube-col .nft-cube-section--details {
  padding-top: 0;
}

.details-cube-layout {
  display: flex;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.details-cube-main {
  flex: 1;
  min-width: 0;
}

.details-cube-col .nft-cube-stage {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.cube-gallery {
  margin: 20px auto 0;
  max-width: 440px;
}

.cube-gallery--vertical {
  flex: 0 0 112px;
  width: 112px;
  max-width: 112px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: auto;
  max-height: none;
  overflow: visible;
}

.cube-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.cube-gallery--vertical .cube-gallery-head {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.cube-gallery--vertical .cube-gallery-head .btn {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.7rem;
}

.cube-gallery-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cube-gallery--vertical .cube-gallery-label {
  text-align: center;
  font-size: 0.75rem;
}

.cube-gallery-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.cube-gallery--vertical .cube-gallery-track {
  flex-direction: column;
  flex: 0 0 auto;
  gap: 12px;
  overflow: visible;
  padding: 0;
  height: auto;
}

.cube-gallery-item {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  padding: 0;
  border: 2px solid rgba(99, 181, 228, 0.2);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(46, 48, 68, 0.8);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.cube-gallery--vertical .cube-gallery-item {
  flex: 0 0 auto;
  width: 100px;
  height: 88px;
  min-height: 88px;
  max-height: none;
  align-self: center;
  border-radius: 14px;
}

.cube-gallery-item:hover {
  border-color: rgba(192, 148, 220, 0.7);
  transform: translateY(-2px);
}

.cube-gallery--vertical .cube-gallery-item:hover {
  transform: translateX(2px);
}

.cube-gallery-item.is-active {
  border-color: #c094dc;
  box-shadow: 0 0 0 2px rgba(192, 148, 220, 0.25);
}

@keyframes gallery-video-press {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.86);
  }
  100% {
    transform: scale(1);
  }
}

.cube-gallery-item.is-pressing {
  animation: gallery-video-press 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.cube-gallery--vertical .cube-gallery-item.is-pressing {
  animation-name: gallery-video-press;
}

.cube-gallery-item img,
.cube-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.cube-gallery-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #63b5e4, #c094dc);
  color: #1b1934;
}

.cube-gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.cube-gallery-face-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.cube-gallery-face-text {
  font-size: 0.68rem;
  font-weight: 600;
  color: #e8e6f0;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cube-face-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
  text-align: center;
}

.cube-face-body.hidden {
  display: none;
}

.cube-side-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.cube-face .cube-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cube-gallery-face-preview {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(46, 48, 68, 0.95), rgba(27, 25, 52, 0.95));
  box-sizing: border-box;
}

.nft-cube-scene.is-face-locked {
  outline: 1px solid rgba(192, 148, 220, 0.25);
  border-radius: 16px;
}

/* Enlarged video viewing when gallery Video item is selected */
.details-cube-col .nft-cube-stage {
  transition:
    width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    max-width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.details-cube-col .nft-cube-scene {
  transition:
    width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.details-cube-col .nft-cube-scene .cube-face {
  transition:
    width 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.details-cube-col .nft-cube-stage.is-video-focus {
  width: min(100%, 640px);
  max-width: 640px;
  height: 560px;
  padding: 48px;
}

.nft-cube-scene.is-video-focus {
  width: 400px;
  height: 400px;
}

.nft-cube-scene.is-video-focus .cube-face {
  width: 400px;
  height: 400px;
}

.nft-cube-scene.is-video-focus .cube-face-front {
  transform: translateZ(200px);
}
.nft-cube-scene.is-video-focus .cube-face-back {
  transform: rotateY(180deg) translateZ(200px);
  padding: 0;
}
.nft-cube-scene.is-video-focus .cube-face-right {
  transform: rotateY(90deg) translateZ(200px);
}
.nft-cube-scene.is-video-focus .cube-face-left {
  transform: rotateY(-90deg) translateZ(200px);
}
.nft-cube-scene.is-video-focus .cube-face-top {
  transform: rotateX(90deg) translateZ(200px);
}
.nft-cube-scene.is-video-focus .cube-face-bottom {
  transform: rotateX(-90deg) translateZ(200px);
}

.nft-cube-scene.is-video-focus .cube-video-chip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Keep play button visible during press→enlarge, then hide */
.nft-cube-scene.is-video-focus:not(.is-play-pressing) .cube-play-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.nft-cube-scene.is-video-focus.is-play-pressing .cube-play-overlay {
  opacity: 1;
  pointer-events: none;
}

.nft-cube-scene.is-video-focus #cube-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

@media (max-width: 768px) {
  .details-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .details-cube-layout {
    flex-direction: row;
    gap: 24px;
  }

  .cube-gallery--vertical {
    flex-basis: 88px;
    width: 88px;
    max-width: 88px;
    max-height: none;
    overflow: visible;
  }

  .cube-gallery--vertical .cube-gallery-item {
    width: 76px;
    height: 68px;
    min-height: 68px;
    max-height: none;
  }

  .details-cube-col .nft-cube-stage.is-video-focus {
    width: min(100%, 420px);
    max-width: 420px;
    height: 420px;
    padding: 28px;
  }

  .nft-cube-scene.is-video-focus {
    width: 300px;
    height: 300px;
  }

  .nft-cube-scene.is-video-focus .cube-face {
    width: 300px;
    height: 300px;
  }

  .nft-cube-scene.is-video-focus .cube-face-front {
    transform: translateZ(150px);
  }
  .nft-cube-scene.is-video-focus .cube-face-back {
    transform: rotateY(180deg) translateZ(150px);
  }
  .nft-cube-scene.is-video-focus .cube-face-right {
    transform: rotateY(90deg) translateZ(150px);
  }
  .nft-cube-scene.is-video-focus .cube-face-left {
    transform: rotateY(-90deg) translateZ(150px);
  }
  .nft-cube-scene.is-video-focus .cube-face-top {
    transform: rotateX(90deg) translateZ(150px);
  }
  .nft-cube-scene.is-video-focus .cube-face-bottom {
    transform: rotateX(-90deg) translateZ(150px);
  }
}

.details-image {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(46, 48, 68, 0.5);
  border: 1px solid var(--border-soft);
}

.details-image img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.price-box {
  padding: 24px;
  background: rgba(46, 48, 68, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.owner-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Profile */
.profile-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.profile-stats strong {
  display: block;
  font-size: 1.15rem;
}

.profile-stats span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.avatar-wrap {
  position: relative;
}

.avatar-edit {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-135);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-addr {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.alert-info {
  padding: 14px 16px;
  background: rgba(99, 181, 228, 0.1);
  border: 1px solid rgba(99, 181, 228, 0.2);
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* TX modal status */
.tx-status {
  text-align: center;
  padding: 16px 8px;
}

.tx-status .status-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.tx-status.pending .status-icon {
  animation: spin 1s linear infinite;
}

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

.text-center {
  text-align: center;
}
.mt-2 {
  margin-top: 16px;
}
.mt-3 {
  margin-top: 24px;
}
.mt-4 {
  margin-top: 32px;
}
.mb-2 {
  margin-bottom: 16px;
}
.mb-3 {
  margin-bottom: 24px;
}
.mb-4 {
  margin-bottom: 32px;
}
.hidden {
  display: none !important;
}

.auth-guest-only {
  display: block;
}
.auth-user-only {
  display: none;
}
body.is-authenticated .auth-guest-only {
  display: none;
}
body.is-authenticated .auth-user-only {
  display: block;
}

body.is-authenticated .auth-user-inline {
  display: inline-flex;
}
.auth-user-inline {
  display: none;
}

.auth-owner-only.hidden,
.auth-visitor-only.hidden {
  display: none !important;
}

/* Age verification + user agreement gate */
#age-gate-modal {
  display: none;
  z-index: 1000;
  background: rgba(8, 8, 16, 0.92);
  backdrop-filter: blur(10px);
}

html:not(.age-verified) #age-gate-modal {
  display: flex;
}

html:not(.age-verified) {
  overflow: hidden;
}

html:not(.age-verified) body {
  overflow: hidden;
}

.age-gate-modal {
  max-width: 520px;
  text-align: left;
  padding: 28px 24px;
}

.age-gate-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #1b1934;
  background: linear-gradient(135deg, #63b5e4, #c094dc);
  box-shadow: 0 10px 28px rgba(99, 181, 228, 0.28);
}

.age-gate-modal .modal-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  text-align: center;
}

.age-gate-copy {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
  margin: 0 0 14px;
  font-size: 0.95rem;
  text-align: center;
}

.age-gate-terms {
  max-height: 220px;
  overflow-y: auto;
  margin: 0 0 16px;
  padding: 14px 14px 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(99, 181, 228, 0.2);
  background: rgba(27, 25, 52, 0.55);
  scrollbar-width: thin;
}

.age-gate-terms-title {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.age-gate-terms-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  line-height: 1.5;
}

.age-gate-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
}

.age-gate-check input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #c094dc;
  cursor: pointer;
}

.age-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-gate-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
