/* EverQuest Legends Loadout & Sync System CSS */

/* --- CSS Variables & Tokens --- */
:root {
  --bg-color: #080a0c;
  --bg-gradient: radial-gradient(circle at top center, #161a22 0%, #080a0c 100%);
  --card-bg: rgba(18, 22, 28, 0.85);
  --card-border: 1px solid rgba(184, 151, 90, 0.15);
  --card-border-hover: 1px solid rgba(184, 151, 90, 0.4);
  
  /* Accent Colors */
  --gold-primary: #b8975a;
  --gold-light: #e5c38c;
  --gold-glow: rgba(184, 151, 90, 0.3);
  --text-primary: #e2e8f0;
  --text-muted: #8a9ba8;
  
  /* Rarity Glows */
  --glow-empty: rgba(255, 255, 255, 0.05);
  --glow-common: rgba(148, 163, 184, 0.2);
  --glow-magic: rgba(59, 130, 246, 0.4);
  --glow-rare: rgba(234, 179, 8, 0.45);
  --glow-epic: rgba(168, 85, 247, 0.5);
  --glow-void: rgba(244, 63, 94, 0.6); /* Void Items - Deep Magenta */
  
  /* Status Colors */
  --green-neon: #00ff66;
  --red-neon: #ff3344;
  --twitch-color: #9146ff;
  
  /* Transition timings */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Resets --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0d1013;
}
::-webkit-scrollbar-thumb {
  background: #242a33;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

.app-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* --- Header Section --- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(184, 151, 90, 0.1);
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-decoration {
  color: var(--gold-primary);
  font-size: 1.5rem;
  text-shadow: 0 0 8px var(--gold-glow);
  animation: pulse 3s infinite alternate;
}

.logo-area h1 {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.8rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo-sub {
  font-family: 'Cinzel', serif;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 0.75rem;
  margin-top: 0.25rem;
}

.status-bar {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0.85rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.8rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green {
  background-color: var(--green-neon);
  box-shadow: 0 0 8px var(--green-neon);
}

.status-dot.red {
  background-color: var(--red-neon);
  box-shadow: 0 0 8px var(--red-neon);
  animation: blink 1.5s infinite;
}

/* --- Card Styles --- */
.card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  transition: border var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border: var(--card-border-hover);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(184, 151, 90, 0.05);
}

.card h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(184, 151, 90, 0.1);
  padding-bottom: 0.5rem;
}

/* --- Dashboard Grid Layout --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1.3fr;
  gap: 1.5rem;
}

/* --- COLUMN 1: IDENTITY CARD --- */
.card-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  height: 100%;
}

.avatar-container {
  padding: 0.5rem;
  background: radial-gradient(circle, rgba(184, 151, 90, 0.1) 0%, rgba(0,0,0,0) 70%);
}

.class-emblem-placeholder polygon {
  transition: stroke var(--transition-normal);
}

.card-identity:hover .class-emblem-placeholder polygon {
  stroke: var(--gold-light);
  filter: drop-shadow(0 0 5px var(--gold-primary));
}

.char-details h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
  outline: none;
  border-bottom: 1px dashed transparent;
  transition: border-bottom var(--transition-fast);
}

.char-details h2:focus {
  border-bottom: 1px dashed var(--gold-primary);
  color: var(--gold-light);
}

.char-guild {
  color: var(--gold-primary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  outline: none;
  display: inline-block;
  margin-bottom: 0.5rem;
  border-bottom: 1px dashed transparent;
}

.char-guild:focus {
  border-bottom: 1px dashed var(--gold-primary);
}

.char-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.class-selectors-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0.5rem 0;
  text-align: left;
}

.class-selectors-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.class-selectors-group select, .input-row select {
  width: 100%;
  background-color: #0c0f12;
  border: 1px solid #242a33;
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 4px;
  outline: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color var(--transition-fast);
}

.class-selectors-group select:focus, .input-row select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 5px rgba(184, 151, 90, 0.2);
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.input-row label {
  min-width: 50px;
}

