/* ============================================================
   MINALIA — style.css
   Shared stylesheet for all pages: map, profile, realestate, intro
   Page-specific rules stay in each page's own <style> block
   ============================================================ */

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── BASE BODY ── */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0a0a0f 0%, #1a1520 100%);
  color: #fff;
  min-height: 100vh;
}

/* ── PLANET BACKGROUND (profile, profile_other, intro, realestate) ── */
/* Used on pages where body does NOT have overflow:hidden */
body::after {
  content: "";
  position: fixed;
  bottom: -10%;
  left: 0;
  right: 0;
  width: 100%;
  height: 80vh;
  background: url('minalia.png') center top / cover no-repeat;
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
}

/* ── PLANET BACKGROUND (map only — overflow:hidden clips body::after) ── */
/* map.html uses <div id="map-planet-bg"> instead */
#map-planet-bg {
  position: fixed;
  bottom: -10%;
  left: 0;
  right: 0;
  width: 100%;
  height: 80vh;
  background: url('minalia.png') center top / cover no-repeat;
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

/* ── NAVIGATION BAR ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(18,14,24,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,224,138,0.15);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo-img { height: 32px; }

.nav-logo-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #FFE08A, #FFF4D6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  padding: 6px 12px;
  border-radius: 6px;
}

.nav-link:hover {
  color: #FFE08A;
  background: rgba(255,224,138,0.08);
}

.nav-link.active {
  color: #FFE08A;
  background: rgba(255,224,138,0.1);
}

/* ── AUDIO BUTTON ── */
.audio-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid rgba(255,255,255,0.3);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(255,255,255,0.8);
  padding: 0;
}

.audio-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.5);
}

.audio-btn.muted path { opacity: 0.3; }

/* ── USER DROPDOWN ── */
.user-dropdown-container { position: relative; }

.user-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid rgba(255,224,138,0.3);
  background: linear-gradient(135deg, rgba(255,224,138,0.2), rgba(255,224,138,0.1));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #FFE08A;
  font-weight: 700;
  transition: all 0.2s;
  padding: 0;
  overflow: hidden;
}

.user-avatar-btn:hover {
  border-color: rgba(255,224,138,0.6);
  transform: translateY(-2px);
}

/* Inside combined pill — flush fit, no separate border, no hover transform */
#navUserPill .user-avatar-btn {
  border: none;
  border-radius: 0 6px 6px 0;
  background: rgba(255,224,138,0.06);
  width: 36px;
  height: 36px;
}
#navUserPill .user-avatar-btn:hover {
  transform: none;
  background: rgba(255,224,138,0.14);
}

.user-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: rgba(18,14,24,0.98);
  border: 1px solid rgba(255,224,138,0.2);
  border-radius: 12px;
  min-width: 240px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 2000;
}

.user-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 12px;
  width: 14px;
  height: 14px;
  background: rgba(18,14,24,0.98);
  border-left: 1px solid rgba(255,224,138,0.2);
  border-top: 1px solid rgba(255,224,138,0.2);
  transform: rotate(45deg);
}

.dropdown-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dropdown-username {
  font-size: 15px;
  font-weight: 700;
  color: #FFE08A;
  margin-bottom: 6px;
}

.dropdown-wallet {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-family: monospace;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-block;
  user-select: none;
}

.dropdown-wallet:hover {
  background: rgba(255,224,138,0.1);
  color: #FFE08A;
}

.dropdown-wallet.copied {
  background: rgba(0,255,0,0.1);
  color: #0f0;
}

.dropdown-menu-items { padding: 8px 0; }

.dropdown-item {
  display: block;
  padding: 10px 16px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(255,224,138,0.1);
  color: #FFE08A;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 0;
}

.dropdown-item.danger { color: rgba(255,100,100,0.9); }
.dropdown-item.danger:hover { background: rgba(255,100,100,0.1); }

/* ── LAND DROPDOWN BUTTON hover ── */
#landDropdownBtn:hover { color:#FFE08A !important; background:rgba(255,224,138,0.08) !important; }
#landDropdownBtn.active { color:#FFE08A !important; background:rgba(255,224,138,0.1) !important; }

