@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

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

/* ===== TOKENS ===== */
:root {
  --bg: #060608;
  --bg-card: rgba(18, 18, 21, 0.60);
  --gold: #FFB200;
  --gold-glow: rgba(255, 178, 0, 0.4);
  --text-primary: #f4f4f5;
  --text-secondary: #e2e2e2;
  --text-muted: #a0a0a0;
  --text-dim: #71717a;
  --border: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.10);
  --font: 'Outfit', sans-serif;
}

/* ===== BASE ===== */
html,
body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  overflow-x: hidden;
}

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

/* ===== PAGE WRAPPER ===== */
.page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}

/* ===== BACKGROUND ===== */
.bg-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
  mix-blend-mode: screen;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 8, 0.80);
}

/* ===== FLOATING WEAPONS (decorative) ===== */
.float-item {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  filter: blur(3px);
  opacity: 0.55;
}

.float-item img {
  display: block;
}

.float-knife-tr {
  top: 18%;
  right: 18%;
  transform: rotate(30deg);
}

.float-gun-l {
  top: 50%;
  left: 12%;
  transform: rotate(-15deg) translateY(-50%);
}

.float-knife-br {
  bottom: 15%;
  right: 22%;
  transform: rotate(-120deg);
  filter: blur(4px);
  opacity: 0.50;
}

/* ===== STAR ICON (bottom-right) ===== */
.corner-star {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 10;
  color: rgba(85, 85, 85, 0.6);
  pointer-events: none;
}

/* ===== CONTENT WRAPPER ===== */
.content {
  position: relative;
  z-index: 10;
  width: calc(100% - 2rem);
  max-width: 660px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== USER PROFILE (SIDEBAR VERSION) ===== */
.user-profile {
  position: relative;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  padding: 32px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  /* margin-bottom: 2rem; */
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: none;
}

.user-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  padding: 3px;
  background: var(--bg);
  box-shadow: 0 0 20px var(--gold-glow);
  position: relative;
  z-index: 1;
}

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

.user-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

.user-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.user-hex {
  font-size: 0.7rem;
  color: var(--gold);
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0.05em;
}

.logout-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logout-btn:hover {
  background: #ff4d4d;
  color: white;
  border-color: #ff4d4d;
  transform: rotate(90deg) scale(1.1);
}


/* ===== PAGE TITLE ===== */
.page-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.page-title h1 {
  font-size: 1.4rem;
  /* Slightly smaller for inner content */
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.page-title h1 .white {
  color: var(--text-secondary);
}

.page-title h1 .gold {
  color: var(--gold);
}

.page-title p {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}



/* ===== GLASS CARD ===== */
.card {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 15px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

/* ===== LOGIN BUTTONS ROW ===== */
.login-row {
  display: flex;
  gap: 1.5rem;
  padding: 15px;
}

.login-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 180px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.login-btn:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.login-btn img {
  width: 100px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 1rem;
  display: block;
}

.login-btn h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  letter-spacing: 0.04em;
}

.login-btn p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ===== FOOTER TEXT ===== */
.footer-text {
  color: var(--text-dim);
  font-size: 0.7rem;
  text-align: center;
  margin-top: 1rem;
  letter-spacing: 0.04em;
}

/* AUTH ERROR */
.auth-error {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 77, 77, 0.08);
  border: 1px solid rgba(255, 77, 77, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 1.25rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #ffcccc;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(255, 77, 77, 0.05);
  animation: slideDown 0.4s ease-out;
}

.error-icon {
  color: #ff4d4d;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-text {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  line-height: 1.4;
}

.error-text strong {
  color: #ff4d4d;
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SELECT SERVER PAGE ===== */
.content-wide {
  position: relative;
  z-index: 10;
  width: calc(100% - 1rem);
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.server-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 15px;
  width: 100%;
}

.server-card {
  position: relative;
  height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.server-card:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent);
  border-color: rgba(255, 178, 0, 0.4);
  /* Gold border for 1.0 */
  transform: translateY(-3px);
}

.server-card.server-20:hover {
  background: linear-gradient(to bottom, rgba(140, 88, 208, 0.1), transparent);
  border-color: rgba(140, 88, 208, 0.4);
}

.server-card:hover .server-card-bg-num {
  opacity: 0.12;
  transform: rotate(-10deg) scale(1.1);
  filter: sepia(1.5) saturate(3) brightness(1.2);
  /* Gold watermark for 1.0 */
}

.server-card.server-20:hover .server-card-bg-num {
  filter: sepia(1) hue-rotate(240deg) saturate(5) brightness(1.2);
  opacity: 0.12;
}


.server-card:hover .select-btn {
  opacity: 1;
  transform: translateY(0);
}

.server-card-bg-num {
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  width: 240px;
  height: 240px;
  object-fit: contain;
  opacity: 0.03;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.4s ease;
  filter: grayscale(1) brightness(2);
}



.server-num-badge {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  background: transparent;
  border: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

.server-num-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.server-card:hover .server-num-badge {
  transform: scale(1.15) translateY(-5px);
  filter: drop-shadow(0 0 15px rgba(255, 178, 0, 0.4));
}

.server-card.server-20:hover .server-num-badge {
  filter: drop-shadow(0 0 15px rgba(140, 88, 208, 0.5));
}



.server-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.server-card.server-20 h3 {
  color: #a87fe0;
}


.server-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  /* Space for button */
}

.select-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--gold), #ffc133);
  color: #060608;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.8rem 0;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.2);
}