.action-buttons {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn {
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #2a2218 0%, #15110d 100%);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: var(--gold-primary);
  color: #000;
  box-shadow: 0 4px 12px var(--gold-glow);
}

.btn-secondary {
  background: #11141a;
  border: 1px solid #2a323d;
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.btn-twitch {
  background-color: #1a1526;
  border: 1px solid var(--twitch-color);
  color: #d1b8ff;
  grid-column: span 2;
}

.btn-twitch:hover {
  background-color: var(--twitch-color);
  color: #fff;
  box-shadow: 0 0 12px rgba(145, 70, 255, 0.4);
}

.btn-warning {
  background: #2a1114;
  border: 1px solid var(--red-neon);
  color: #ffb8bd;
}

.btn-warning:hover {
  background: var(--red-neon);
  color: #fff;
}

.file-uploader-fallback {
  width: 100%;
  margin-top: 0.5rem;
}

.file-upload-label {
  display: block;
  width: 100%;
  padding: 0.6rem;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.file-upload-label:hover {
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

/* --- COLUMN 2: LOADOUT GRID --- */
.col-loadout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.loadout-group {
  display: flex;
  flex-direction: column;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem;
}

.slot-container {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.slot-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* Equipment Slot Item Styling */
.item-slot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(10, 12, 16, 0.8);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.item-slot.empty {
  color: var(--text-muted);
}

.item-slot.empty:hover {
  border-color: rgba(184, 151, 90, 0.4);
  background: rgba(184, 151, 90, 0.03);
  color: var(--text-primary);
}

.slot-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  filter: grayscale(1) opacity(0.5);
  transition: filter var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.item-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  border-radius: 3px;
}

.item-slot:hover .slot-icon {
  filter: grayscale(0) opacity(1);
}

.item-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Filled Rarity Glow Colors */
.item-slot.filled {
  border-style: solid;
  border-width: 1px;
  background: #0f1217;
}

.item-slot.rarity-common {
  border-color: #475569;
  box-shadow: inset 0 0 10px rgba(148, 163, 184, 0.1);
}

.item-slot.rarity-magic {
  border-color: #2563eb;
  color: #93c5fd;
  box-shadow: inset 0 0 10px rgba(37, 99, 235, 0.15);
}

.item-slot.rarity-rare {
  border-color: #d97706;
  color: #fcd34d;
  box-shadow: inset 0 0 10px rgba(217, 119, 6, 0.15);
}

.item-slot.rarity-epic {
  border-color: #7c3aed;
  color: #c084fc;
  box-shadow: inset 0 0 12px rgba(124, 58, 237, 0.2);
}

.item-slot.rarity-void {
  border-color: #db2777;
  color: #f472b6;
  box-shadow: inset 0 0 15px rgba(219, 39, 119, 0.25);
  animation: pulse-void 4s infinite alternate;
}

/* Hover highlights for filled slots */
.item-slot.filled:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.item-slot.rarity-magic:hover { box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25); }
.item-slot.rarity-rare:hover { box-shadow: 0 4px 15px rgba(217, 119, 6, 0.25); }
.item-slot.rarity-epic:hover { box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35); }
.item-slot.rarity-void:hover { box-shadow: 0 4px 22px rgba(219, 39, 119, 0.45); }

/* --- COLUMN 3: STATS GRID --- */
.col-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.stat-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.stat-values {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-base-input {
  width: 45px;
  background: transparent;
  border: 1px dashed transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: right;
  outline: none;
  padding: 1px 4px;
}

.stat-base-input:hover, .stat-base-input:focus {
  border-color: rgba(184, 151, 90, 0.3);
  color: var(--text-primary);
  background: rgba(0,0,0,0.3);
}

/* Remove spin arrows from input */
.stat-base-input::-webkit-outer-spin-button,
.stat-base-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stat-total {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  min-width: 30px;
  text-align: right;
}

.stat-hint {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  text-align: center;
}

/* Ratings Grid */
.ratings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.rating-box {
  display: flex;
  flex-direction: column;
  background: #0f1217;
  padding: 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  text-align: center;
}

.rating-box.full-width {
  grid-column: span 2;
}

.rating-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.rating-value {
  font-size: 1.2rem;
  font-weight: 800;
}

.hp-color { color: #f43f5e; text-shadow: 0 0 10px rgba(244, 63, 94, 0.2); }
.mana-color { color: #3b82f6; text-shadow: 0 0 10px rgba(59, 130, 246, 0.2); }
.ac-color { color: #10b981; text-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
.atk-color { color: #f59e0b; text-shadow: 0 0 10px rgba(245, 158, 11, 0.2); }

/* Elemental Resistances Grid */
.resists-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.resist-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.65rem 0.5rem;
  border-radius: 6px;
  text-align: center;
  background: rgba(10, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: all var(--transition-fast);
}

.resist-icon {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.resist-lbl {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.resist-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

/* Resistance Element Color Themes */
.resist-badge.mr:hover { border-color: #8b5cf6; box-shadow: 0 0 10px rgba(139, 92, 246, 0.15); }
.resist-badge.fr:hover { border-color: #f97316; box-shadow: 0 0 10px rgba(249, 115, 22, 0.15); }
.resist-badge.cr:hover { border-color: #06b6d4; box-shadow: 0 0 10px rgba(6, 182, 212, 0.15); }
.resist-badge.pr:hover { border-color: #22c55e; box-shadow: 0 0 10px rgba(34, 197, 94, 0.15); }
.resist-badge.dr:hover { border-color: #eab308; box-shadow: 0 0 10px rgba(234, 179, 8, 0.15); }

/* EQL Specific Void Resist Badge */
.resist-badge.vr {
  background: radial-gradient(circle at center, rgba(219, 39, 119, 0.05) 0%, rgba(10,12,16,0.6) 100%);
  border: 1px solid rgba(219, 39, 119, 0.15);
}
.resist-badge.vr .resist-val {
  color: #f472b6;
}
.resist-badge.vr:hover {
  border-color: #db2777;
  box-shadow: 0 0 12px rgba(219, 39, 119, 0.3);
}

/* --- TABS SECTION --- */
.tabs-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.tabs-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--gold-light);
  border-color: var(--gold-primary);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

/* Inventory Tab Layout */
.inventory-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
}

.bag-list-column {
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  padding-right: 1.5rem;
}

.bag-list-column h4, .bag-details-column h4, .bank-section h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.bag-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
}

.bag-slot-item {
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0.25rem;
}

.bag-slot-item:hover, .bag-slot-item.active {
  border-color: var(--gold-primary);
  background: rgba(184, 151, 90, 0.05);
}

.bag-slot-item .bag-icon {
  font-size: 1.3rem;
  margin-bottom: 0.15rem;
}

.bag-slot-item .bag-name {
  font-size: 0.6rem;
  text-align: center;
  color: var(--text-muted);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bag-slot-item.active .bag-name {
  color: var(--gold-light);
}

.bag-grid, .bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.75rem;
  border-radius: 6px;
  min-height: 120px;
  align-content: start;
}

.grid-item-box {
  width: 40px;
  height: 40px;
  background: #0d1013;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.grid-item-box:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.grid-item-box.filled {
  border-style: solid;
}

.grid-item-box.rarity-magic { border-color: #2563eb; background: rgba(37, 99, 235, 0.05); }
.grid-item-box.rarity-rare { border-color: #d97706; background: rgba(217, 119, 6, 0.05); }
.grid-item-box.rarity-epic { border-color: #7c3aed; background: rgba(124, 58, 237, 0.05); }
.grid-item-box.rarity-void { border-color: #db2777; background: rgba(219, 39, 119, 0.05); }

.item-count-badge {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
  padding: 0 2px;
  border-radius: 2px;
}

.no-bag-selected {
  grid-column: span 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 0;
}

/* Bank Layout */
.bank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Database Tab Layout */
.database-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==================== BAZAAR-STYLE DATABASE UI ==================== */

.db-search-bar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.db-search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.db-search-icon {
  position: absolute;
  left: 0.7rem;
  font-size: 0.9rem;
  pointer-events: none;
  opacity: 0.5;
}

.db-search-input-wrap input {
  width: 100%;
  background: #0d1013;
  border: 1px solid rgba(184,151,90,0.25);
  color: var(--text-primary);
  padding: 0.6rem 2.2rem 0.6rem 2.2rem;
  border-radius: 6px;
  outline: none;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.db-search-input-wrap input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px rgba(184,151,90,0.15);
}

.db-search-clear {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color var(--transition-fast);
}
.db-search-clear:hover { color: #fff; }
.db-search-clear.hidden { display: none; }

.db-category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.db-cat-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(184,151,90,0.2);
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.db-cat-chip:hover { border-color: rgba(184,151,90,0.5); color: var(--text-primary); }
.db-cat-chip.active { background: rgba(184,151,90,0.15); border-color: var(--gold-primary); color: var(--gold-light); font-weight: 600; }

.db-results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.6rem; padding: 0 0.25rem; }
.db-results-header.hidden { display: none; }
.db-results-count { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

.db-pagination { display: flex; align-items: center; gap: 0.5rem; }
.db-page-btn { background: rgba(184,151,90,0.1); border: 1px solid rgba(184,151,90,0.3); color: var(--gold-light); padding: 0.25rem 0.7rem; border-radius: 4px; font-size: 0.8rem; cursor: pointer; font-family: inherit; transition: all var(--transition-fast); }
.db-page-btn:hover:not(:disabled) { background: rgba(184,151,90,0.2); border-color: var(--gold-primary); }
.db-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.db-page-info { font-size: 0.78rem; color: var(--text-muted); min-width: 80px; text-align: center; }

.db-items-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.6rem;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding-right: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(184,151,90,0.3) transparent;
}

.db-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.05);
  border-left: 3px solid transparent;
  padding: 0.55rem 0.7rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  gap: 0.5rem;
}
.db-item-card:hover { background: rgba(184,151,90,0.04); border-color: var(--gold-primary); }

.db-item-card-left { display: flex; align-items: center; gap: 0.6rem; min-width: 0; flex: 1; }
.db-item-icon { width: 32px; height: 32px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; background: rgba(0,0,0,0.3); }
.db-item-info { min-width: 0; flex: 1; }
.db-item-name { font-weight: 600; font-size: 0.88rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-item-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 1px; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.db-item-right { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }

.db-era-badge { font-size: 0.62rem; padding: 1px 5px; border-radius: 3px; background: rgba(184,151,90,0.15); border: 1px solid rgba(184,151,90,0.3); color: var(--gold-light); white-space: nowrap; }
.db-stat-badge { font-size: 0.68rem; padding: 1px 5px; border-radius: 3px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); white-space: nowrap; }

.db-empty-state { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.db-empty-icon { font-size: 3rem; margin-bottom: 0.75rem; opacity: 0.6; }
.db-empty-title { font-family: 'Cinzel', serif; font-size: 1.2rem; color: var(--gold-light); margin-bottom: 0.4rem; }
.db-empty-sub { font-size: 0.85rem; opacity: 0.7; }
.db-item-slot-lbl { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; }


/* --- DRAG & DROP OVERLAY --- */
.drop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 10, 12, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.drop-overlay.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.drop-message {
  text-align: center;
  border: 2px dashed var(--gold-primary);
  padding: 3rem;
  border-radius: 12px;
  background: rgba(25, 30, 38, 0.4);
  max-width: 500px;
  box-shadow: 0 0 50px rgba(184, 151, 90, 0.1);
  transform: scale(1);
  transition: transform 0.25s ease;
}

.drop-overlay:not(.hidden) .drop-message {
  animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.drop-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 1.5rem;
}

.drop-message h2 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.drop-message p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- TOOLTIP DESIGN --- */
.tooltip {
  position: fixed;
  background: #000205; /* Pure black background like EQ */
  border: 2px solid #3c4858; /* Steel-stone border */
  box-shadow: 0 10px 30px rgba(0,0,0,0.9);
  padding: 10px 14px;
  border-radius: 0px; /* Sharp corners */
  z-index: 10000;
  width: 320px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.1s ease;
  font-family: 'Courier New', Courier, monospace; /* Monospace for retro EQ inspect look */
  font-size: 11px;
  color: #fff;
  box-sizing: border-box;
  line-height: 1.35;
}

.tooltip.hidden {
  display: none;
}

.tooltip-top-section {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tooltip-icon-wrapper {
  width: 40px;
  height: 40px;
  border: 1px solid #3c4858;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tooltip-icon-wrapper .item-icon-img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  object-fit: cover;
}

.tooltip-title-block {
  display: flex;
  flex-direction: column;
}

.tooltip-title {
  font-size: 13px;
  font-weight: bold;
  color: #d1b87a; /* Gold text */
}

.tooltip-tags {
  font-size: 10px;
  color: #3b82f6; /* Blue tag text */
  margin-top: 2px;
}

.tooltip-divider {
  border-top: 1px solid #3c4858;
  margin: 6px 0;
}

.tooltip-meta-block {
  font-size: 11px;
  color: #fff;
}

.tooltip-classic-stats {
  margin-top: 4px;
}

.tooltip-stat-row {
  display: flex;
  justify-content: space-between;
}

.stat-col {
  width: 50%;
  color: #22c55e; /* Green stats */
}

.tooltip-requirements {
  font-size: 11px;
  color: #fff;
  line-height: 1.3;
}

.tooltip-effect {
  color: #06b6d4; /* Cyan effects */
  margin-top: 2px;
}

.tooltip-footer-id {
  font-size: 9px;
  color: #64748b;
  text-align: right;
  margin-top: 4px;
}

/* --- MODAL DIALOGS --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(6, 8, 10, 0.85);
  backdrop-filter: blur(5px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--transition-fast);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #0f1217;
  border: 1px solid rgba(184, 151, 90, 0.25);
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7), 0 0 20px rgba(184, 151, 90, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

.modal-content.scrollable-modal {
  max-height: 85vh;
}

.modal-content.item-selector-content {
  max-width: 600px;
}

.modal-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(184, 151, 90, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  letter-spacing: 1px;
  font-size: 1.1rem;
}

.close-modal {
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.close-modal:hover {
  color: #fff;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-footer {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background: rgba(0,0,0,0.15);
}

/* Forms in Modals */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.form-group input {
  background: #06080a;
  border: 1px solid #242a33;
  color: var(--text-primary);
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  outline: none;
  font-size: 0.85rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus {
  border-color: var(--gold-primary);
}

.form-group small {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Switch styling for settings */
.switch-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 0.85rem;
}

.switch-container input {
  display: none;
}

.switch-slider {
  position: relative;
  width: 38px;
  height: 20px;
  background-color: #242a33;
  border-radius: 20px;
  transition: background-color var(--transition-fast);
  flex-shrink: 0;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.switch-container input:checked + .switch-slider {
  background-color: var(--gold-primary);
}

.switch-container input:checked + .switch-slider::before {
  transform: translateX(18px);
  background-color: #000;
}

.switch-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary) !important;
  text-transform: none !important;
}

/* Custom Item Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.form-grid .full-width {
  grid-column: span 2;
}

/* Share URL Container */
.share-url-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.share-url-container input {
  flex-grow: 1;
  background: #06080a;
  border: 1px solid #242a33;
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: 4px;
  outline: none;
  font-size: 0.8rem;
}

/* Saved profiles list in Load Modal */
.profiles-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
}

.profile-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.profile-item-row:hover {
  border-color: var(--gold-primary);
  background: rgba(184, 151, 90, 0.02);
}

.profile-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
}

.profile-item-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.btn-delete-profile {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}

.btn-delete-profile:hover {
  color: var(--red-neon);
}

/* Item Selector List Inside Selector Modal */
.item-selector-content .modal-body {
  gap: 0.75rem;
}

#itemSelectorSearch {
  background: #06080a;
  border: 1px solid #242a33;
  color: #fff;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  outline: none;
  font-size: 0.85rem;
}

#itemSelectorSearch:focus {
  border-color: var(--gold-primary);
}

.selector-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.selector-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.selector-item-card:hover {
  border-color: var(--gold-primary);
  background: rgba(184, 151, 90, 0.02);
}

/* --- ANIMATIONS --- */
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 1; }
}

@keyframes pulse-void {
  0% { box-shadow: inset 0 0 15px rgba(219, 39, 119, 0.2); }
  100% { box-shadow: inset 0 0 25px rgba(219, 39, 119, 0.45); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes bounceIn {
  0% { transform: scale(0.9); opacity: 0; }
  60% { transform: scale(1.02); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- RESPONSIVE ADJUSTMENTS & NEW CLIENT LAYOUT STYLES --- */

.green-text {
  color: var(--green-neon) !important;
  text-shadow: 0 0 5px rgba(0, 255, 102, 0.2);
}

.red-text {
  color: var(--red-neon) !important;
  text-shadow: 0 0 5px rgba(255, 51, 68, 0.2);
}

/* --- Client Tabs Bar --- */
.client-tabs-bar {
  display: flex;
  background: rgba(18, 22, 28, 0.9);
  border: 1px solid rgba(184, 151, 90, 0.2);
  border-radius: 6px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.client-tabs-bar .tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.65rem 1.25rem;
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.client-tabs-bar .tab-btn:hover {
  color: var(--gold-light);
  border-color: rgba(184, 151, 90, 0.3);
  background: rgba(255, 255, 255, 0.02);
}

.client-tabs-bar .tab-btn.active {
  color: #fff;
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-glow);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* --- Panel Visibility --- */
.client-panel {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.client-panel.active {
  display: block;
}

/* ==================== INVENTORY TAB LAYOUT ==================== */
.inventory-tab-layout {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 1rem;
  align-items: start;
  background: var(--card-bg);
  border: 1px solid rgba(184, 151, 90, 0.3);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  max-height: calc(100vh - 120px);
  overflow: hidden;
}

/* Stats Sidebar (Left Column) */
.char-stats-sidebar {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 145px);
  scrollbar-width: thin;
  scrollbar-color: rgba(184,151,90,0.3) transparent;
  padding-right: 4px !important;
}

.stats-identity {
  border-bottom: 1px solid rgba(184, 151, 90, 0.15);
  padding-bottom: 0.75rem;
  text-align: left;
}

.stats-identity h2 {
  font-family: 'Cinzel', serif;
  color: #fff;
  font-size: 1.4rem;
  letter-spacing: 1px;
  outline: none;
}

.stats-class-line {
  font-size: 1rem;
  color: var(--gold-light);
  font-weight: bold;
  letter-spacing: 1px;
  margin: 4px 0;
  display: flex;
  gap: 6px;
}

.stats-class-line [contenteditable="true"] {
  border-bottom: 1px dashed rgba(184, 151, 90, 0.4);
  outline: none;
}

.stats-deity {
  font-size: 0.85rem;
  color: var(--text-muted);
  outline: none;
}

.stats-vitals-group, .stats-core-group, .stats-resists-group, .bind-origin-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.vital-row, .core-stat-row, .resist-row, .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vital-label, .core-stat-row span:first-child, .resist-row span:first-child, .meta-row span:first-child {
  color: var(--text-muted);
  font-weight: 500;
}

.vital-value, .stat-num, .resist-num {
  font-weight: bold;
  color: #fff;
}

/* EXP Progress Bars */
.exp-bars-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 0;
}

.exp-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exp-label {
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.exp-percent {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--gold-light);
  outline: none;
  cursor: pointer;
  align-self: flex-start;
}

.exp-bar-bg {
  width: 100%;
  height: 8px;
  background: #0d1013;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.exp-bar-fill {
  height: 100%;
  border-radius: 4px;
}

.exp-bar-fill.level-bar {
  background: linear-gradient(90deg, #1d4ed8, #3b82f6);
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
}

.exp-bar-fill.aa-bar {
  background: linear-gradient(90deg, #15803d, #22c55e);
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.5);
}

.bind-origin-group span[contenteditable="true"] {
  border-bottom: 1px dashed rgba(184, 151, 90, 0.3);
  outline: none;
  font-weight: bold;
  color: #fff;
}

/* PERSISTENT REUSABLE EQUIPMENT GRID SYSTEM */
#equipmentGridContainer {
  display: grid;
  grid-template-areas:
    "ear1 head face ear2"
    "chest showcase showcase neck"
    "arms showcase showcase back"
    "waist showcase showcase shoulders"
    "wrist1 showcase showcase wrist2"
    "legs finger1 finger2 feet"
    "any1 hands any2 charm"
    "primary secondary range ammo";
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 380px;
  background: rgba(12, 15, 20, 0.95);
  border: 1px solid rgba(184, 151, 90, 0.25);
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.eq-placeholder {
  display: flex;
  justify-content: center;
  align-items: start;
  overflow-y: auto;
  max-height: calc(100vh - 145px);
  scrollbar-width: thin;
  scrollbar-color: rgba(184,151,90,0.2) transparent;
}

.eq-center-showcase {
  grid-area: showcase;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(184, 151, 90, 0.08) 0%, rgba(0, 0, 0, 0.6) 100%);
  border: 1px solid rgba(184, 151, 90, 0.12);
  border-radius: 4px;
  font-size: 3.5rem;
  color: rgba(184, 151, 90, 0.25);
  text-shadow: 0 0 15px rgba(184, 151, 90, 0.15);
  transition: all var(--transition-normal);
}

#equipmentGridContainer:hover .eq-center-showcase {
  border-color: rgba(184, 151, 90, 0.3);
  color: rgba(184, 151, 90, 0.4);
}

/* Slots spacing overrides */
#equipmentGridContainer .slot-container {
  margin: 0;
}

.slot-container[data-slot="Charm"] {
  grid-area: charm;
}

/* Right Side: Currency & Bags */
.inventory-bags-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: calc(100vh - 145px);
  scrollbar-width: thin;
  scrollbar-color: rgba(184,151,90,0.3) transparent;
  padding-right: 2px;
}

.coins-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  padding: 0;
}

.coin-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.coin-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.coin-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-weight: bold;
  font-size: 0.95rem;
  text-align: right;
  outline: none;
}

.bags-slots-grid h3, .pet-equipment-card h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(184, 151, 90, 0.1);
  padding-bottom: 4px;
}

.bag-slots-container {
  display: grid;
  grid-template-columns: repeat(2, 55px);
  grid-template-rows: repeat(4, 55px);
  gap: 2px;
}

.bag-contents-container {
  background: rgba(18, 22, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 12px;
  flex: 1;
  min-height: 250px;
}

.bag-contents-container h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bag-items-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.no-bag-selected {
  grid-column: span 5;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.85rem;
  padding: 3rem 0;
}

/* Bottom Controls */
.inventory-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(184, 151, 90, 0.1);
  padding-top: 12px;
  justify-content: flex-end;
}

/* ==================== PET TAB LAYOUT ==================== */
.pet-tab-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
}

.pet-details-card, .pet-equipment-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 6px;
  padding: 1.25rem;
}

.pet-stats-breakdown {
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.pet-stats-breakdown h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pet-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.pet-stat-row span:last-child {
  font-weight: bold;
  color: #fff;
}

.pet-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* ==================== STATS BREAKDOWN TAB ==================== */
.stats-tab-layout {
  display: flex;
  flex-direction: column;
}

.stats-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.detail-stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.combat-stats-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==================== LOADOUTS TAB LAYOUT ==================== */
.loadouts-tab-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.loadouts-list-container {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 6px;
  padding: 1rem;
}

.loadouts-table {
  width: 100%;
  border-collapse: collapse;
}

.loadouts-table th {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 2px solid rgba(184, 151, 90, 0.2);
  padding: 8px 12px;
  text-align: left;
}

.loadouts-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.loadouts-table tr:hover td {
  background: rgba(184, 151, 90, 0.03);
}

.loadouts-table tr.active td {
  background: rgba(0, 255, 102, 0.04);
  color: var(--green-neon);
  font-weight: bold;
}

.loadouts-bottom-grid {
  display: grid;
  grid-template-columns: 380px 1fr 300px;
  gap: 1.5rem;
  align-items: start;
}

.loadouts-controls-card, .class-levels-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 6px;
  padding: 1.25rem;
}

.swapping-status {
  margin-top: 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  align-items: center;
}

.swapping-status .status-label {
  color: var(--text-muted);
}

.swapping-status .status-val {
  font-weight: bold;
  color: var(--red-neon);
}

.class-levels-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.class-level-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  font-size: 0.85rem;
  border-radius: 4px;
  background: rgba(0,0,0,0.15);
  border: 1px solid transparent;
}

.class-level-row.active {
  background: rgba(184, 151, 90, 0.1);
  border-color: rgba(184, 151, 90, 0.3);
  color: var(--gold-light);
}

.class-level-input {
  width: 50px;
  background: #080a0c;
  border: 1px solid #242a33;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 2px;
  font-weight: bold;
}

/* ==================== STORAGE TAB LAYOUT ==================== */
.storage-tab-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.storage-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid rgba(184, 151, 90, 0.15);
  padding-bottom: 8px;
}

.storage-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.storage-tab-btn:hover {
  color: var(--gold-light);
}

.storage-tab-btn.active {
  background: rgba(184, 151, 90, 0.15);
  border-color: rgba(184, 151, 90, 0.3);
  color: var(--gold-light);
}

.storage-panel {
  display: none;
}

.storage-panel.active {
  display: block;
}

.hoard-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  background: rgba(12, 15, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
}

.depot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.depot-header input {
  background: #0d1013;
  border: 1px solid #242a33;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  outline: none;
  font-size: 0.85rem;
  width: 250px;
}

.depot-header input:focus {
  border-color: var(--gold-primary);
}

/* ==================== SELECTOR UPGRADE ELEMENT ==================== */
.selector-upgrade-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.selector-upgrade-selector label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.selector-upgrade-selector select {
  background: #0d1013;
  border: 1px solid #242a33;
  color: #fff;
  padding: 4px;
  border-radius: 4px;
  font-weight: bold;
}

/* Modals scrolling fix */
.scrollable-modal {
  max-height: 90vh;
  overflow-y: auto;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .inventory-tab-layout {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
    justify-items: center;
  }
  .char-stats-sidebar, .inventory-bags-sidebar {
    width: 100%;
    max-width: 450px;
    max-height: none;
    overflow: visible;
  }
  .eq-placeholder {
    max-height: none;
    overflow: visible;
  }
  .loadouts-bottom-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .class-levels-card, .loadouts-controls-card {
    width: 100%;
    max-width: 450px;
  }
  .stats-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .pet-tab-layout {
    grid-template-columns: 1fr;
  }
  .pet-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hoard-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ==================== ADJUST LOADOUT MODAL STYLE ==================== */
.adjust-loadout-content {
  max-width: 900px;
  width: 95%;
  background: #090c10;
  border: 1px solid rgba(184, 151, 90, 0.25);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(184, 151, 90, 0.05);
}

.modal-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.adjust-loadout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 10px;
}

.loadout-left-column, .loadout-right-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.adjust-loadout-card {
  background: rgba(12, 15, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-title-gold {
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  text-align: center;
  border-bottom: 1px solid rgba(184, 151, 90, 0.2);
  padding-bottom: 6px;
  margin-bottom: 6px;
  letter-spacing: 2px;
}

/* Race & Class grid systems */
.eql-grid {
  display: grid;
  gap: 6px;
  justify-content: center;
  align-content: center;
}

.race-grid {
  grid-template-columns: repeat(4, 1fr);
  max-width: 340px;
  margin: 0 auto;
}

.class-grid {
  grid-template-columns: repeat(4, 1fr);
  max-width: 340px;
  margin: 0 auto;
}

.eql-grid-item {
  aspect-ratio: 1;
  background: #10141d;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
}

.eql-grid-item:hover {
  border-color: rgba(184, 151, 90, 0.5);
  box-shadow: 0 0 10px rgba(184, 151, 90, 0.15);
  background: rgba(184, 151, 90, 0.03);
}

.eql-grid-item.selected {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 12px rgba(184, 151, 90, 0.3) !important;
  background: rgba(184, 151, 90, 0.08) !important;
  z-index: 2;
}

.eql-grid-item.disabled {
  filter: grayscale(1) opacity(0.25) !important;
  cursor: not-allowed !important;
  border-color: transparent !important;
  pointer-events: none;
}

.eql-grid-item .item-avatar {
  font-size: 1.5rem;
}

.eql-grid-item .item-lbl {
  font-size: 0.55rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 2px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

.eql-grid-item.selected .item-lbl {
  color: var(--gold-light);
  font-weight: 600;
}

.status-msg {
  font-size: 0.8rem;
  font-weight: bold;
  text-align: center;
  padding: 4px;
  border-radius: 4px;
  margin-top: 4px;
}

.status-msg.select-race-status, .status-msg.select-class-status {
  color: #ef4444; /* red indicator */
}

.status-msg.valid {
  color: var(--gold-light) !important;
}

/* Base Stats Preview */
.adjust-base-stats-card {
  background: rgba(12, 15, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  padding: 12px;
}

.adjust-base-stats-card h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: center;
}

.adjust-stats-table {
  width: 100%;
  border-collapse: collapse;
}

.adjust-stats-table td {
  padding: 4px 8px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.adjust-stats-table tr:last-child td {
  border-bottom: none;
}

.stat-val-cell {
  text-align: right;
  font-weight: bold;
  color: #fff;
}

/* Adjust class tabs */
.adjust-class-tabs {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 6px;
}

.adjust-class-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.adjust-class-tab-btn.active {
  color: var(--gold-light);
  border-bottom: 2px solid var(--gold-primary);
}

/* Form Dropdowns Card */
.adjust-dropdowns-card {
  background: rgba(12, 15, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adjust-dropdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adjust-dropdown-row label {
  font-size: 0.85rem;
  color: var(--text-muted);
  width: 70px;
}

.eql-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #0c0f12;
  border: 1px solid rgba(184, 151, 90, 0.3);
  color: var(--text-primary);
  padding: 0.5rem 2.2rem 0.5rem 0.75rem;
  border-radius: 4px;
  outline: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b8975a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.eql-select:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.eql-select option {
  background-color: #0c0f12;
  color: var(--text-primary);
}

.adjust-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.adjust-checkbox-row label {
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
}

/* Disabled UI Diagonal Line Effect */
.disabled-label-diagonal {
  position: relative;
  color: var(--text-muted) !important;
  text-decoration: line-through;
  text-decoration-color: #ef4444;
}

/* Reclamation Token bypass */
.reclamation-token-bypass-card {
  margin-top: 8px;
  padding: 10px;
  background: rgba(184, 151, 90, 0.05);
  border: 1px dashed rgba(184, 151, 90, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reclamation-token-bypass-card label {
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ==================== ALTERNATE CURRENCY STORAGE PANEL ==================== */
.currency-storage-layout {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 8px;
}

.currency-list-container {
  max-height: 250px;
  overflow-y: auto;
  background: rgba(12, 15, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.currency-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.currency-table th {
  background: #1a222c;
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(184, 151, 90, 0.15);
}

.currency-table td {
  padding: 8px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: #fff;
  cursor: pointer;
}

.currency-table tbody tr:hover td {
  background: rgba(184, 151, 90, 0.04);
}

.currency-table tbody tr.selected td {
  background: rgba(184, 151, 90, 0.1) !important;
  color: var(--gold-light) !important;
  font-weight: 600;
}

.currency-bottom-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: rgba(10, 12, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  padding: 15px;
}

.currency-description-box {
  background: #06080b;
  border: 1px solid #1c222c;
  border-radius: 4px;
  padding: 10px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.desc-text-max {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.desc-text-main {
  font-size: 0.85rem;
  color: #fff;
}

.currency-controls {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.show-currencies-chk {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.show-currencies-chk input[type="checkbox"] {
  accent-color: var(--gold-primary);
}

.currency-action-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ==================== EQL STATS TAB LAYOUT ==================== */
.stats-eql-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stats-eql-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stats-group {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 6px;
  padding: 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

.stats-section-header {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #5d99ff;
  border-bottom: 1px solid rgba(93, 153, 255, 0.25);
  padding-bottom: 0.35rem;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.stats-bottom-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem;
}

.white-text {
  color: #ffffff !important;
  text-shadow: none !important;
}

.gold-text {
  color: #ffd700 !important;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

/* ==================== EQL PET TAB LAYOUT ==================== */
.pet-tab-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.2fr;
  gap: 1.5rem;
  align-items: start;
  background: var(--card-bg);
  border: 1px solid rgba(184, 151, 90, 0.3);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.pet-eql-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pet-identity-card, .pet-stats-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.pet-identity-card h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 1rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(184, 151, 90, 0.15);
  padding-bottom: 0.5rem;
}

.pet-stats-card h4 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 1rem;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(184, 151, 90, 0.15);
  padding-bottom: 0.5rem;
}

.pet-subsection-header {
  font-family: 'Cinzel', serif;
  color: #5d99ff;
  font-size: 0.85rem;
  margin: 1.1rem 0 0.5rem 0;
  border-bottom: 1px solid rgba(93, 153, 255, 0.2);
  padding-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pet-eql-center h3, .pet-eql-right h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold-light);
  font-size: 1.1rem;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(184, 151, 90, 0.15);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.pet-eql-inventory-grid {
  display: grid;
  grid-template-columns: repeat(2, 55px);
  grid-template-rows: repeat(3, 55px);
  gap: 2px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.pet-slot-container {
  position: relative;
  width: 55px;
  height: 55px;
}

.pet-slot {
  width: 55px;
  height: 55px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(184, 151, 90, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  font-size: 1.5rem;
  z-index: 1;
}

.pet-slot.empty:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 8px var(--gold-glow);
}

.pet-slot.filled:hover {
  box-shadow: 0 0 10px var(--rarity-glow);
}

.pet-slot .slot-hover-text {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 10;
  bottom: auto;
  white-space: nowrap;
  overflow: visible;
}

.pet-slot .slot-icon {
  pointer-events: none;
}

.pet-player-bags-grid {
  display: grid;
  grid-template-columns: repeat(2, 55px);
  grid-template-rows: repeat(4, 55px);
  gap: 2px;
  margin-bottom: 1rem;
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
}

.pet-bag-contents-container {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 6px;
  padding: 1.25rem;
  min-height: 180px;
}

.pet-bag-contents-container h4 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  padding-bottom: 0.4rem;
  color: #fff;
  font-weight: 600;
}

.pet-bag-items-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

/* ==================== ACTIONS WINDOW & RITUALS ==================== */
.actions-modal-content {
  max-width: 750px !important;
  background: #0f1217;
  border: 1px solid rgba(184, 151, 90, 0.35) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(184, 151, 90, 0.1) !important;
}

.actions-tabs-bar {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid rgba(184, 151, 90, 0.2);
  padding-bottom: 0.5rem;
}

.actions-tab-btn {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(184, 151, 90, 0.15);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.5px;
}

.actions-tab-btn:hover {
  color: #fff;
  border-color: rgba(184, 151, 90, 0.4);
}

.actions-tab-btn.active {
  background: #0f1217;
  color: var(--gold-light);
  border-bottom-color: #0f1217;
  font-weight: 600;
  border-color: rgba(184, 151, 90, 0.4) rgba(184, 151, 90, 0.4) transparent rgba(184, 151, 90, 0.4);
  transform: translateY(1px);
}

.actions-tab-panels {
  position: relative;
  min-height: 380px;
}

.actions-panel {
  display: none;
}

.actions-panel.active {
  display: block;
}

.actions-placeholder {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 5rem;
  font-size: 0.9rem;
}

.rituals-filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rituals-filter-bar select, .rituals-filter-bar input {
  background: #06080a;
  border: 1px solid #242a33;
  color: #fff;
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  outline: none;
  font-size: 0.85rem;
}

.rituals-filter-bar select:focus, .rituals-filter-bar input:focus {
  border-color: var(--gold-primary);
}

.rituals-filter-bar input {
  flex-grow: 1;
}

.rituals-table-container {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid rgba(184, 151, 90, 0.15);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}

.rituals-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
  color: #fff;
}

.rituals-table th, .rituals-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.rituals-table th {
  background: rgba(0, 0, 0, 0.4);
  color: var(--gold-light);
  font-family: 'Cinzel', serif;
  letter-spacing: 1px;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(184, 151, 90, 0.15);
  z-index: 10;
}

.rituals-table tbody tr:hover td {
  background: rgba(184, 151, 90, 0.04);
}

.spell-gem {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 1px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  padding: 0;
}

.gem-gate {
  background: #1e3a8a;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
  border: 1px solid #3b82f6;
}

.gem-druid {
  background: #064e3b;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  border: 1px solid #10b981;
}

.gem-wizard {
  background: #581c87;
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
  border: 1px solid #8b5cf6;
}

.gem-generic {
  background: #1e293b;
  box-shadow: 0 0 8px rgba(100, 116, 139, 0.6);
  border: 1px solid #64748b;
}

/* ==================== CLEANED GEAR GRID LAYOUT ==================== */
#equipmentGridContainer {
  display: grid;
  grid-template-areas:
    "ear1 head face ear2"
    "chest showcase showcase neck"
    "arms showcase showcase back"
    "waist showcase showcase shoulders"
    "wrist1 showcase showcase wrist2"
    "legs finger1 finger2 feet"
    "any1 hands any2 charm"
    "primary secondary range ammo";
  grid-template-columns: repeat(4, 64px);
  grid-template-rows: repeat(8, 64px);
  gap: 6px;
  width: max-content;
  margin: 0 auto;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

#equipmentGridContainer .slot-container {
  position: relative;
  width: 64px;
  height: 64px;
}

#equipmentGridContainer .slot-label {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 10;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: visible;
  text-shadow: 1px 1px 2px #000;
}

#equipmentGridContainer .item-slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 20, 0.85);
  border: 1px solid rgba(184, 151, 90, 0.4);
  border-radius: 6px;
  padding: 0;
  position: relative;
  transition: all var(--transition-fast);
  z-index: 1;
}

#equipmentGridContainer .item-slot:hover {
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
  background: rgba(184, 151, 90, 0.1);
  cursor: pointer;
}

#equipmentGridContainer .item-slot.filled:hover {
  box-shadow: 0 0 15px var(--rarity-glow);
}

#equipmentGridContainer .item-slot .slot-icon {
  font-size: 2rem;
  margin: 0;
}

#equipmentGridContainer .item-slot .item-name {
  display: none !important;
}

.eq-center-showcase {
  grid-area: showcase;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(184, 151, 90, 0.15) 0%, rgba(0, 0, 0, 0.85) 100%);
  border: 2px solid rgba(184, 151, 90, 0.5);
  border-radius: 8px;
  font-size: 4rem;
  color: rgba(184, 151, 90, 0.5);
  text-shadow: 0 0 15px rgba(184, 151, 90, 0.3);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.9), 0 5px 15px rgba(0,0,0,0.5);
}


/* Era badge colour variants */
.db-era-badge.era-classic { background: rgba(156,163,175,0.15); color: #d1d5db; border-color: rgba(156,163,175,0.3); }
.db-era-badge.era-kunark  { background: rgba(239,68,68,0.15);   color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.db-era-badge.era-velious { background: rgba(59,130,246,0.15);  color: #93c5fd; border-color: rgba(59,130,246,0.3); }

@media (max-width: 600px) {
  .db-category-bar { gap: 0.35rem; }
  .db-cat-chip { font-size: 0.72rem; padding: 0.28rem 0.6rem; }
}


/* =====================================================
   TWITCH STREAM PANEL  (R4 + R6)
   Fixed to bottom-right. Slides off-screen when hidden
   but iframe stays in DOM so the stream keeps playing.
   ===================================================== */

.twitch-panel {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 320px;
  z-index: 1200;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
  filter: drop-shadow(-4px 0 24px rgba(100, 65, 165, 0.35));
}

/* Collapsed = slide fully off the right edge (panel inner only) */
.twitch-panel.collapsed {
  transform: translateX(320px);
}

/* The hide tab is FIXED so it always stays visible on screen edge */
.twitch-hide-tab {
  position: fixed;
  bottom: 120px;
  right: 320px;
  width: 28px;
  height: 60px;
  background: linear-gradient(180deg, #6441a5 0%, #4b2d8e 100%);
  border: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  transition: background 0.2s, right 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
  box-shadow: -3px 0 12px rgba(100, 65, 165, 0.5);
  z-index: 1201;
}
.twitch-hide-tab:hover {
  background: linear-gradient(180deg, #7c5cbf 0%, #5d3ea0 100%);
  box-shadow: -4px 0 18px rgba(100, 65, 165, 0.7);
}

/* When panel is collapsed, tab moves to screen edge */
.twitch-panel.collapsed ~ * .twitch-hide-tab,
body.twitch-collapsed .twitch-hide-tab {
  right: 0;
}

.twitch-hide-icon {
  transition: transform 0.4s;
  display: block;
  line-height: 1;
}

/* Inner panel wrapper */
.twitch-panel-inner {
  background: #0e0e10;
  border: 1px solid rgba(100, 65, 165, 0.5);
  border-bottom: none;
  border-right: none;
  border-radius: 10px 0 0 0;
  overflow: hidden;
  /* Animated border glow on top */
  box-shadow:
    0 -2px 0 0 #6441a5,
    inset 0 0 40px rgba(100, 65, 165, 0.05);
}

/* Glowing purple top border animation */
.twitch-panel-inner::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, #6441a5, #a78bfa, #6441a5, transparent);
  background-size: 200% 100%;
  animation: twitch-glow-sweep 3s linear infinite;
}

@keyframes twitch-glow-sweep {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Header bar */
.twitch-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, rgba(100,65,165,0.25) 0%, rgba(30,15,60,0.8) 100%);
  border-bottom: 1px solid rgba(100, 65, 165, 0.3);
  gap: 0.5rem;
}

.twitch-panel-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

/* Pulsing live dot */
.twitch-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #eb0400;
  flex-shrink: 0;
  box-shadow: 0 0 6px #eb0400;
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #eb0400; }
  50%       { opacity: 0.6; box-shadow: 0 0 12px #eb0400; }
}

.twitch-live-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #eb0400;
  font-family: 'Inter', sans-serif;
}

.twitch-channel-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e0d0ff;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.twitch-panel-header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Donate button */
.twitch-donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: 1px solid rgba(245,158,11,0.4);
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.twitch-donate-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 0 10px rgba(245,158,11,0.4);
  transform: translateY(-1px);
}

/* Open on Twitch button */
.twitch-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(100, 65, 165, 0.35);
  color: #c9b8f4;
  border: 1px solid rgba(100, 65, 165, 0.5);
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.twitch-open-btn:hover {
  background: rgba(100, 65, 165, 0.6);
  color: #fff;
  box-shadow: 0 0 10px rgba(100,65,165,0.4);
  transform: translateY(-1px);
}

/* Embed container - 16:9 aspect ratio */
.twitch-panel-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.twitch-panel-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* When panel is collapsed, move iframe far off screen
   but keep it in the DOM to maintain the viewer count */
.twitch-panel.collapsed .twitch-panel-embed iframe {
  position: fixed;
  top: -9999px;
  left: -9999px;
  width: 1px;
  height: 1px;
  visibility: visible;
  pointer-events: none;
}

/* Site-level donate button in header */
.site-donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(217,119,6,0.1) 100%);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.35);
  transition: all 0.2s ease;
}
.site-donate-btn:hover {
  background: linear-gradient(135deg, rgba(245,158,11,0.28) 0%, rgba(217,119,6,0.22) 100%);
  border-color: rgba(245,158,11,0.7);
  color: #fbbf24;
  box-shadow: 0 0 14px rgba(245,158,11,0.25);
  transform: translateY(-1px);
}

/* ===== ACCOUNT TAB ===== */
.account-page { max-width: 680px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.account-section { display: flex; flex-direction: column; gap: 1.5rem; }
.account-section.hidden { display: none; }

/* Hero (logged out) */
.account-hero { text-align: center; padding: 2.5rem 1rem 1rem; }
.account-hero-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.account-hero-title { font-family: 'Cinzel', serif; font-size: 1.6rem; color: #e2e8f0; margin: 0 0 0.6rem; }
.account-hero-sub { color: #64748b; font-size: 0.9rem; max-width: 420px; margin: 0 auto; line-height: 1.6; }

/* Login buttons */
.account-login-btns { display: flex; flex-direction: column; gap: 0.75rem; max-width: 340px; margin: 0 auto; }
.account-login-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem; border-radius: 10px; font-size: 0.95rem; font-weight: 700;
  text-decoration: none; font-family: 'Inter', sans-serif; transition: all 0.2s;
  border: 1px solid transparent;
}
.twitch-login-btn {
  background: #6441a5; color: #fff;
  border-color: rgba(100,65,165,0.5);
}
.twitch-login-btn:hover { background: #7c5cbf; box-shadow: 0 0 20px rgba(100,65,165,0.4); transform: translateY(-2px); }
.google-login-btn {
  background: rgba(255,255,255,0.06); color: #e2e8f0;
  border-color: rgba(255,255,255,0.12);
}
.google-login-btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.account-terms { text-align: center; font-size: 0.75rem; color: #334155; max-width: 380px; margin: 0 auto; line-height: 1.5; }

/* Profile header (logged in) */
.account-profile-header {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 1.25rem 1.5rem;
}
.account-avatar { font-size: 2.8rem; flex-shrink: 0; }
.account-profile-info { flex: 1; }
.account-username { font-size: 1.2rem; font-weight: 700; color: #e2e8f0; font-family: 'Inter', sans-serif; margin-bottom: 0.35rem; }
.account-tier-row { display: flex; align-items: center; gap: 0.5rem; }
.account-tier-badge {
  padding: 2px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.08em; font-family: 'Inter', sans-serif;
  background: rgba(71,85,105,0.5); color: #94a3b8; border: 1px solid rgba(71,85,105,0.4);
}
.account-tier-badge.premium { background: rgba(245,158,11,0.2); color: #f59e0b; border-color: rgba(245,158,11,0.4); }
.account-sub-badge { font-size: 0.75rem; color: #c4b5fd; font-family: 'Inter', sans-serif; }
.account-sub-badge.hidden { display: none; }
.account-logout-btn {
  margin-left: auto; padding: 6px 14px; border-radius: 8px;
  font-size: 0.8rem; font-weight: 600; text-decoration: none;
  color: #ef4444; border: 1px solid rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.08); transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.account-logout-btn:hover { background: rgba(239,68,68,0.18); }

/* Stats row */
.account-stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.account-stat-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: 1rem; text-align: center;
}
.account-stat-value { font-size: 1.3rem; font-weight: 800; color: #a78bfa; font-family: 'Inter', sans-serif; }
.account-stat-label { font-size: 0.72rem; color: #64748b; margin-top: 0.25rem; font-family: 'Inter', sans-serif; }

/* Account cards */
.account-card {
  background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 1.5rem;
}
.account-card-title { font-family: 'Cinzel', serif; font-size: 1rem; color: #cbd5e1; margin: 0 0 0.5rem; }
.account-card-desc { font-size: 0.85rem; color: #64748b; margin: 0 0 1rem; line-height: 1.6; font-family: 'Inter', sans-serif; }
.account-card-actions { display: flex; flex-direction: column; gap: 0.75rem; }

/* Share URL row */
.share-url-row { display: flex; gap: 0.5rem; align-items: center; }
.share-url-row.hidden { display: none; }
.share-url-input {
  flex: 1; padding: 0.5rem 0.75rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.3);
  color: #e2e8f0; font-size: 0.82rem; font-family: 'Inter', sans-serif;
}

/* Sub discount tag */
.sub-discount-row { margin-bottom: 0.5rem; }
.sub-discount-row.hidden { display: none; }
.sub-discount-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(100,65,165,0.15); border: 1px solid rgba(100,65,165,0.35);
  color: #c4b5fd; padding: 5px 12px; border-radius: 20px;
  font-size: 0.8rem; font-weight: 700; font-family: 'Inter', sans-serif;
}

/* --- Forced Login Overlay --- */
.forced-login-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: radial-gradient(circle, rgba(13,19,32,0.98) 0%, rgba(5,8,14,0.99) 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s ease, visibility 0.5s;
}
.forced-login-overlay.hidden {
  opacity: 0; visibility: hidden; pointer-events: none;
}
.login-modal-card {
  background: rgba(18, 26, 42, 0.95);
  border: 1px solid rgba(184, 151, 90, 0.35);
  border-radius: 16px;
  padding: 3rem 2rem;
  max-width: 480px; width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 40px rgba(184, 151, 90, 0.05);
}
.login-card-header h2 {
  font-family: 'Cinzel', serif; font-size: 1.2rem; color: #94a3b8; letter-spacing: 0.2em; margin: 0;
}
.login-card-header h1 {
  font-family: 'Cinzel', serif; font-size: 3rem; color: #f59e0b; font-weight: 900; margin: 0.5rem 0 1rem;
  text-shadow: 0 0 30px rgba(245,158,11,0.25);
}
.login-card-header p {
  color: #64748b; font-size: 0.9rem; margin-bottom: 2rem; line-height: 1.5;
}
.login-req-note {
  color: #94a3b8; font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.5;
}
.login-actions {
  display: flex; flex-direction: column; gap: 1rem;
}
.btn-login {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 0.9rem; border-radius: 8px; font-weight: 700; text-decoration: none;
  font-family: 'Inter', sans-serif; transition: all 0.2s; font-size: 1rem;
}
.btn-login.twitch-login { background: #6441a5; color: #fff; }
.btn-login.twitch-login:hover { background: #7753c2; box-shadow: 0 0 15px rgba(100,65,165,0.4); transform: translateY(-1px); }
.btn-login.google-login { background: #fff; color: #1e293b; border: 1px solid #cbd5e1; }
.btn-login.google-login:hover { background: #f8fafc; box-shadow: 0 0 15px rgba(255,255,255,0.1); transform: translateY(-1px); }

.login-card-footer {
  margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 1.5rem;
}
.login-card-footer p {
  color: #475569; font-size: 0.8rem; line-height: 1.4;
}

/* --- Notification Toast --- */
.login-toast {
  position: fixed; top: 24px; right: 24px;
  background: #10b981; color: #fff;
  padding: 12px 24px; border-radius: 8px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  font-weight: 600; font-family: 'Inter', sans-serif;
  z-index: 11000; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.login-toast.hidden {
  opacity: 0; transform: translateY(-20px); pointer-events: none;
}
.toast-icon {
  font-size: 1.2rem; background: rgba(255,255,255,0.25);
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* --- Community Forum styles --- */
.forum-container { max-width: 1000px; margin: 0 auto; padding: 20px 0; color: #e2e8f0; text-align: left; }
.forum-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; border-bottom: 1px solid rgba(184, 151, 90, 0.2); padding-bottom: 1rem; }
.forum-title h1 { font-family: 'Cinzel', serif; color: #f59e0b; margin: 0; font-size: 2.2rem; text-shadow: 0 0 15px rgba(245,158,11,0.2); }
.forum-title p { color: #64748b; font-size: 0.95rem; margin: 4px 0 0; }
.forum-actions { display: flex; gap: 10px; }
.btn-gold { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; border: none; font-weight: bold; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-family: 'Inter', sans-serif; }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,0.3); }

.forum-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; }
.forum-sidebar { background: rgba(13,19,31,0.6); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 15px; height: fit-content; }
.sidebar-title { font-family: 'Cinzel', serif; font-size: 0.9rem; color: #94a3b8; letter-spacing: 0.1em; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 4px; }
.forum-nav { display: flex; flex-direction: column; gap: 4px; }
.forum-nav-btn { background: none; border: none; color: #94a3b8; text-align: left; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-family: 'Inter', sans-serif; font-size: 0.88rem; transition: all 0.15s; }
.forum-nav-btn:hover { background: rgba(255,255,255,0.03); color: #fff; }
.forum-nav-btn.active { background: rgba(184, 151, 90, 0.15); color: #f59e0b; font-weight: bold; border-left: 3px solid #f59e0b; }

.forum-main { display: flex; flex-direction: column; gap: 1rem; }
.forum-search-bar { width: 100%; display: flex; gap: 10px; margin-bottom: 1rem; }
.forum-search-input { flex: 1; background: rgba(13,19,31,0.8); border: 1px solid rgba(255,255,255,0.08); color: #fff; padding: 10px 15px; border-radius: 6px; font-family: 'Inter', sans-serif; }
.forum-search-input:focus { border-color: #f59e0b; outline: none; }

.post-card { background: rgba(13,19,31,0.7); border: 1px solid rgba(255,255,255,0.05); border-radius: 8px; padding: 1.25rem; transition: transform 0.15s, border-color 0.15s; cursor: pointer; }
.post-card:hover { transform: translateY(-2px); border-color: rgba(184, 151, 90, 0.3); background: rgba(13,19,31,0.85); }
.post-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.post-category-tag { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; font-family: 'Inter', sans-serif; }
.post-category-tag.build { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.post-category-tag.tradeskill { background: rgba(59,130,246,0.15); color: #3b82f6; border: 1px solid rgba(59,130,246,0.3); }
.post-category-tag.recruitment { background: rgba(139,92,246,0.15); color: #8b5cf6; border: 1px solid rgba(139,92,246,0.3); }
.post-category-tag.general { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.post-time { font-size: 0.75rem; color: #64748b; }
.post-card-title { font-family: 'Cinzel', serif; font-size: 1.15rem; color: #fff; margin: 4px 0 8px; }
.post-card-preview { font-size: 0.88rem; color: #94a3b8; line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,0.04); padding-top: 8px; font-size: 0.8rem; color: #64748b; }
.post-author { display: flex; align-items: center; gap: 6px; }
.post-author-avatar { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 0.65rem; }
.post-stats { display: flex; gap: 15px; }

/* --- Post View & Comment Section --- */
.post-view-container { display: flex; flex-direction: column; gap: 1.5rem; }
.post-view-main { background: rgba(13,19,31,0.85); border: 1px solid rgba(184, 151, 90, 0.25); border-radius: 12px; padding: 2rem; }
.post-view-header { border-bottom: 1px solid rgba(255,255,255,0.06); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.post-view-title { font-family: 'Cinzel', serif; font-size: 1.8rem; color: #f59e0b; margin: 8px 0; }
.post-view-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: #64748b; }
.post-view-content { font-size: 0.95rem; color: #cbd5e1; line-height: 1.6; white-space: pre-wrap; margin-bottom: 1.5rem; }
.post-view-build-link { display: inline-flex; align-items: center; gap: 8px; background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #f59e0b; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-size: 0.88rem; font-weight: bold; transition: all 0.2s; margin-top: 10px; }
.post-view-build-link:hover { background: rgba(245,158,11,0.2); }

.comments-section { background: rgba(13,19,31,0.7); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 1.5rem; }
.comments-title { font-family: 'Cinzel', serif; font-size: 1.1rem; color: #fff; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 8px; }
.comment-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.comment-item { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); border-radius: 8px; padding: 1rem; }
.comment-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: #64748b; margin-bottom: 6px; }
.comment-content { font-size: 0.9rem; color: #cbd5e1; line-height: 1.5; white-space: pre-wrap; }
.comment-form { display: flex; flex-direction: column; gap: 10px; }
.comment-textarea { background: rgba(13,19,31,0.8); border: 1px solid rgba(255,255,255,0.08); color: #fff; padding: 12px; border-radius: 6px; font-family: 'Inter', sans-serif; resize: vertical; min-height: 80px; }
.comment-textarea:focus { border-color: #f59e0b; outline: none; }

/* --- Post Creation Form --- */
.post-create-container { background: rgba(13,19,31,0.85); border: 1px solid rgba(184, 151, 90, 0.25); border-radius: 12px; padding: 2rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1.25rem; }
.form-group label { font-size: 0.88rem; font-weight: bold; color: #94a3b8; }
.form-control-input { background: rgba(13,19,31,0.8); border: 1px solid rgba(255,255,255,0.08); color: #fff; padding: 10px; border-radius: 6px; font-family: 'Inter', sans-serif; }
.form-control-input:focus { border-color: #f59e0b; outline: none; }
