/* RESET & BASE */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background-color: #0a0a0a; /* Deep Black */
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* NAVBAR */
.navbar {
  background: rgba(20, 20, 20, 0.95);
  border-bottom: 1px solid #333;
  padding: 15px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
  cursor: pointer;
}

.logo-game-name {
  font-size: 14px;
  color: #9aa0b0;
  font-weight: 600;
}

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

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s;
}

.social-link:hover {
  opacity: 0.8;
}

.social-link img {
  height: 24px;
  width: auto;
  display: block;
}

/* AUTH BUTTONS */
#loginBtn {
  background: #fff;
  color: #000;
  border: none;
  padding: 10px 24px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

#loginBtn:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

/* LOGGED IN PROFILE */
.user-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #1a1a1a;
  padding: 5px 15px;
  border-radius: 50px;
  border: 1px solid #333;
  cursor: pointer;
}

.username-text {
  font-weight: 600;
  font-size: 14px;
}

.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #333;
}

.logout-btn {
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}
.logout-btn:hover { color: white; border-color: white; }

/* CONTAINER & HERO */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
}

.profile-page {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 40px 20px 60px;
}

.profile-card {
  width: 100%;
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 24px;
  padding: 30px;
}

.profile-card-inner {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  border: 3px solid #222;
  object-fit: cover;
}

.profile-details {
  flex: 1;
  min-width: 220px;
}

.profile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-card h1 {
  font-size: 34px;
  margin: 0;
}

.profile-status {
  font-size: 14px;
  color: #9aa;
  margin: 4px 0 12px;
}

.profile-description {
  margin: 0 0 18px;
  color: #ccc;
  max-width: 600px;
  font-size: 15px;
}

.profile-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: #999;
}

.profile-roblox-link {
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: all 0.2s;
}

.profile-roblox-link:hover {
  border-color: #fff;
  color: #fff;
}

.profile-roblox-link.disabled {
  pointer-events: none;
  opacity: 0.6;
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- ADDED THIS SECTION FOR SPACING --- */
.fluid-container {
  width: 100%;
  max-width: 1800px; /* Prevents it from being too wide on giant screens */
  margin: 0 auto;
  padding: 0 40px; /* 40px padding on Left and Right */
  box-sizing: border-box; /* Ensures padding doesn't cause overflow */
}

@media (max-width: 768px) {
  .fluid-container {
    padding: 0 20px; /* Smaller padding for mobile devices */
  }
}
/* -------------------------------------- */

.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 56px;
  margin: 0 0 10px 0;
  font-weight: 800;
  letter-spacing: -2px;
}

.hero p {
  font-size: 16px;
  color: #888;
  max-width: 600px;
  margin: 0 auto;
}

.active-trades-section {
  width: 100%;
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 24px;
  padding: 28px 32px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.section-title-row h2 {
  margin: 0;
  font-size: 22px;
}

.profile-cta {
  color: #0a0;
  border: 1px solid rgba(0, 255, 0, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.profile-cta:hover {
  border-color: rgba(0, 255, 0, 0.6);
}

.trade-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 80px;
}

.trade-card {
  background: #141414;
  border: 1px solid #232323;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trade-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.trade-card h3 {
  margin: 0;
  font-size: 18px;
}

.trade-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #999;
}

.trade-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.trade-card-label {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 6px;
}

.trade-card-body p {
  margin: 0;
  color: #f0f0f0;
  font-size: 14px;
  line-height: 1.4;
}

.trade-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-open {
  border-color: rgba(0, 255, 0, 0.5);
  color: #4ef98b;
}

.badge-closed {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ccc;
}

.empty-state {
  text-align: center;
  margin: 0;
  color: #777;
  padding: 40px 0;
  font-size: 15px;
}

.muted-text {
  color: #777;
}

/* --- DASHBOARD GRID SYSTEM --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr; /* Left and Right panels */
  gap: 20px;
  width: 100%;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr; /* Stack on mobile */
  }
}

