/* ============================================
   RATTYDATA 2.0 - NAVIGATION STYLES
   ============================================ */

/* ── NAV WRAPPER ── */

.nav-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--orange);
  z-index: 5;
  pointer-events: none;
}
.nav-wrapper {
  background: rgba(0, 0, 0, 0.9);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 60px;
}

/* ── NAV SECTIONS + DROPDOWNS ── */

.nav-section {
  position: relative;
}

.nav-category {
  color: var(--orange);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 20px 0;
  letter-spacing: 1px;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(15, 10, 25, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 0;
  min-width: 200px;
  margin-top: 5px;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-section:hover .nav-dropdown {
  display: flex;
  flex-direction: column;
}

.nav-link {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 0;
  letter-spacing: 0.5px;
  transition: color 0.15s, background 0.15s;
  display: block;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: var(--orange);
}

.nav-sub-label {
  display: block;
  font-family: 'DIN Alternate', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  padding: 6px 16px 2px;
}

.nav-sub-label:first-child {
  padding-top: 4px;
}

/* ── NAV RIGHT CLUSTER ── */

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

/* ── CONNECT / DISCONNECT BUTTONS ── */

.connect-btn {
  background: linear-gradient(135deg, var(--orange) 0%, #cc7000 100%);
  color: #fff;
  border: 2px solid var(--orange);
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  white-space: nowrap;
}

.connect-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.5);
}

.connect-btn.is-connected {
  display: none !important;
}

/* ── PLAYER PROFILE PFP + DROPDOWN ── */

.nav-player-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  cursor: pointer;
}

.nav-player-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.nav-pfp-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  overflow: visible;
  background: none;
  border-radius: 3px;
  border: none;
  transition: border-color 0.2s;
  margin-top: -2px;
  margin-bottom: -2px;
  flex-shrink: 0;
}

.nav-pfp-img {
  transition: opacity 0.3s ease;
  position: absolute;
  top: calc(18% - 13px);
  left: 18%;
  width: 64%;
  height: 64%;
  object-fit: cover;
  display: block;
  border-radius: 12%;
}

.nav-pfp-border {
  transition: opacity 0.3s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 4px 12px rgba(40, 20, 0, 0.8));
}

.nav-pfp-border img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Player Dropdown */
.nav-player-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: rgba(15, 10, 25, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 0;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.nav-player-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-player-profile:hover .nav-player-dropdown {
  display: block;
}

/* Wallet row */
.nav-player-wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 8px;
}

.nav-player-wallet {
  font-size: 12px;
  color: #f0d870;
  font-family: monospace;
}

.nav-player-copy {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
}

.nav-player-copy:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.nav-player-copy.is-copied {
  color: #4ade80;
}

/* Divider */
.nav-player-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 6px 0;
}

/* Section label */
.nav-player-section-label {
  padding: 4px 16px;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.25);
  letter-spacing: 1px;
}

/* Token rows */
.nav-player-token {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.nav-player-token-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

.nav-player-token-val {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  font-family: monospace;
  flex: 1;
  text-align: right;
  margin-right: 10px;
}

/* Send buttons */
.nav-token-send {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  font-weight: 700;
  font-family: 'DIN Alternate', sans-serif;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: color 0.15s, border-color 0.15s;
}

.nav-token-send:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

/* Links */
.nav-player-link {
  display: block;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.15s, background 0.15s;
}

.nav-player-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.nav-player-disconnect:hover {
  color: #f87171;
}

/* ── SEND TOKEN MODAL ── */

.send-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.send-modal-content {
  position: relative;
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--orange);
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 8px 32px rgba(255, 140, 0, 0.3);
}

.send-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.send-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: var(--orange);
}

.send-modal-close {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.send-modal-close:hover {
  color: var(--orange);
}

.send-modal-body {
  padding: 24px;
}

.send-form-group {
  margin-bottom: 20px;
}

.send-form-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.send-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-light);
  font-size: 16px;
  font-family: 'DIN Alternate', sans-serif;
  transition: all 0.2s;
}

.send-input:focus {
  outline: none;
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.08);
}

.send-balance {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.send-balance span {
  color: var(--orange);
  font-weight: 700;
}

.send-status {
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 16px;
  display: none;
}

.send-status.success {
  display: block;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: rgba(34, 197, 94, 1);
}

.send-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: rgba(239, 68, 68, 1);
}

.send-status.loading {
  display: block;
  background: rgba(255, 140, 0, 0.1);
  border: 1px solid rgba(255, 140, 0, 0.3);
  color: var(--orange);
}

.send-modal-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.send-btn-cancel,
.send-btn-confirm {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DIN Alternate', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.send-btn-cancel {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-light);
}

.send-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

.send-btn-confirm {
  background: linear-gradient(135deg, var(--orange) 0%, #cc7000 100%);
  border: 2px solid var(--orange);
  color: #fff;
}

.send-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.5);
}

.send-btn-confirm:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


