/* Axie Infinity Style Design System */
:root {
  --bg-dark: #030712;
  --bg-card: #0f172a;
  --border-card: #1e293b;
  --border-glass: #334155;
  --text-primary: #f8fafc;
  --text-muted: #64748b;
  --accent-blue: #0ea5e9;
  --accent-neon: #00f0ff;
  --accent-blue-hover: #38bdf8;
  --accent-purple: #8b5cf6;
  --accent-glow: rgba(0, 240, 255, 0.4);
  --gradient-glow: linear-gradient(135deg, #0ea5e9 0%, #00f0ff 100%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body with Clean Dark Background */
body {
  background: var(--bg-dark);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

/* Cyberpunk Grid Overlay - Removed for Axie Clean Style */

/* Video Background (Optional - Overrides Gradient if video exists) */
#bg-video {
  position: fixed;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -2;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.6;
  /* Dim it slightly */
}

/* Overlay for readability - Axie style */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  z-index: -1;
}

/* --- 3D Voxel Engine Overlay --- */
#web3d-canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: auto;
}

/* Axie Main Panel Container */
.glass-panel {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  width: 100%;
  max-width: 480px;
  position: relative;
  overflow: hidden;
}

/* Removed extreme shine effect for cleaner aesthetics */

/* Typography */
h1,
h2,
h3 {
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* --- Navigation Header --- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: #0b0d11;
  border-bottom: 1px solid #1a1d23;
  z-index: 1000;
}

.top-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-nav .btn-primary,
.top-nav .btn-global {
  margin-bottom: 0;
}