.server-card:hover .select-btn {
  transform: translateY(0);
}

.server-card.server-20 .select-btn {
  background: linear-gradient(to top, #8c58d0, #a87fe0);
  color: white;
}



/* ===== BACK BUTTON ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.back-btn svg {
  transition: transform 0.25s;
}

.back-btn:hover {
  color: var(--gold);
  border-color: rgba(255, 178, 0, 0.30);
  background: rgba(255, 255, 255, 0.05);
}

.back-btn:hover svg {
  transform: translateX(-4px);
}

/* ===== TRADE PAGE (NEW) ===== */
/* ===== PAGE TITLE (CENTERED) ===== */
.outer-title {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 2.5rem;
}

.outer-title h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.outer-title p {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

/* ===== TRADE CONTAINER ===== */
.trade-container {
  display: flex;
  gap: 2.5rem;
  width: 100%;
  max-width: 1280px;
  min-height: 600px;
  align-items: flex-start;
}

.trade-left-col {
  width: 240px;
  /* Slightly narrower sidebar */
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 2rem;
}

.trade-right-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===== SIDEBAR USER PROFILE ===== */
.sidebar-profile {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
  position: relative;
  transition: all 0.3s ease;
}

.sidebar-profile:hover {
  border-color: var(--border-hover);
  background: rgba(25, 25, 30, 0.8);
}

.sidebar-profile .user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  padding: 2.5px;
  background: #111;
  box-shadow: 0 0 15px var(--gold-glow);
}

.sidebar-profile .user-details {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-profile .user-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.sidebar-profile .user-hex {
  font-size: 0.65rem;
  color: var(--gold);
  opacity: 0.8;
  font-weight: 600;
  text-transform: uppercase;
}

.sidebar-profile .logout-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  transition: all 0.3s ease;
}

.sidebar-profile .logout-btn:hover {
  background: #ff4d4d;
  color: white;
  transform: rotate(90deg);
}

/* ===== TRADE CONTAINER ===== */
.trade-container {
  display: flex;
  gap: 3rem;
  width: 100%;
  max-width: 1280px;
  min-height: 600px;
  align-items: flex-start;
}

.trade-left-col {
  width: 260px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 2rem;
}

.trade-right-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.trade-sidebar {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* .sidebar-logo removed - moved to watermark */

.trade-content {
  flex: 1;
  background: rgba(14, 14, 17, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 28px;
  padding: 2.5rem;
  min-height: 685px;
  max-height: 685px;
  position: relative;
  overflow-y: auto;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  z-index: 1;
}

/* Custom Scrollbar for Trade Content */
.trade-content::-webkit-scrollbar {
  width: 6px;
}

.trade-content::-webkit-scrollbar-track {
  background: transparent;
  margin: 1.5rem 0;
}

.trade-content::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.2);
  border-radius: 10px;
}

.trade-content::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.4);
}

.content-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: -1;
  opacity: 0.04;
  filter: grayscale(1) brightness(2);
  transition: all 0.5s ease;
}

.server-10 .content-watermark {
  filter: grayscale(0) sepia(1) hue-rotate(-15deg) saturate(3) brightness(1.2) blur(2px);
  opacity: 0.06;
}

.server-20 .content-watermark {
  filter: grayscale(0) sepia(1) hue-rotate(220deg) saturate(3) brightness(1.2) blur(2px);
  opacity: 0.08;
}

.content-watermark img {
  max-width: 500px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.outer-title {
  display: block;
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 2.5rem;
}

.outer-title h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

.outer-title p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.25rem 1rem;
  /* Reduced padding */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  color: var(--text-dim);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.category-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(212, 175, 55, 0.2);
  transform: translateX(5px);
}

.category-tab.active {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border-color: var(--accent-gold);
  color: #fff;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
}

.cat-tab-icon {
  width: 24px;
  /* Reduced icon container size */
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.cat-tab-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.3));
  transform: scale(1.4);
  /* Scaled down slightly from 1.5 */
}

.cat-tab-name {
  font-size: 0.8rem;
  /* Smaller font size */
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Inventory Grid */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  animation: fadeIn 0.5s ease-out;
}

.item-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.item-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-gold);
  transform: translateY(-5px);
}

.item-img {
  width: 80px;
  height: 80px;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-img img {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.item-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.25rem;
}

.item-amount {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.trade-value {
  width: 100%;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
}

.value-label {
  display: block;
  color: var(--accent-gold);
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
}

.value-target {
  color: #fff;
  font-weight: 600;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== DASHBOARD PAGE ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 15px;
  width: 100%;
}

.category-card {
  position: relative;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.03), transparent);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  text-align: center;
}

.category-card:hover {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.07), rgba(255, 178, 0, 0.03));
  border-color: var(--gold-glow);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(255, 178, 0, 0.1);
}

.category-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.1);
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.category-card:hover .category-name {
  color: var(--gold);
}


/* ===== END OF STYLES ===== */