/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
  /* Colors */
  --bg-darkest: #060609;
  --bg-darker: #0d0d14;
  --bg-card: rgba(20, 20, 31, 0.6);
  --bg-card-hover: rgba(28, 28, 43, 0.8);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Role Accents */
  --color-murderer: #ff334b;
  --color-sheriff: #0088ff;
  --color-innocent: #10b981;
  
  /* Rarity Colors */
  --rarity-common: #94a3b8;
  --rarity-uncommon: #2ecc71;
  --rarity-rare: #0984e3;
  --rarity-legendary: #e67e22;
  --rarity-godly: #9b59b6;
  --rarity-ancient: #e74c3c;
  --rarity-vintage: #f1c40f;
  --rarity-unique: #1abc9c;
  
  /* Glows */
  --glow-murderer: 0 0 15px rgba(255, 51, 75, 0.4);
  --glow-sheriff: 0 0 15px rgba(0, 136, 255, 0.4);
  --glow-innocent: 0 0 15px rgba(16, 185, 129, 0.4);
  --glow-chroma: 0 0 20px rgba(255, 255, 255, 0.2);

  /* Font Families */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

/* Base Reset & Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    linear-gradient(rgba(0, 136, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 136, 255, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 10% 20%, rgba(255, 51, 75, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 136, 255, 0.08) 0%, transparent 40%);
  background-size: 30px 30px, 30px 30px, 100% 100%, 100% 100%;
  background-attachment: fixed;
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 30px 30px, 30px 30px, 0 0, 0 0; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Animations */
@keyframes chroma-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.chroma-text {
  background: linear-gradient(90deg, #ff334b, #9b59b6, #0088ff, #10b981, #ff334b);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: chroma-flow 6s ease infinite;
}

.chroma-bg {
  background: linear-gradient(135deg, rgba(255, 51, 75, 0.15), rgba(155, 89, 182, 0.15), rgba(0, 136, 255, 0.15), rgba(16, 185, 129, 0.15));
  background-size: 400% 400%;
  animation: chroma-flow 10s ease infinite;
}

/* Layout Utilities */
.container {
  width: 92%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 9, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 0.9rem 0;
  border-bottom-color: rgba(255, 255, 255, 0.12);
  background: rgba(6, 6, 9, 0.95);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  font-weight: 800;
}

.logo .knife-icon {
  color: var(--color-murderer);
  filter: drop-shadow(var(--glow-murderer));
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.25rem 0;
  cursor: pointer;
}

nav a:hover, nav a.active {
  color: var(--text-primary);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-murderer);
  transition: width 0.3s ease;
}

nav a:hover::after, nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Page Sections SPA controller */
.page-section {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  padding: 3rem 0;
}

.page-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Common Card & Glass Panel Components */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Glows based on Rarity classes */
.card-rarity-chroma {
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.05);
}
.card-rarity-ancient {
  border-color: rgba(231, 76, 60, 0.25) !important;
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.15);
}
.card-rarity-godly {
  border-color: rgba(155, 89, 182, 0.25) !important;
  box-shadow: 0 0 15px rgba(155, 89, 182, 0.15);
}
.card-rarity-legendary {
  border-color: rgba(230, 126, 34, 0.2) !important;
}
.card-rarity-rare {
  border-color: rgba(9, 132, 227, 0.2) !important;
}
.card-rarity-uncommon {
  border-color: rgba(46, 204, 113, 0.15) !important;
}
.card-rarity-common {
  border-color: rgba(148, 163, 184, 0.1) !important;
}