/* --- Global Navbar (Unified Web3 Navigation) --- */
.global-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: rgba(11, 13, 17, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(46, 124, 246, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  z-index: 9999;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.global-nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.global-nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-nav-logo span {
  color: var(--accent-blue);
  text-shadow: 0 0 10px var(--accent-glow);
}

.global-nav-center {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(26, 29, 35, 0.6);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link-btn {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link-btn.active-nav {
  color: #fff;
  background: var(--accent-blue);
  box-shadow: 0 0 15px var(--accent-glow);
}

.global-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-balance-pill {
  background: rgba(255, 157, 0, 0.1);
  border: 1px solid rgba(255, 157, 0, 0.3);
  color: #ff9d00;
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: inset 0 0 10px rgba(255, 157, 0, 0.1);
  min-width: 110px;
  justify-content: center;
}

/* Fix Odometer first digit clipping */
.nav-balance-pill .odometer {
  padding-left: 4px;
  padding-right: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

@media (max-width: 900px) {
  .global-nav {
    padding: 0 15px;
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    justify-content: center;
    gap: 15px;
  }

  .global-nav-center {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .nav-link-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  body {
    padding-top: 120px !important;
    /* Extra padding for mobile wrapped nav */
  }
}

/* End Global Navbar */

/* --- Layout Grid (Sidebar + Main) --- */
.marketplace-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  padding-top: 20px;
  width: 100%;
}

/* Sidebar Filters */
.sidebar-filters {
  width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 20px;
  position: sticky;
  top: 90px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .marketplace-layout {
    flex-direction: column;
  }

  .sidebar-filters {
    width: 100%;
    position: static;
    margin-bottom: 20px;
  }
}

.filter-group {
  margin-bottom: 20px;
}

.filter-title {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 8px;
}

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s;
  margin-bottom: 5px;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.filter-btn.active {
  background: rgba(46, 124, 246, 0.15);
  color: var(--accent-blue);
  border-color: rgba(46, 124, 246, 0.3);
}

.filter-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.filter-btn.active .filter-count {
  background: var(--accent-blue);
  color: #fff;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.glass-panel-large {
  max-width: 1200px;
}

h1.neon-text {
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
}

p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  transition: all 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--accent-neon);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 2px rgba(0, 255, 157, 0.1);
}

/* Buttons Array */
.btn-primary,
.btn-secondary,
.btn-global {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
  margin-bottom: 0;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-secondary,
.btn-global {
  background: var(--border-card);
  color: var(--text-primary);
  border: 1px solid transparent;
}

.btn-secondary:hover,
.btn-global:hover {
  background: #3a3f4a;
}

/* Utilities */
.text-center {
  text-align: center;
}

.hidden {
  display: none;
}

.mt-4 {
  margin-top: 1rem;
}

.flex-row {
  display: flex;
  gap: 0.5rem;
}

/* Social Login Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-glass);
}

.divider span {
  margin: 0 1rem;
}

/* Social Buttons Row */
.social-buttons {
  display: flex;
  gap: 1rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.social-btn img {
  width: 20px;
  height: 20px;
}

/* --- Axie Style NFT Marketplace --- */
.nft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 0;
  /* Padding moved to layout */
}

.nft-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 0;
  text-align: left;
  position: relative;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nft-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 15px 35px rgba(0, 0, 0, 0.6),
    0 0 20px var(--accent-glow);
  border-color: var(--accent-blue);
  z-index: 10;
}

.nft-card::before {
  display: none;
}

.nft-image-wrapper {
  width: 100%;
  aspect-ratio: 1/1;
  background: transparent;
  border: none;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 0px;
  padding-top: 20px;
  transform-style: preserve-3d;
  /* For vanilla-tilt */
}

/* Hover Overlay Stats */
.nft-stats-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 13, 17, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 5;
  pointer-events: none;
  /* Let clicks pass through */
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

.nft-card:hover .nft-stats-overlay {
  opacity: 1;
  transform: translateY(0);
}

.nft-stats-overlay i {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--accent-blue);
}

.nft-image-wrapper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(
    circle,
    rgba(46, 124, 246, 0.15) 0%,
    transparent 70%
  );
  z-index: 0;
  transition: opacity 0.3s;
}

.nft-card:hover .nft-image-wrapper::before {
  background: radial-gradient(
    circle,
    rgba(46, 124, 246, 0.25) 0%,
    transparent 70%
  );
}

.nft-image-wrapper img {
  width: 65%;
  height: 65%;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s ease-in-out;
  z-index: 1;
  transform: translateZ(30px);
  /* Extrude out for 3D effect */
}

.nft-card:hover .nft-image-wrapper img {
  transform: translateY(-4px);
}

.nft-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nft-title {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.nft-seller {
  margin: 0 0 16px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nft-seller-name {
  color: var(--text-primary);
  font-weight: 500;
}

.nft-price-wrapper {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}

.nft-price-value {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
}

.nft-price-currency {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nft-action-btn {
  margin-top: auto;
  width: 100%;
  padding: 0 16px 16px 16px;
}

.nft-action-btn button {
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
}

/* --- Rarity Glow (Legendary) --- */
.nft-rarity-legendary {
  position: relative;
}

.nft-rarity-legendary::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: conic-gradient(from 0deg, transparent 0 340deg, #f59e0b 360deg);
  border-radius: 18px;
  z-index: -1;
  animation: rotate-border 4s linear infinite;
  opacity: 0.8;
}

.nft-rarity-legendary::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-card);
  border-radius: 15px;
  z-index: -1;
}

@keyframes rotate-border {
  to {
    transform: rotate(360deg);
  }
}

/* --- Skeleton Loaders Lumínicos --- */
.skeleton-bg {
  background: linear-gradient(90deg, #1a1d23 25%, #2a374a 50%, #1a1d23 75%);
  background-size: 200% 100%;
  animation: shimmer-neon 1.5s infinite linear;
  border-radius: 12px 12px 0 0;
}

.skeleton-bg img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.skeleton-bg img.loaded {
  opacity: 1;
}

@keyframes shimmer-neon {
  0% {
    background-position: -200% 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  }

  50% {
    box-shadow: inset 0 0 25px rgba(46, 124, 246, 0.2);
  }

  100% {
    background-position: 200% 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  }
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 13, 17, 0.9);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;

  /* UI OVERHAUL: 3-Column Layout */
  .char-panel-container {
    display: grid;
    grid-template-columns: 250px 400px 300px;
    /* Left (Stats), Center (Doll), Right (Inv) */
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: start;
  }

  /* 1. Stats Panel (Left) */
  .stat-panel {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 15px;
  }

  .stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: #cbd5e1;
  }

  .stat-bar {
    height: 6px;
    background: #334155;
    border-radius: 3px;
    margin-top: 2px;
    overflow: hidden;
  }

  .stat-fill {
    height: 100%;
    background: var(--gradient-glow);
    width: 50%;
    /* Default, set via inline style */
  }

  /* 2. Paper Doll (Center) */
  .paper-doll {
    position: relative;
    height: 600px;
    background: radial-gradient(
      circle at center,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 70%
    );
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .char-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 90%;
    opacity: 0.3;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Image will be set inline or via specific class */
    z-index: 0;
  }

  /* Absolute Positioning for Equipment */
  .equip-slot {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #475569;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    transition: all 0.2s;
    cursor: title;
  }

  .equip-slot:hover {
    border-color: var(--accent-neon);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
    z-index: 10;
  }

  .equip-slot img {
    width: 32px;
    height: 32px;
  }

  .equip-slot .qty {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.7em;
    color: #fff;
  }

  /* Slot Positions (Relative to 400x600 container) */
  /* Head area */
  .pos-head {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  .pos-lear {
    top: 50px;
    left: 110px;
  }

  .pos-rear {
    top: 50px;
    right: 110px;
  }

  .pos-neck {
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
  }

  /* Body area */
  .pos-shld {
    top: 160px;
    left: 60px;
    width: 60px;
    height: 60px;
  }

  /* Shield Left? */
  .pos-body {
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 100px;
  }

  .pos-weap {
    top: 160px;
    right: 60px;
    width: 60px;
    height: 60px;
  }

  /* Weapon Right? */

  /* Arms */
  .pos-larm {
    top: 200px;
    left: 30px;
  }

  .pos-rarm {
    top: 200px;
    right: 30px;
  }

  /* Hands/Rings */
  .pos-glove {
    top: 320px;
    left: 20px;
  }

  .pos-ring1 {
    top: 340px;
    left: 80px;
  }

  .pos-ring2 {
    top: 340px;
    right: 80px;
  }

  /* Legs */
  .pos-belt {
    top: 300px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
  }

  .pos-pant {
    top: 340px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
  }

  .pos-shoe {
    top: 450px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 50px;
  }

  /* Misc */
  .pos-inven {
    bottom: 20px;
    right: 20px;
    opacity: 0.5;
  }

  /* 3. Inventory Panel (Right) */
  .inv-panel {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 10px;
    max-height: 600px;
    overflow-y: auto;
  }

  .inv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .inv-slot {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7em;
    color: #64748b;
    cursor: pointer;
    position: relative;
  }

  .inv-slot.filled {
    border-color: #94a3b8;
    background: rgba(0, 0, 0, 0.3);
  }

  .inv-slot:hover {
    border-color: var(--accent-neon);
  }

  /* Tooltips */
  .tooltip-container {
    position: relative;
  }

  .tooltip-container:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    border: 1px solid var(--accent-neon);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }
}

/* --- TANTRA NATIVE INVENTORY (PHASE 4) --- */

.inventory-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

.inv-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 20px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.inv-tab-btn:hover {
  color: var(--text-primary);
}

.inv-tab-btn.active {
  color: #c77dff;
  border-bottom: 2px solid #c77dff;
  text-shadow: 0 0 10px rgba(199, 125, 255, 0.5);
}

.view-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view-section.active {
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tantra Native Layout Container */
.tantra-native-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

/* Equipment Map (Paperdoll) */
.equip-paperdoll {
  position: relative;
  width: 320px;
  height: 480px;
  background: radial-gradient(
    circle at center,
    rgba(30, 41, 59, 0.6) 0%,
    transparent 70%
  );
  border-radius: 10px;
  /* The glowing tribal background logo can go here */
}

.equip-paperdoll::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: url("items/etc/00_000.png") no-repeat center center;
  /* Placeholder for chakra/tribal logo */
  background-size: contain;
  opacity: 0.1;
  z-index: 0;
}

/* Strict Tantra Slot Styling */
.t-slot {
  position: absolute;
  border: 1px solid #7b2cbf;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 0 8px rgba(123, 44, 191, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}

.t-slot:hover {
  border-color: #c77dff;
  box-shadow:
    inset 0 0 12px rgba(199, 125, 255, 0.8),
    0 0 10px rgba(199, 125, 255, 0.5);
}

/* Pixel-perfect rendering for Tantra BMPs */
.t-slot img,
.inv-cell img {
  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  max-width: 100%;
  max-height: 100%;
  object-fit: none;
  /* Do not scale, render 1:1 natively */
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.8));
}