/* ── NAV SUBMENU (legacy — kept for safety) ── */
.nav-submenu-wrap {
  position: relative;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(18,14,24,0.98);
  border: 1px solid rgba(255,224,138,0.2);
  border-radius: 12px;
  min-width: 160px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 2000;
}

.nav-submenu-arrow {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: rgba(18,14,24,0.98);
  border-left: 1px solid rgba(255,224,138,0.2);
  border-top: 1px solid rgba(255,224,138,0.2);
}

.nav-submenu-wrap:hover .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-submenu-item {
  display: block;
  padding: 9px 16px;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}

.nav-submenu-item:hover {
  background: rgba(255,224,138,0.1);
  color: #FFE08A;
}

/* ── AUTH LINKS (logged out state) ── */
.auth-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.auth-link {
  padding: 8px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.auth-link.register {
  background: linear-gradient(135deg, rgba(255,224,138,0.2), rgba(255,224,138,0.1));
  border: 1.5px solid rgba(255,224,138,0.3);
  color: #FFE08A;
}

.auth-link.register:hover {
  background: linear-gradient(135deg, rgba(255,224,138,0.3), rgba(255,224,138,0.15));
  border-color: rgba(255,224,138,0.5);
}

.auth-link.login {
  color: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(255,255,255,0.2);
}

.auth-link.login:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
}

/* ── TICKER TAPE ── */
.ticker-container {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  height: 32px;
  background: rgba(0,0,0,0.6);
  border-bottom: 1px solid rgba(255,224,138,0.1);
  z-index: 99;
  overflow: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  isolation: isolate;
  contain: layout style paint;
}

.ticker-content {
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 12px;
  overflow: hidden;
}

.ticker-clock-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
  min-width: 190px;
  background: rgba(0,0,0,0.35);
  border-left: 3px solid #FF6B35;
  border-right: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  z-index: 2;
  position: relative;
  height: 100%;
  gap: 3px;
  transition: border-left-color 1s ease;
}

.lum-season-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #FF6B35;
  white-space: nowrap;
  transition: color 1s ease;
}