/* Color Tags */
.tag-chroma { background: linear-gradient(90deg, #ff334b, #9b59b6, #0088ff, #10b981); color: #fff; }
.tag-ancient { background-color: var(--rarity-ancient); color: #fff; }
.tag-godly { background-color: var(--rarity-godly); color: #fff; }
.tag-legendary { background-color: var(--rarity-legendary); color: #fff; }
.tag-rare { background-color: var(--rarity-rare); color: #fff; }
.tag-uncommon { background-color: var(--rarity-uncommon); color: #12121a; }
.tag-common { background-color: var(--rarity-common); color: #12121a; }

/* Buttons styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--color-murderer);
  color: white;
  box-shadow: var(--glow-murderer);
}

.btn-primary:hover {
  background-color: #ff556b;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 51, 75, 0.6);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

/* Inputs styling */
.input-field {
  background-color: rgba(6, 6, 9, 0.6);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.input-field:focus {
  border-color: var(--color-sheriff);
  box-shadow: var(--glow-sheriff);
}

/* ==================== HOMEPAGE SECTION ==================== */
.hero-content {
  text-align: center;
  padding: 5rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.hero-tag {
  background-color: rgba(255, 51, 75, 0.1);
  border: 1px solid rgba(255, 51, 75, 0.2);
  color: var(--color-murderer);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 40%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Role section on Homepage */
.roles-overview {
  padding: 4rem 0;
}

.section-title-center {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title-center h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.section-title-center p {
  color: var(--text-secondary);
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.role-card {
  text-align: center;
  border-top-width: 4px;
}

.role-card.role-murderer {
  border-top-color: var(--color-murderer);
}
.role-card.role-murderer:hover {
  box-shadow: var(--glow-murderer);
  border-color: rgba(255, 51, 75, 0.3);
}

.role-card.role-sheriff {
  border-top-color: var(--color-sheriff);
}
.role-card.role-sheriff:hover {
  box-shadow: var(--glow-sheriff);
  border-color: rgba(0, 136, 255, 0.3);
}

.role-card.role-innocent {
  border-top-color: var(--color-innocent);
}
.role-card.role-innocent:hover {
  box-shadow: var(--glow-innocent);
  border-color: rgba(16, 185, 129, 0.3);
}

.role-icon-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1.5rem;
}

.role-murderer .role-icon-circle {
  background-color: rgba(255, 51, 75, 0.1);
  color: var(--color-murderer);
}

.role-sheriff .role-icon-circle {
  background-color: rgba(0, 136, 255, 0.1);
  color: var(--color-sheriff);
}

.role-innocent .role-icon-circle {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-innocent);
}

.role-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.role-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.role-card .role-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

/* Feature Showcase grid */
.feature-showcase {
  margin-top: 6rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

.showcase-text h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.showcase-text p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.showcase-visual {
  background: linear-gradient(135deg, rgba(20, 20, 31, 0.4), rgba(6, 6, 9, 0.8));
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.showcase-item-dummy {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 10px;
}

.showcase-item-dummy.godly {
  border-color: rgba(155, 89, 182, 0.2);
  box-shadow: 0 0 10px rgba(155, 89, 182, 0.1);
}

.showcase-item-dummy.chroma {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.dummy-icon {
  font-size: 1.5rem;
}

.dummy-info {
  flex-grow: 1;
}

.dummy-info h4 {
  font-size: 0.95rem;
}

.dummy-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dummy-value {
  font-weight: 700;
  font-size: 0.95rem;
}

/* ==================== CATALOG SECTION ==================== */
.catalog-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.catalog-search-wrap {
  position: relative;
  flex-grow: 1;
  max-width: 450px;
}

.catalog-search-wrap .input-field {
  width: 100%;
}

.catalog-filters {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.select-wrap select {
  width: 150px;
}

.filter-categories {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.filter-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.03);
}

.filter-btn.active {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.catalog-card {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.catalog-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-4px);
}

.catalog-card-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 1rem;
}

.rarity-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.type-tag {
  color: var(--text-muted);
}

.catalog-card-emoji {
  font-size: 3.5rem;
  margin: 1.5rem 0;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.catalog-card:hover .catalog-card-emoji {
  transform: scale(1.1) rotate(5deg);
}

.catalog-card-info {
  width: 100%;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.weapon-name {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weapon-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-muted);
}

.stat-demand {
  color: var(--text-secondary);
  font-weight: 500;
}

.no-results-catalog {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: var(--text-secondary);
}

/* ==================== TRADE CALCULATOR SECTION ==================== */
.trade-arena {
  display: grid;
  grid-template-columns: 1fr 280px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.trade-column {
  display: flex;
  flex-direction: column;
}

.trade-side-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.trade-side-header h3 {
  font-size: 1.25rem;
}

.total-value-pill {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.total-value-pill span {
  color: var(--text-primary);
  font-weight: 700;
}

.trade-slots {
  background: rgba(20, 20, 31, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  min-height: 350px;
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  align-content: start;
}

.empty-slot-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 6rem;
  padding: 0 1rem;
}

.trade-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.trade-item-emoji {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.trade-item-details {
  width: 100%;
}

.trade-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.trade-item-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.trade-item-stats span {
  color: var(--text-secondary);
  font-weight: 600;
}

.remove-trade-item {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.remove-trade-item:hover {
  background-color: var(--color-murderer);
  color: white;
}

/* Center Panel (Fairness evaluation) */
.trade-center-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.fairness-card {
  width: 100%;
  padding: 1.5rem;
}

.fairness-card h4 {
  font-size: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.status-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-neutral {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.status-win {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-innocent);
  box-shadow: var(--glow-innocent);
}

.status-fair {
  background-color: rgba(0, 136, 255, 0.15);
  color: var(--color-sheriff);
  box-shadow: var(--glow-sheriff);
}

.status-loss {
  background-color: rgba(255, 51, 75, 0.15);
  color: var(--color-murderer);
  box-shadow: var(--glow-murderer);
}

.fairness-meter-bg {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

#fairness-meter-fill {
  width: 50%;
  height: 100%;
  background-color: var(--text-muted);
  border-radius: 100px;
  transition: width 0.5s ease, background-color 0.5s ease;
}

#fairness-advice {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.trade-reset-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

/* ==================== CRATE SIMULATOR SECTION ==================== */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 2rem;
}

.sim-main-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sim-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.wallet-badge {
  background-color: rgba(241, 196, 15, 0.1);
  border: 1px solid rgba(241, 196, 15, 0.25);
  padding: 0.5rem 1rem;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #f1c40f;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.1);
}

.sim-settings {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#crate-cost-display {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Spinner container & CSS sliding mechanics */
.spinner-container {
  background-color: #08080c;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  height: 180px;
  display: flex;
  align-items: center;
}

.spinner-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background-color: var(--color-murderer);
  box-shadow: var(--glow-murderer);
  z-index: 5;
}

#spinner-reel {
  display: flex;
  gap: 12px;
  padding: 0 20px;
  transform: translateX(0);
}

.reel-card {
  width: 120px;
  height: 130px;
  flex-shrink: 0;
  background-color: rgba(20, 20, 31, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
}

.reel-card-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.reel-card-name {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  color: var(--text-primary);
}

/* Inventory panel */
.inventory-panel {
  display: flex;
  flex-direction: column;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.inventory-header h3 {
  font-size: 1.25rem;
}

#inventory-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.inventory-grid-container {
  background: rgba(20, 20, 31, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  min-height: 480px;
  max-height: 480px;
  overflow-y: auto;
}

#inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.empty-inventory {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 10rem;
}

.inventory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inv-card-emoji {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.inv-card-name {
  font-size: 0.75rem;
  font-weight: 600;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-card-rarity {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.sell-inv-item {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  font-size: 0.7rem;
  padding: 0.25rem 0;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.sell-inv-item:hover {
  background-color: rgba(241, 196, 15, 0.15);
  border-color: rgba(241, 196, 15, 0.3);
  color: #f1c40f;
}

/* ==================== STRATEGY GUIDES SECTION ==================== */
.guides-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.guide-block {
  border-left-width: 4px;
}

.guide-block.murderer-guide { border-left-color: var(--color-murderer); }
.guide-block.sheriff-guide { border-left-color: var(--color-sheriff); }
.guide-block.innocent-guide { border-left-color: var(--color-innocent); }

.guide-block h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.guide-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tip-card h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tip-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ==================== MODAL OVERLAYS (GLASSMORPHISM) ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background: rgba(4, 4, 6, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

/* Specific details modal styling */
.details-modal-body {
  padding: 3rem;
  text-align: center;
}

.details-modal-emoji {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

.details-modal-body h2 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.details-tags {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.details-tag {
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.details-specs {
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.spec-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.details-origin-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Specific trading picker modal */
.calc-modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.calc-modal-header h3 {
  font-size: 1.4rem;
}

.calc-modal-filters {
  display: flex;
  gap: 1rem;
}

.calc-modal-filters .input-field {
  flex-grow: 1;
}

.calc-modal-body {
  padding: 1.5rem;
  max-height: 50vh;
  overflow-y: auto;
}

.calc-modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.modal-weapon-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-weapon-item:hover {
  background-color: rgba(255, 255, 255, 0.07);
  transform: scale(1.01);
}

.weapon-emoji-badge {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-weapon-info {
  flex-grow: 1;
}

.modal-weapon-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.modal-weapon-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Crate Winner Modal design */
.winner-card {
  padding: 3.5rem 2rem;
  text-align: center;
  border-width: 2px !important;
}

.winner-title {
  font-size: 1rem;
  color: #f1c40f;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

#winner-emoji {
  font-size: 6rem;
  margin: 2rem 0;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

#winner-name {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.winner-rarity-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.winner-substats {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==================== TOAST BANNER NOTIFICATIONS ==================== */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-darker);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-left: 4px solid var(--color-innocent);
}

.toast-error {
  border-left: 4px solid var(--color-murderer);
}

.toast-info {
  border-left: 4px solid var(--color-sheriff);
}

/* ==================== RESPONSIVE LAYOUT adjustments ==================== */
@media (max-width: 992px) {
  .roles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-showcase {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .trade-arena {
    grid-template-columns: 1fr;
  }
  
  .trade-center-panel {
    grid-row: 2;
    padding: 1.5rem 0;
  }
  
  .simulator-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
  }
  .details-specs {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .calc-modal-filters {
    flex-direction: column;
  }
  
  .catalog-header-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .catalog-search-wrap {
    max-width: none;
  }
}

/* ==================== WEAPON IMAGES STYLING ==================== */
.catalog-card-img-container {
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.catalog-card:hover .catalog-card-img-container {
  transform: scale(1.08) rotate(3deg);
}

.catalog-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.details-large-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: rgba(6, 6, 9, 0.6);
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
}

.dummy-icon img {
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.05);
  background-color: rgba(0,0,0,0.2);
  padding: 2px;
}



/* ==================== CUSTOM ADDITIONS FOR PREMIUM UI/UX ==================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* SVG Icon Base Styling */
.svg-icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  vertical-align: middle;
  stroke-width: 2;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo .knife-svg {
  width: 1.85rem;
  height: 1.85rem;
  color: var(--color-murderer);
  filter: drop-shadow(0 0 8px rgba(255, 51, 75, 0.6));
  animation: knife-bob 3s ease-in-out infinite;
}

@keyframes knife-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(3deg); }
}

.role-icon-circle .svg-icon {
  width: 2.25rem;
  height: 2.25rem;
}

.role-murderer .role-icon-circle .murderer-svg {
  color: var(--color-murderer);
}

.role-sheriff .role-icon-circle .sheriff-svg {
  color: var(--color-sheriff);
}

.role-innocent .role-icon-circle .innocent-svg {
  color: var(--color-innocent);
}

.wallet-badge .coin-svg {
  color: #f1c40f;
  margin-right: 0.35rem;
  width: 1.2rem;
  height: 1.2rem;
  animation: coin-spin 6s linear infinite;
}

@keyframes coin-spin {
  0%, 90% { transform: rotateY(0deg); }
  95% { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

/* Enhanced Empty Slot Placeholder */
.empty-slot-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 3.5rem 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.15);
  min-height: 180px;
  margin-top: 1.5rem;
  transition: all 0.3s ease;
}

.trade-slots:hover .empty-slot-placeholder {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.01);
}

/* Premium Card hover glowing transitions */
.role-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.catalog-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.catalog-card::before {
  content: 'c;
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.catalog-card:hover::before {
  opacity: 1;
}

/* Navigation enhancements */
nav a.active {
  text-shadow: 0 0 10px rgba(255, 51, 75, 0.5);
}

/* Mobile responsive drawer overlay and panel */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    z-index: 101;
    transition: transform 0.3s ease;
  }
  
  .menu-toggle:active {
    transform: scale(0.9);
  }
  
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(6, 6, 9, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    padding: 6rem 2rem 2rem;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }
  
  nav.active {
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
    gap: 1.75rem;
    align-items: flex-start;
  }
  
  nav a {
    font-size: 1.15rem;
    display: block;
    width: 100%;
  }
}


/* Tactile Press Active Scale Effects */
.btn:active, .filter-btn:active, .sell-inv-item:active, .remove-trade-item:active {
  transform: scale(0.96);
}

.catalog-card:active, .modal-weapon-item:active, .trade-item-card:active {
  transform: scale(0.98);
}

/* Spinner Glow Enhancements */
.spinner-container {
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 51, 75, 0.15);
  border-color: rgba(255, 51, 75, 0.25) !important;
}

.spinner-container::before {
  box-shadow: 0 0 20px rgba(255, 51, 75, 0.8);
}