/* Slot Definitions based on grid units (Base UI cell is roughly 32x32) */
.t-1x1 {
  width: 34px;
  height: 34px;
}

.t-2x2 {
  width: 68px;
  height: 68px;
}

.t-2x3 {
  width: 68px;
  height: 102px;
}

/* Positions matching Tantra screenshot */
/* Top Row */
.s-ear-L {
  top: 20px;
  left: 40px;
}

.s-helm {
  top: 20px;
  left: 90px;
}

.s-neck {
  top: 20px;
  left: 174px;
}

.s-ear-R {
  top: 20px;
  left: 224px;
}

/* Mid Row */
.s-weap {
  top: 104px;
  left: 10px;
}

/* Weapon 2x2 or 2x3 */
.s-body {
  top: 104px;
  left: 90px;
}

.s-shld {
  top: 104px;
  left: 174px;
}

/* Belt Row */
.s-brac-L {
  top: 188px;
  left: 10px;
}

.s-brac-R {
  top: 188px;
  left: 60px;
}

.s-belt {
  top: 188px;
  left: 110px;
  width: 68px;
  height: 34px;
}

/* 2x1 usually */
.s-ring-L {
  top: 188px;
  left: 194px;
}

.s-ring-R {
  top: 188px;
  left: 244px;
}