/* ── DESKTOP: PFP in banner ── */
@media (min-width: 769px) {
  .nav-wrapper {
    overflow: visible;
  }

  .nav-content {
    min-height: 40px;
  }

  .nav-category {
    padding: 12px 0;
  }

  .nav-player-profile {
    position: relative;
    align-items: center;
  }

  .nav-pfp-wrap {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 130px;
    border-radius: 5px;
    border: none;
    box-shadow: none;
    overflow: visible;
    z-index: 100;
    margin-bottom: 10px;
  }

  .nav-player-name {
    font-size: 16px;
  }

  .nav-player-dropdown {
    right: 0;
    top: calc(100% + 4px);
  }
}

/* ============================================
   NAV RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .nav-content {
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: space-between;
  }

  .nav-right {
    width: auto;
    justify-content: flex-end;
    padding-top: 0;
    padding-bottom: 0;
  }

  /* ── Disable hover, use tap ── */
  .nav-section:hover .nav-dropdown {
    display: none;
  }

  .nav-section.open .nav-dropdown {
    display: flex;
    flex-direction: column;
  }

  .nav-player-profile:hover .nav-player-dropdown {
    display: none;
  }

  .nav-player-dropdown.mobile-open {
    display: block;
  }

  /* ── Bottom sheets (nav dropdowns + PFP dropdown) ── */
  .nav-dropdown,
  .nav-player-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    min-width: 100%;
    border-radius: 16px 16px 0 0;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0 28px;
    z-index: 9999;
  }

  .nav-dropdown::before,
  .nav-player-dropdown::before {
    display: none;
  }

  .nav-dropdown::after,
  .nav-player-dropdown::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
  }

  /* Nav dropdown specifics */
  .nav-dropdown {
    margin-top: 0;
  }

  /* Player dropdown specifics */
  .nav-player-dropdown {
    max-height: 70vh;
    overflow-y: auto;
  }

  .nav-link {
    padding: 12px 20px;
    font-size: 14px;
  }

  .nav-sub-label {
    padding: 8px 20px 4px;
  }

  /* Bigger tap targets */
  .nav-player-link {
    padding: 12px 20px;
    font-size: 13px;
  }

  .nav-player-token {
    padding: 10px 20px;
  }

  .nav-player-wallet-row {
    padding: 8px 20px 12px;
  }

  .nav-player-section-label {
    padding: 6px 20px;
  }

  /* Smaller connect button */
  .connect-btn {
    padding: 6px 10px;
    font-size: 10px;
  }

  /* Smaller PFP */
  .nav-pfp-wrap {
    width: 65px;
    height: 65px;
    margin-top: -7px;
    margin-bottom: -7px;
    overflow: visible;
    position: relative;
    top: 14px;

  }

  .nav-player-name {
    font-size: 14px;
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 600px) {
  .connect-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.nav-hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
  transition: all 0.25s ease;
}



/* ── MOBILE MENU OVERLAY ── */
.nav-mobile-sheet {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 6, 18, 0.98);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px 16px 0 0;
  padding: 20px 0 32px;
  z-index: 9998;
  max-height: 75vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.6);
}

.nav-mobile-sheet::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.nav-mobile-sheet.open {
  display: block;
}

.nav-mobile-sheet .nav-mobile-label {
  font-family: 'DIN Alternate', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  padding: 12px 20px 4px;
}

.nav-mobile-sheet .nav-mobile-link {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.15s, background 0.15s;
}

.nav-mobile-sheet .nav-mobile-link:hover,
.nav-mobile-sheet .nav-mobile-link:active {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.nav-mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9997;
}

.nav-mobile-backdrop.open {
  display: block;
}

@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-section {
    display: none;
  }

  .nav-content {
    justify-content: space-between;
  }
}
/* Fallback PFP border — no in-game border */
.nav-pfp-fallback::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -64%);
  width: calc(64% + 6px);
  height: calc(64% + 6px);
  border: 5px solid rgba(190, 195, 205, 0.85);
  border-radius: 14%;
  background: linear-gradient(145deg, rgb(180, 185, 195) 0%, rgb(120, 125, 135) 25%, rgb(200, 205, 215) 50%, rgb(100, 105, 115) 75%, rgb(170, 175, 185) 100%);
  border: 3px solid rgb(190, 195, 205);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    0 4px 10px rgba(180, 185, 195, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  z-index: 1;
  pointer-events: none;
}
.nav-pfp-fallback::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -25%);
  width: 90%;
  height: 70%;
  background: radial-gradient(ellipse at center bottom, rgba(180, 185, 195, 0.4) 0%, rgba(150, 155, 165, 0.15) 50%, transparent 75%);
  z-index: 0;
  pointer-events: none;
  filter: blur(10px);
}
.nav-pfp-fallback .nav-pfp-img {
  z-index: 2;
}

@media (max-width: 768px) {
  .nav-pfp-fallback {
    z-index: 10 !important;
  }
  .nav-pfp-fallback::before {
    transform: translate(-50%, -84%);
    width: calc(58% + 4px);
    height: calc(58% + 4px);
    background: rgb(45, 20, 15) !important;
  }
  .nav-pfp-fallback::after {
    display: none;
  }
}
@media (max-width: 768px) {
  .nav-pfp-border {
    transform: scale(1.05);
    transform-origin: center center;
    top: -9px !important;
  }
  .nav-pfp-img {
    top: calc(18% - 16px) !important;
  }
}