.lum-time-label {
  font-size: 12px;
  font-family: monospace;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

#ticker-clock {
  font-family: monospace;
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.ticker-scroll-wrapper {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.ticker-scroll {
  display: flex;
  gap: 24px;
  white-space: nowrap;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
.ticker-scroll-wrapper:hover .ticker-scroll {
  animation-play-state: paused;
  cursor: pointer;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.75);
}

.ticker-icon { font-size: 14px; flex-shrink: 0; }
.ticker-icon.auction    { color: #ff9f50; }
.ticker-icon.sale       { color: #50ff9f; }
.ticker-icon.offer      { color: #50ff9f; }
.ticker-icon.collab     { color: #50b0ff; }
.ticker-icon.development{ color: #ff50b0; }
.ticker-icon.alert      { color: #ffff50; }
.ticker-icon.info       { color: #b0b0ff; }

@keyframes tickerScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: rgba(255,224,138,0.15);
  color: rgba(255,224,138,0.95);
  border: 1px solid rgba(255,224,138,0.25);
}
.btn-primary:hover {
  background: rgba(255,224,138,0.22);
  border-color: rgba(255,224,138,0.35);
}

.btn-secondary {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
}

.btn-danger {
  background: rgba(255,100,100,0.08);
  border: 1px solid rgba(255,100,100,0.2);
  color: rgba(255,120,120,0.9);
}
.btn-danger:hover {
  background: rgba(255,100,100,0.12);
  border-color: rgba(255,100,100,0.3);
}

.btn-small  { padding: 7px 12px; font-size: 10px; }
.btn-full   { width: 100%; }
.btn-disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

/* ── MODAL ── */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.active { display: flex; }

.modal-content {
  background: rgba(18,14,24,0.98);
  border: 1px solid rgba(255,224,138,0.2);
  border-radius: 12px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,224,138,0.9);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.modal-field { margin-bottom: 18px; }

.modal-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
  font-weight: 600;
}

.modal-input {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: rgba(255,255,255,0.95);
  font-size: 15px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s;
}
.modal-input:focus {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,224,138,0.3);
}
.modal-input::placeholder { color: rgba(255,255,255,0.25); }

.modal-unit-display {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255,224,138,0.95);
  letter-spacing: 0.02em;
  padding: 10px 0;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.modal-buttons .btn {
  flex: 1;
  padding: 14px 20px;
  font-size: 13px;
  border-radius: 8px;
  letter-spacing: 0.04em;
}
.modal-buttons .btn-secondary {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
}
.modal-buttons .btn-secondary:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
}
.modal-buttons .btn-primary {
  background: rgba(255,224,138,0.12);
  border: 1px solid rgba(255,224,138,0.35);
  color: rgba(255,224,138,0.95);
}
.modal-buttons .btn-primary:hover {
  background: rgba(255,224,138,0.2);
  border-color: rgba(255,224,138,0.5);
}

/* ── SECTION CARDS ── */
.section {
  background: rgba(25,20,30,0.92);
  border: 2px solid rgba(255,224,138,0.25);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
  scroll-margin-top: 100px;
}

/* ── STAT BOXES ── */
.stat-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 12px;
}
.stat-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
  font-weight: 600;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  line-height: 1;
}

/* ── STAT FILTER TABS ── */
.stat-filter {
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.stat-filter:hover {
  border-color: rgba(255,224,138,0.3);
  background: rgba(255,255,255,0.05);
}
.stat-filter.active {
  border-color: rgba(255,224,138,0.6);
  background: rgba(255,224,138,0.08);
}
.stat-filter.active .stat-label { color: rgba(255,224,138,0.8); }
.stat-filter.active .stat-value { color: #FFE08A; }
.stat-filter::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 12px; right: 12px;
  height: 2px;
  background: #FFE08A;
  border-radius: 1px;
  opacity: 0;
  transition: opacity 0.2s;
}
.stat-filter.active::after { opacity: 1; }

/* ── ALERT MESSAGES ── */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}
.alert.active { display: block; }
.alert-success {
  background: rgba(96,255,171,0.08);
  border: 1px solid rgba(96,255,171,0.2);
  color: rgba(96,255,171,0.9);
}
.alert-error {
  background: rgba(255,96,96,0.08);
  border: 1px solid rgba(255,96,96,0.2);
  color: rgba(255,96,96,0.9);
}

/* ── PAGE CONTAINER ── */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* ── ACCESS TIER BADGE ── */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tier-badge.tier-0 {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
}
.tier-badge.tier-1 {
  background: rgba(80,176,255,0.1);
  border: 1px solid rgba(80,176,255,0.25);
  color: rgba(80,176,255,0.9);
}
.tier-badge.tier-2 {
  background: rgba(255,224,138,0.1);
  border: 1px solid rgba(255,224,138,0.3);
  color: #FFE08A;
}

/* ── BACK TO TOP ── */
.back-to-top {
  display: block;
  text-align: right;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,224,138,0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.back-to-top:hover { color: rgba(255,224,138,0.8); }

/* ── HIDDEN UTILITY ── */
.hidden { display: none !important; }

/* ── MOBILE NAV ── */
@media (max-width: 768px) {

  /* Tighten nav padding */
  .nav {
    padding: 0 14px;
    height: 54px;
  }

  /* Hide all nav links — too many to fit */
  .nav-center {
    display: none !important;
  }

  /* Logo text smaller */
  .nav-logo-text {
    font-size: 15px;
  }

  /* Tighten right-side gap */
  .nav-right {
    gap: 10px;
  }

  /* Dropdown opens left-anchored so it doesn't clip off right edge */
  .user-dropdown-menu {
    right: auto;
    left: 0;
    min-width: 220px;
    /* Arrow points to avatar which is now on the left */
  }

  .user-dropdown-menu::before {
    right: auto;
    left: 12px;
  }

  /* Bigger tap targets on dropdown items */
  .dropdown-item {
    padding: 13px 16px;
    font-size: 15px;
  }

  /* Ticker clock box narrower on mobile */
  .ticker-clock-box {
    min-width: 130px;
    padding: 0 10px;
  }

  /* Ticker font size down */
  .ticker-content {
    font-size: 11px;
  }

  /* Avatar button same size, easier to tap */
  .user-avatar-btn {
    width: 38px;
    height: 38px;
  }
}