/* Bottom Row */
.s-glove {
  top: 240px;
  left: 40px;
}

.s-pant {
  top: 240px;
  left: 124px;
}

.s-shoe {
  top: 324px;
  left: 124px;
}

.s-mount {
  top: 324px;
  left: 210px;
}

/* Secondary Inventory Bag */
.inventory-bag {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #1e3a8a;
  border-radius: 4px;
  padding: 10px;
  width: 320px;
}

.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1e3a8a;
  padding-bottom: 5px;
  margin-bottom: 10px;
  color: #60a5fa;
  font-size: 0.85rem;
  font-weight: 600;
}

.inv-gold-display {
  display: flex;
  justify-content: space-between;
  padding: 5px 15px;
  color: #eab308;
  font-weight: bold;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.5);
  margin-bottom: 15px;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  /* Tantra usually has 6 cells across */
  gap: 1px;
  background: #1e3a8a;
  /* Border color via gap */
  border: 1px solid #1e3a8a;
}

.inv-cell {
  background: rgba(0, 5, 20, 0.9);
  aspect-ratio: 1/1;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.inv-cell:hover {
  background: rgba(30, 58, 138, 0.5);
}

.inv-cell.has-item::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 10px rgba(123, 44, 191, 0.3);
  z-index: 1;
}

/* End of Tantra Phase 4 Layout */

/* --- PHASE 5: Drag and Drop Interactions --- */

.draggable-item {
  cursor: grab;
  /* Ensure images themselves don't misinterpret drop events */
  user-select: none;
  -webkit-user-drag: element;
}

.draggable-item:active {
  cursor: grabbing;
}