/* PANELS */
.panel {
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #222;
  padding-bottom: 10px;
}

.panel h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.live-indicator {
  font-size: 12px;
  color: #0f0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* LEFT: RECENT TRADES */
.trade-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: 14px;
}
.trade-item:last-child { border-bottom: none; }

.trade-user { color: #aaa; font-weight: 600; }
.trade-action { color: #555; font-style: italic; font-size: 12px; margin: 0 5px; }
.trade-item-name { font-weight: bold; }

.rarity-godly { color: #ff0055; }
.rarity-legendary { color: #ffaa00; }
.rarity-rare { color: #00aaff; }
.rarity-common { color: #fff; }

/* MIDDLE: FEATURED FORGES */
.forge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.forge-card {
  background: #181818;
  border: 1px solid #333;
  padding: 15px;
  border-radius: 8px;
  text-align: left;
  position: relative;
  transition: transform 0.2s;
}

.forge-card:hover { transform: translateY(-3px); border-color: #555; }

.card-tag {
  position: absolute;
  top: 10px; right: 10px;
  background: #ff3333;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.forge-card h4 { margin: 10px 0 5px 0; font-size: 16px; }
.forge-card p { color: #888; font-size: 12px; margin-bottom: 15px; }

.card-btn {
  width: 100%;
  background: #eee;
  border: none;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
.card-btn:hover { background: #fff; }

.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  min-height: 170px;
}
.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #1a1a1a;
}
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #2e2e2e;
  background: #111;
}
.rank {
  font-weight: 800;
  width: 30px;
  color: #444;
  display: inline-flex;
  justify-content: center;
}
.rank.gold { color: #ffd700; }
.rank.silver { color: #c0c0c0; }
.rank.bronze { color: #cd7f32; }

.lb-name { font-weight: 600; font-size: 14px; text-transform: none; }
.lb-score { color: #888; font-size: 12px; }
.leaderboard-placeholder,
.leaderboard-error {
  color: #777;
  font-size: 14px;
  padding: 20px 0;
}

/* MODAL STYLES (Existing) */
.modal {
  display: none; 
  position: fixed; 
  z-index: 100; 
  left: 0; top: 0; 
  width: 100%; height: 100%; 
  background-color: rgba(0,0,0,0.8); 
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  padding: 20px;
}

.modal-content {
  background-color: #141414;
  border: 1px solid #333;
  padding: 40px;
  width: 400px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  position: relative;
}

.notice-modal .modal-content {
  width: min(520px, 100%);
}

.notice-modal .modal-content p {
  color: #ddd;
  line-height: 1.6;
  margin: 16px 0 0;
}

.close {
  position: absolute;
  right: 20px; top: 20px;
  color: #666;
  font-size: 24px;
  cursor: pointer;
}
.close:hover { color: white; }

.modal-content h3 { margin-top: 0; font-size: 22px; }

.step { text-align: left; margin-bottom: 20px; }
.step-label {
  font-size: 10px;
  font-weight: bold;
  color: #666;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.code-box {
  background: #222;
  border: 1px dashed #444;
  color: #0f0;
  padding: 15px;
  font-family: monospace;
  font-size: 18px;
  text-align: center;
  border-radius: 6px;
  user-select: all;
  margin-top: 5px;
}

.code-countdown {
  margin: 8px 0 0;
  color: #9aa0a6;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

input {
  width: 100%;
  padding: 12px;
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  color: white;
  box-sizing: border-box; 
  font-size: 16px;
}
input:focus { outline: none; border-color: #666; }

.verify-btn {
  width: 100%;
  padding: 14px;
  background: #fff;
  color: black;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 16px;
}
.verify-btn:hover { background: #e0e0e0; }
.verify-btn:disabled { background: #555; cursor: not-allowed; }

.status-msg { margin-top: 15px; font-size: 14px; min-height: 20px;}
.processing { color: #aaa; }
.success { color: #0f0; }
.error { color: #f55; }

.verify-loader {
  display: none;
  margin: 12px auto 0;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.verify-loader.is-visible {
  display: flex;
}

.verify-loader .container {
  --uib-size: 40px;
  --uib-color: #f5f5f5;
  --uib-speed: 2s;
  --uib-bg-opacity: 0.2;
  height: var(--uib-size);
  width: var(--uib-size);
  transform-origin: center;
  animation: verify-rotate var(--uib-speed) linear infinite;
  will-change: transform;
  overflow: visible;
}

.verify-loader .car {
  fill: none;
  stroke: var(--uib-color);
  stroke-dasharray: 1, 200;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: verify-stretch calc(var(--uib-speed) * 0.75) ease-in-out infinite;
  will-change: stroke-dasharray, stroke-dashoffset;
  transition: stroke 0.5s ease;
}

.verify-loader .track {
  fill: none;
  stroke: var(--uib-color);
  opacity: var(--uib-bg-opacity);
  transition: stroke 0.5s ease;
}

@keyframes verify-rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes verify-stretch {
  0% {
    stroke-dasharray: 0, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 75, 150;
    stroke-dashoffset: -25;
  }
  100% {
    stroke-dashoffset: -100;
  }
}

.notice-card {
  max-width: 720px;
  margin: 0 auto;
  background: #111;
  border: 1px solid #222;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  line-height: 1.6;
  color: #e6e6e6;
}

.notice-link {
  color: #6ff0a5;
  text-decoration: underline;
}

.notice-link:hover {
  color: #92f6bb;
}

.game-selector-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 8px;
  width: 100%;
  gap: 24px;
  flex-wrap: wrap;
}

.game-switch-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.game-request-link {
  font-size: 12px;
  font-weight: 600;
  color: #6ff0a5;
  text-decoration: none;
  letter-spacing: 0.2px;
  transition: color 0.2s ease;
}

.game-request-link:hover {
  color: #92f6bb;
}

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

.nav-text-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.nav-text-link:hover {
  opacity: 1;
}

.placeholder-card {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 32px;
  background: #111;
  border: 1px solid #222;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.placeholder-card h1 {
  margin: 0 0 12px;
}

.game-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #1e2124; /* Dark background to match likely theme */
  border: 1px solid #2f3338;
  border-radius: 50px;
  padding: 6px 16px;
  gap: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
  position: relative;
}

.game-pill:hover {
  border-color: #40444b;
  transform: translateY(-1px);
}

.pill-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.pill-text {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
}

.pill-btn {
  background-color: #36393f;
  border: none;
  color: #b9bbbe;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer; /* Keeps cursor pointer even if static */
  transition: all 0.2s;
}

.pill-btn:hover {
  background-color: #4f545c;
  color: #ffffff;
}

.game-switch-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 8px 0;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  z-index: 60;
}

.game-switch-dropdown[data-open='true'] {
  display: flex;
}

.game-switch-option {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background 0.2s ease;
}

.game-switch-option:hover,
.game-switch-option.active {
  background: #202327;
}

.user-profile {
  position: relative; /* key for positioning the tooltip */
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.id-tooltip {
  visibility: hidden;
  width: 120px;
  background-color: #222; /* Dark background */
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 100;
  top: 110%; /* Show below the profile */
  right: 0;  /* Align to right edge */

  /* Visual styling */
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  border: 1px solid #444;
  opacity: 0;
  transition: opacity 0.2s;
}

/* Little arrow pointing up */
.id-tooltip::after {
  content: "";
  position: absolute;
  bottom: 100%;
  right: 20px; 
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #222 transparent;
}

/* Show on hover */
.user-profile:hover .id-tooltip {
  visibility: visible;
  opacity: 1;
}

.toolbar-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.explore-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  /* Removed margin-bottom here as it is handled by toolbar-wrapper */
}

.explore-tabs button {
  background: #181818;
  border: 1px solid #333;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.explore-tabs button:hover, .explore-tabs button.active {
  border-color: white;
  background: #222;
}

/* ✅ FILTER DROPDOWN STYLES */
.filter-container {
  position: relative;
}

.filter-btn {
  background: #181818;
  border: 1px solid #333;
  color: #ccc;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #666;
  color: #fff;
}

.filter-menu {
  position: absolute;
  top: 120%;
  right: 0;
  width: 180px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  padding: 6px;
  display: none; /* Hidden by default */
  z-index: 100;
  flex-direction: column;
}

.filter-menu.show {
  display: flex;
}

.filter-option {
  padding: 10px 12px;
  font-size: 13px;
  color: #ddd;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
}

.filter-option:hover {
  background: #333;
  color: white;
}

.filter-divider {
  height: 1px;
  background: #333;
  margin: 4px 0;
}

.explore-grid {
  display: grid;
  /* auto-fill combined with 1fr ensures cards stretch to fill the remaining space */
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding-bottom: 50px;
  width: 100%;
}

.explore-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: #8a8f9b;
  font-weight: 600;
}

.explore-card {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.explore-card:hover {
  transform: translateY(-3px);
  border-color: #555;
}

/* Image Section */
.card-image-wrapper {
  width: 100%;
  height: 140px;
  background-color: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid #2a2a2a;
}

.explore-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

/* Overlays (Tags & Badges) */
.card-tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: #ccc;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 2;
}

.rank-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #333;
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid #444;
  z-index: 2;
}

/* Content & Stats */
.card-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1; /* Ensures content fills height */
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The Grid inside the Card */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.stat-box {
  background: #252525;
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-label {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #eee;
}

.stat-value.highlight {
  color: #ffd700;
}

/* =====================================
   TRADE POST SYSTEM STYLES
   ===================================== */

/* Create Trade Button */
.create-trade-btn {
  background: #2a9d8f;
  color: white;
  border: none;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  justify-content: center;
  display: inline-flex;
}

.create-trade-btn.hidden {
  display: none;
}

.create-trade-btn:hover {
  background: #21867a;
  transform: translateY(-1px);
}

.create-trade-icon svg {
  width: 16px;
  height: 16px;
}

/* Trade List Items */
.trade-list-item {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.trade-list-item:hover {
  border-color: #444;
  background: #1e1e1e;
  transform: translateX(3px);
}

.trade-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.trade-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #333;
}

.trade-avatar-link {
  display: inline-flex;
  border-radius: 50%;
  overflow: hidden;
}

.trade-avatar-link:hover .trade-avatar {
  border-color: #9ef5e1;
}

.trade-avatar-link:focus-visible {
  outline: 2px solid #9ef5e1;
  outline-offset: 2px;
}

.trade-list-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.trade-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.trade-timer-pill {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(42, 157, 143, 0.15);
  color: #9ef5e1;
  white-space: nowrap;
}

.trade-delete-btn {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid #ff5f7a;
  background: transparent;
  color: #ff9dac;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.trade-delete-btn:hover {
  background: rgba(255, 95, 122, 0.2);
  color: #fff;
}

.trade-delete-btn.pending {
  background: rgba(255, 95, 122, 0.35);
  color: #fff;
  border-color: #ffb3c3;
}

.trade-username {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
}

.trade-title {
  font-size: 12px;
  color: #ccc;
  margin: 2px 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trade-time {
  font-size: 11px;
  color: #666;
}

.trade-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 8px;
  background: #0f0f0f;
  border-radius: 6px;
  flex-wrap: wrap;
}

.preview-arrow {
  color: #555;
  font-style: italic;
  flex-shrink: 0;
}

.preview-requesting {
  color: #fff;
}

.preview-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.preview-column.preview-requesting {
  justify-content: flex-end;
}

.preview-item {
  position: relative;
  padding: 4px 10px;
  background: #141414;
  border-radius: 999px;
  border: 1px solid #222;
  font-size: 12px;
  color: #eee;
  cursor: default;
  transition: border-color 0.2s, background 0.2s;
  max-width: 100%;
}

.preview-item:hover {
  border-color: #5eead4;
  background: #1b1b1b;
}

.preview-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.preview-placeholder {
  font-size: 11px;
  color: #999;
  background: #090909;
  border: 1px dashed #333;
  padding: 4px 10px;
  border-radius: 999px;
}

/* No Trades Message */
.no-trades-msg, .error-msg {
  color: #666;
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
}

.loading-spinner {
  color: #555;
  text-align: center;
  padding: 40px 20px;
}

/* Hover Tooltips */
.item-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a1a;
  border: 1px solid #444;
  border-radius: 8px;
  padding: 12px;
  width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
}

.preview-item:hover .item-tooltip {
  opacity: 1;
  visibility: visible;
}

.tooltip-header {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
  color: #fff;
}

.tooltip-note {
  font-size: 11px;
  color: #9ef5e1;
  margin-bottom: 6px;
  line-height: 1.3;
}

.tooltip-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.stat-name {
  color: #888;
}

.stat-val {
  color: #fff;
  font-weight: 600;
}

.stat-val.highlight {
  color: #ffd700;
}

.stat-row.trait .stat-val {
  color: #9b59b6;
}

.stat-row.rune .stat-val {
  color: #3498db;
}

/* Ore Colors */
.ore-iron { color: #aaa; }
.ore-gold { color: #ffd700; }
.ore-cobalt { color: #0088ff; }
.ore-obsidian { color: #9b59b6; }
.ore-demonite { color: #e74c3c; }
.ore-rivalite { color: #f39c12; }
.ore-darkryte { color: #e74c3c; }
.ore-eye-ore { color: #ff6600; }
.ore-hellstone { color: #ff3333; }
.ore-divine-ore { color: #ffd700; text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
.ore-mythical-ore { color: #ff0055; text-shadow: 0 0 5px rgba(255, 0, 85, 0.5); }

/* Column Value */
.column-value {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #252525;
}

.value-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
}

.value-amount {
  font-size: 16px;
  font-weight: 700;
  color: #4ade80;
}

/* Trade Modal */
.trade-modal-content {
  background-color: #141414;
  border: 1px solid #333;
  padding: 32px 36px;
  width: min(1100px, 95vw);
  max-height: 92vh;
  text-align: left;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.trade-title-row {
  text-align: left;
  margin: 15px 0 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trade-title-row label {
  font-size: 12px;
  color: #aaa;
  font-weight: 600;
}

.trade-title-row input {
  border-radius: 6px;
  border: 1px solid #333;
  padding: 10px;
  background: #1b1b1b;
  color: #fff;
  font-size: 14px;
}

.trade-title-row input:focus {
  outline: none;
  border-color: #2a9d8f;
  box-shadow: 0 0 0 1px rgba(42, 157, 143, 0.5);
}

.trade-builder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin: 10px 0 4px;
}

.trade-section {
  flex: 1;
  text-align: left;
  background: #0d0d0d;
  border: 1px solid #202020;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.trade-section h4 {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: #aaa;
}

.section-count {
  color: #666;
  font-weight: normal;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  min-height: 140px;
  margin-bottom: 10px;
}

.trade-item-card {
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 8px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.trade-item-card:hover {
  border-color: #f55;
  background: #2a2020;
}

.trade-item-card:hover .remove-item {
  opacity: 1;
}

.item-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.item-name {
  font-size: 11px;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-note {
  font-size: 10px;
  color: #9ef5e1;
  margin: 4px 0 0;
  line-height: 1.2;
  min-height: 28px;
  overflow: hidden;
}

.item-qty {
  font-size: 10px;
  color: #888;
}

.remove-item {
  position: absolute;
  top: 4px;
  right: 6px;
  color: #f55;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.2s;
}

.trade-divider {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.trade-arrow {
  color: #666;
  font-style: italic;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.add-item-btn {
  width: 100%;
  background: #252525;
  border: 1px dashed #444;
  color: #888;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.add-item-btn:hover {
  border-color: #666;
  color: #fff;
  background: #333;
}

.submit-trade-btn {
  width: 100%;
  padding: 14px;
  background: #2a9d8f;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.submit-trade-btn:hover {
  background: #21867a;
}

/* Item Builder Modal */
.item-builder-content {
  background-color: #141414;
  border: 1px solid #333;
  padding: 32px 36px;
  width: min(1100px, 95vw);
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

.item-builder-content h3 {
  text-align: center;
  margin-top: 0;
}

.item-builder-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 24px;
  align-items: flex-start;
}

.item-ore-builder {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.item-ore-builder .section-label {
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.item-ore-slots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.item-ore-slot {
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #121212;
  padding: 8px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: #ccc;
  position: relative;
  text-align: center;
}

.item-ore-slot.filled {
  border-color: #4ade80;
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.1), #101010);
}

.item-ore-slot .slot-name {
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.item-ore-slot .slot-qty {
  font-size: 13px;
  color: #9bffdd;
}

.item-ore-slot.empty {
  opacity: 0.6;
}

.slot-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  background: transparent;
  color: #fb7185;
  font-size: 14px;
  cursor: pointer;
}

.item-ore-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.item-ore-controls input {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #1b1b1b;
  color: #fff;
  font-size: 14px;
}

.add-ore-slot-btn {
  padding: 10px 18px;
  background: #292929;
  border: 1px solid #2a9d8f;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.add-ore-slot-btn:hover {
  background: #2a9d8f;
}

.item-form-column,
.item-catalog-column {
  background: #0d0d0d;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.item-catalog-column {
  min-height: 0;
}

.item-builder-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.item-builder-msg {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
  color: #999;
  text-align: left;
}

.item-builder-msg.error {
  color: #fb7185;
}

.ore-catalog-section {
  margin-top: 0;
  text-align: left;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ore-catalog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
}

.ore-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.ore-card {
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #1a1a1a;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.ore-card img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.ore-card span {
  font-size: 11px;
  color: #ddd;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ore-card:hover {
  border-color: #4ade80;
}

.ore-card.selected {
  border-color: #2a9d8f;
  box-shadow: 0 0 15px rgba(42, 157, 143, 0.35);
}

.ore-empty-state {
  font-size: 13px;
  color: #666;
  padding: 20px;
  text-align: center;
}

.item-type-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.type-btn {
  flex: 1;
  padding: 10px;
  background: #222;
  border: 1px solid #333;
  color: #888;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.type-btn:hover {
  border-color: #555;
  color: #fff;
}

.type-btn.active {
  background: #2a9d8f;
  border-color: #2a9d8f;
  color: white;
}

.item-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px 16px;
}

.item-form.hidden {
  display: none;
}

.item-message-row {
  display: none;
  flex-direction: column;
  gap: 6px;
  grid-column: 1 / -1;
}

.item-message-row.visible {
  display: flex;
}

.item-message-row textarea {
  padding: 10px;
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  resize: vertical;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-row.full-span {
  grid-column: 1 / -1;
}

.form-row label {
  font-size: 12px;
  color: #888;
  font-weight: 600;
}

.form-row input,
.form-row select {
  padding: 10px;
  background: #222;
  border: 1px solid #333;
  border-radius: 6px;
  color: white;
  font-size: 14px;
}

.form-row select {
  cursor: pointer;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: #2a9d8f;
}

.add-item-confirm-btn {
  width: 100%;
  padding: 12px;
  background: #2a9d8f;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  transition: all 0.2s;
}

.add-item-confirm-btn:hover {
  background: #21867a;
}

/* Responsive */
@media (max-width: 1024px) {
  .item-builder-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .trade-builder {
    grid-template-columns: 1fr;
  }

  .trade-divider {
    display: flex;
    padding: 10px 0;
  }
}

@media (max-width: 768px) {
  .trade-comparison {
    grid-template-columns: 1fr;
  }

  .item-builder-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .trade-modal-content,
  .item-builder-content {
    width: 95vw;
    padding: 24px;
  }
}

/* FOOTER */
.site-footer {
  background: #050505;
  border-top: 1px solid #1f1f1f;
  padding: 28px 32px;
  text-align: center;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer__text {
  color: #c8c8c8;
  font-size: 13px;
  margin: 0;
}

.site-footer__muted {
  color: #7a7a7a;
  font-size: 11px;
  margin: 0;
}

/* =======================
   FORGE CALCULATOR PAGE
   ======================= */
.calculator-page {
  width: 100%;
  max-width: 1200px;
  align-items: stretch;
  gap: 30px;
}

.calculator-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.calculator-header h1 {
  margin: 0;
  font-size: 34px;
}

.calculator-subtitle {
  color: #f6c76c;
  letter-spacing: 0.3em;
  font-size: 11px;
  margin: 0 0 6px 0;
}

.calculator-description {
  color: #9ea4b3;
  max-width: 560px;
  font-size: 15px;
  margin: 10px 0 0 0;
}

.calculator-tabs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.calculator-alert {
  width: 100%;
  background: #facc15;
  color: #1a1508;
  border: 1px solid #f59e0b;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calculator-tab {
  border: 1px solid #2d2d2d;
  background: #111111;
  color: #c8c8c8;
  padding: 8px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
}

.calculator-tab:hover {
  border-color: #f6c76c;
  color: #fff;
}

.calculator-tab.is-active {
  background: linear-gradient(90deg, #f6c76c, #ffd68f);
  color: #1a1508;
  border-color: transparent;
  box-shadow: none;
}

.calculator-page[data-mode="weapon"] .armor-mode {
  display: none;
}

.calculator-page[data-mode="armor"] .weapon-mode {
  display: none;
}

.ghost-btn {
  border: 1px solid #2d2d2d;
  background: transparent;
  color: #c8c8c8;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.ghost-btn:hover:not(.ghost-btn-disabled) {
  border-color: #fff;
  color: #fff;
}

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

.calculator-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1100px) {
  .calculator-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
}

.calculator-panel {
  min-height: 320px;
}

.panel-description {
  color: #868686;
  font-size: 14px;
  margin-top: 0;
}

.pill-badge {
  border: 1px solid #2d2d2d;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: #cfcfcf;
  text-transform: uppercase;
}

.result-summary {
  text-align: left;
  margin: 10px 0 20px;
}

.result-summary h2 {
  margin: 0;
  font-size: 26px;
}

.calc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat-card {
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 14px;
  background: #111111;
}

.stat-card .label {
  font-size: 12px;
  color: #999;
  margin: 0 0 4px 0;
  text-transform: uppercase;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.traits-section {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.section-top h4 {
  margin: 0;
  font-size: 16px;
}

.trait-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.trait-card {
  border: 1px solid #222;
  border-radius: 10px;
  padding: 12px;
  background: #151515;
}

.trait-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}

.ore-summary {
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 12px;
  background: #111;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ore-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1d1d1d;
}

.ore-summary-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ore-summary-multiplier {
  text-align: right;
}

.ore-summary-multiplier span {
  font-weight: 700;
  font-size: 16px;
}

.ore-summary-multiplier .tiny {
  display: block;
}

.chance-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.chance-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chance-row-active .chance-label span:first-child {
  color: #f6c76c;
}

.chance-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.chance-bar {
  width: 100%;
  height: 8px;
  background: #1b1b1b;
  border-radius: 30px;
  overflow: hidden;
}

.chance-bar-fill {
  height: 100%;
  background: #3d3d3d;
  border-radius: 30px;
}

.chance-bar-fill.active {
  background: linear-gradient(90deg, #f6c76c, #ffd68f);
}

.calculator-ore-grid {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 6px;
  margin-top: 16px;
}

.calculator-ore-card {
  width: 100%;
  gap: 8px;
  cursor: default;
}

.calculator-ore-card img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.calculator-ore-card .ore-card-name {
  font-size: 13px;
  font-weight: 600;
}

.calculator-ore-card .ore-card-multiplier {
  font-size: 12px;
  color: #f6c76c;
  font-weight: 700;
}

.calculator-ore-card .calculator-ore-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.calculator-ore-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #2d2d2d;
  background: transparent;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.calculator-ore-btn:hover {
  border-color: #fff;
}

.calculator-ore-count {
  min-width: 18px;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}

.calculator-ore-card.is-active {
  border-color: #f6c76c;
  box-shadow: 0 0 12px rgba(246, 199, 108, 0.25);
}

.small {
  font-size: 13px;
}

.tiny {
  font-size: 11px;
}

/* RECIPES */
.recipes-page {
  padding: 24px 0 60px;
}

.recipe-hero {
  margin-top: 24px;
}

.recipes-status-row {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill {
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: #b6b6b6;
  background: #111;
}

.status-pill.ok {
  border-color: rgba(246, 199, 108, 0.5);
  color: #f6c76c;
}

.status-pill.warn {
  border-color: rgba(255, 120, 120, 0.5);
  color: #ff9a9a;
}

.recipes-content {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-bottom: 40px;
}

.recipes-loading {
  text-align: center;
  color: #777;
  border: 1px dashed #2a2a2a;
  padding: 18px;
  border-radius: 12px;
  background: #0f0f0f;
}

.recipe-section {
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.recipe-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.recipe-section-header h2 {
  margin: 0;
  font-size: 24px;
}

.recipe-section-subtitle {
  margin: 6px 0 0;
  color: #9aa;
  font-size: 14px;
  max-width: 520px;
}

.recipe-count {
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: #bdbdbd;
  background: #151515;
}

.recipe-table {
  border: 1px solid #242424;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
}

.recipe-row {
  display: grid;
  grid-template-columns: 1.1fr 2.8fr 0.9fr 0.9fr 3.2fr;
}

.recipe-row + .recipe-row {
  border-top: 1px solid #1f1f1f;
}

.recipe-row.header {
  background: #1a1a1a;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9a9a9a;
  font-weight: 600;
}

.recipe-row.highlight {
  background: rgba(246, 199, 108, 0.08);
}

.recipe-cell {
  padding: 12px 14px;
  border-right: 1px solid #1f1f1f;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.recipe-row .recipe-cell:last-child {
  border-right: none;
}

.recipe-cell.tier {
  font-weight: 600;
  color: #f4f4f4;
}

.recipe-cell.recipe {
  align-items: flex-start;
}

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

.ore-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #171717;
  font-size: 12px;
}

.ore-chip .ore-qty {
  font-weight: 700;
  color: #f6c76c;
}

.ore-chip .ore-name {
  font-weight: 600;
  color: #f0f0f0;
}

.ore-chip .ore-meta {
  font-size: 11px;
  color: #9aa;
}

.recipe-cell.mult {
  font-weight: 700;
  color: #f6c76c;
}

.recipe-cell.chance {
  font-weight: 700;
  color: #8fd4ff;
}

.recipe-cell.traits {
  color: #d6d6d6;
  line-height: 1.4;
}

.recipe-cell::before {
  display: none;
}

@media (max-width: 1200px) {
  .recipe-row {
    grid-template-columns: 1fr 2.4fr 0.9fr 0.9fr 2.4fr;
  }
}

@media (max-width: 960px) {
  .recipe-row {
    grid-template-columns: 1fr;
  }

  .recipe-row.header {
    display: none;
  }

  .recipe-cell {
    border-right: none;
    border-top: 1px solid #1f1f1f;
    align-items: flex-start;
    flex-direction: column;
  }

  .recipe-row .recipe-cell:first-child {
    border-top: none;
  }

  .recipe-cell::before {
    display: block;
    content: attr(data-label);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8b8b8b;
    margin-bottom: 4px;
  }
}