.dragging {
  opacity: 0.5;
  transform: scale(0.9);
  z-index: 100;
  /* This is CRITICAL: it prevents the dragged image from blocking the dropzone below it */
  pointer-events: none !important;
}

.drop-target-active {
  background-color: rgba(199, 125, 255, 0.4) !important;
  border-color: #f0abfc !important;
  box-shadow: inset 0 0 15px rgba(240, 171, 252, 0.6) !important;
}

.s-glove {
  top: 240px;
  left: 40px;
}

/* EXPEDITIONS RESPONSIVENESS (MOBILE) */
@media (max-width: 900px) {
  .expeditions-container {
    grid-template-columns: 1fr !important;
  }

  .hero-panel {
    order: -1;
    /* Keep hero on top on mobile */
  }

  .quest-list {
    grid-template-columns: 1fr;
    /* 1 card per row on small screens */
  }

  .region-tabs {
    padding-bottom: 5px;
  }

  .btn-region {
    padding: 8px 12px;
    font-size: 0.85em;
  }
}

/* --- PHASE 10.5 GAMIFICATION (FOMO) --- */
.fomo-alert {
  background: rgba(15, 23, 42, 0.9);
  border-left: 4px solid var(--accent-neon);
  color: #fff;
  padding: 12px 20px;
  border-radius: 4px;
  font-size: 0.85rem;
  box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
  animation: slideInUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transition: opacity 1s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- PHASE 12.2: Escáner Biométrico (Thematic Login) --- */
.biometric-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 5, 10, 0.95);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.biometric-overlay.active {
  opacity: 1;
  pointer-events: all;
  backdrop-filter: blur(10px);
}

.retina-circle {
  width: 150px;
  height: 150px;
  border: 4px dashed var(--accent-neon);
  border-radius: 50%;
  position: relative;
  animation: spin-retina 4s linear infinite;
  box-shadow: 0 0 30px var(--accent-neon);
}

.scan-line {
  position: absolute;
  top: 0;
  left: -20%;
  width: 140%;
  height: 4px;
  background: #fff;
  box-shadow: 0 0 15px var(--accent-neon), 0 0 30px #fff;
  animation: scan-up-down 2s ease-in-out infinite;
}

.scan-text {
  margin-top: 40px;
  color: var(--accent-neon);
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  letter-spacing: 5px;
  text-shadow: 0 0 10px var(--accent-neon);
  animation: pulse-text 1s infinite alternate;
  text-align: center;
}

@keyframes spin-retina {
  100% { transform: rotate(360deg); }
}

@keyframes scan-up-down {
  0% { top: 0; }
  50% { top: 100%; }
  100% { top: 0; }
}

@keyframes pulse-text {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* --- PHASE 12.4: Holographic Ledger --- */
.holo-ledger {
  background: rgba(0, 5, 10, 0.7);
  border: 1px solid rgba(0, 209, 255, 0.3);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 209, 255, 0.1), 0 0 10px rgba(0, 0, 0, 0.5);
  font-family: 'Courier New', Courier, monospace;
}

.holo-ledger::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(0, 209, 255, 0.05) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 1;
}

.holo-row {
  display: grid;
  grid-template-columns: 2fr 3fr 2fr 1.5fr 1.5fr;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(0, 209, 255, 0.1);
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
  color: #ccc;
  font-size: 0.85em;
}

.holo-row:hover {
  background: rgba(0, 209, 255, 0.1);
  border-left: 3px solid #00d1ff;
  padding-left: 12px;
  box-shadow: inset 50px 0 50px -50px rgba(0, 209, 255, 0.5);
}

.holo-header {
  font-weight: bold;
  color: #00d1ff;
  text-shadow: 0 0 5px rgba(0, 209, 255, 0.5);
  border-bottom: 2px solid rgba(0, 209, 255, 0.4);
  background: rgba(0, 0, 0, 0.5);
}

.txt-income {
  color: #00ff88;
  text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
  font-weight: bold;
}

.txt-expense {
  color: #ff4444;
  text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
  font-weight: bold;
}
