:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d111a;
  --bg-card: rgba(14, 18, 28, 0.72);
  --bg-card-hover: rgba(20, 26, 40, 0.85);
  --theme-accent: #00f2fe;
  --theme-glow: rgba(0, 242, 254, 0.35);
  --theme-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
  --theme-glow-strong: rgba(0, 198, 255, 0.6);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 242, 254, 0.4);
  --danger: #ef4444;
}

/* Color Themes */
body[data-theme="emerald"] {
  --theme-accent: #10b981;
  --theme-glow: rgba(16, 185, 129, 0.35);
  --theme-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
  --theme-glow-strong: rgba(16, 185, 129, 0.6);
}
body[data-theme="diamond"] {
  --theme-accent: #06b6d4;
  --theme-glow: rgba(6, 182, 212, 0.35);
  --theme-gradient: linear-gradient(135deg, #0891b2 0%, #06b6d4 100%);
  --theme-glow-strong: rgba(6, 182, 212, 0.6);
}
body[data-theme="amethyst"] {
  --theme-accent: #a855f7;
  --theme-glow: rgba(168, 85, 247, 0.35);
  --theme-gradient: linear-gradient(135deg, #7e22ce 0%, #a855f7 100%);
  --theme-glow-strong: rgba(168, 85, 247, 0.6);
}
body[data-theme="redstone"] {
  --theme-accent: #f43f5e;
  --theme-glow: rgba(244, 63, 94, 0.35);
  --theme-gradient: linear-gradient(135deg, #be123c 0%, #f43f5e 100%);
  --theme-glow-strong: rgba(244, 63, 94, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Khmer", "Noto Sans Khmer UI", "Khmer OS Content", "Khmer OS Siemreap", "Helvetica Neue", Arial, sans-serif;
}

html {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 80% 10%, rgba(0, 198, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 20% 90%, rgba(126, 34, 206, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #07090e 0%, #040609 100%);
  color: var(--text-main);
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  position: relative;
}

/* Ambient Canvas Background */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--theme-accent);
}

/* Sidebar Navigation (Ultra-Sleek Glass Dock) */
.app-sidebar {
  width: 76px;
  height: 100%;
  background: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 4px;
  position: relative;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
}

.app-sidebar::-webkit-scrollbar {
  display: none;
}

.brand-badge-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  cursor: pointer;
  z-index: 1001;
}

.brand-badge {
  width: 50px;
  height: 50px;
  background: var(--theme-gradient);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--theme-glow);
  margin-bottom: 0;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  overflow: hidden;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.brand-badge:hover {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 0 0 28px var(--theme-glow-strong);
}

.brand-badge-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  pointer-events: auto;
}

.badge-tooltip {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-8px);
  background: rgba(10, 14, 22, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid var(--theme-accent);
  box-shadow: 0 4px 24px var(--theme-glow-strong);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 7px 16px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  z-index: 99999;
}

.badge-tooltip::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(10, 14, 22, 0.98);
  border-left: 1px solid var(--theme-accent);
  border-bottom: 1px solid var(--theme-accent);
}

.brand-badge-container:hover .badge-tooltip,
.brand-badge-container.is-hovered .badge-tooltip,
.brand-badge:hover ~ .badge-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(-50%) translateX(0) !important;
}

.nav-item {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  gap: 3px;
}

.nav-item .nav-svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  transform: translateY(-2px);
}

.nav-item:hover .nav-svg {
  stroke: var(--theme-accent);
  filter: drop-shadow(0 0 8px var(--theme-glow));
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--theme-accent);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px var(--theme-glow);
}

.nav-item.active .nav-svg {
  stroke: var(--theme-accent);
  filter: drop-shadow(0 0 10px var(--theme-glow-strong));
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  width: 4px;
  height: 28px;
  background: var(--theme-accent);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--theme-accent);
}

/* Modern Vector Icon Utilities */
.ui-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.mini-icon {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.feature-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.feature-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Main App Wrapper */
.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(10, 13, 22, 0.65);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.brand-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, #ffffff 40%, var(--theme-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pro-badge {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--theme-accent);
  border: 1px solid var(--border-color);
  font-weight: 800;
  letter-spacing: 0.8px;
}

.header-buttons {
  display: flex;
  gap: 10px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--theme-accent);
  transform: translateY(-1px);
}

/* Tabs Content Container */
.tab-content {
  flex: 1;
  padding: 16px 24px;
  overflow-y: auto;
  display: none;
}

.tab-content.active {
  display: block;
}

/* Grid Layout for Play Tab */
.play-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}

/* Modern Glass Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

/* Hero Player Showcase */
.profile-card-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.skin-3d-box {
  width: 104px;
  height: 138px;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08), #07090e);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 0, 0, 0.5);
  position: relative;
  cursor: grab;
  user-select: none;
}

.skin-3d-box:active {
  cursor: grabbing;
}

#skin-3d-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.skin-rotate-hint {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 800;
  color: var(--theme-accent, #00ff88);
  cursor: pointer;
  opacity: 0.8;
  backdrop-filter: blur(4px);
  z-index: 5;
  transition: all 0.2s ease;
}

.skin-rotate-hint:hover {
  opacity: 1;
  transform: scale(1.05);
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--theme-accent, #00ff88);
}

.skin-rotate-hint.paused {
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.1);
}

.skin-3d-box::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 60px;
  height: 12px;
  background: var(--theme-accent);
  filter: blur(8px);
  opacity: 0.4;
  border-radius: 50%;
  pointer-events: none;
}

.skin-3d-box img {
  height: 115px;
  image-rendering: pixelated;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.skin-3d-box:hover img {
  transform: scale(1.1) translateY(-2px);
}

.profile-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-select-row {
  display: flex;
  gap: 8px;
}

/* Custom Styled Inputs & Dropdowns (No more white boxes!) */
.input-box,
input.input-box,
select.input-box {
  width: 100%;
  padding: 11px 16px;
  background-color: #0b0f19 !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

select.input-box {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394a3b8'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 20px !important;
  padding-right: 40px !important;
  cursor: pointer;
}

select.input-box option {
  background-color: #0b0f19 !important;
  color: #f8fafc !important;
  padding: 10px;
}

.input-box:focus {
  border-color: var(--theme-accent) !important;
  box-shadow: 0 0 14px var(--theme-glow), inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Modpack Banner Card */
.modpack-card {
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: linear-gradient(135deg, rgba(14, 18, 28, 0.85) 0%, rgba(26, 16, 48, 0.5) 100%);
  position: relative;
  overflow: hidden;
}

.modpack-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--theme-accent), #a855f7, #38bdf8);
}

.status-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.3px;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.status-disabled {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.status-notinstalled {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.btn-action-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
}

.btn-action-small:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--theme-accent);
  transform: translateY(-1px);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.12); transition: .3s; border-radius: 26px;
}
.switch-slider:before {
  position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px;
  background-color: white; transition: .3s; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
input:checked + .switch-slider { background: var(--theme-gradient); }
input:checked + .switch-slider:before { transform: translateX(22px); }

/* Launch Bar (Satisfying, Glowing Action Deck) */
.launch-bar {
  padding: 12px 24px;
  background: rgba(8, 11, 18, 0.9);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.launch-btn-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.status-label-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--theme-accent);
  box-shadow: 0 0 10px var(--theme-accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 var(--theme-glow-strong); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(0, 0, 0, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.status-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-launch {
  flex: 1;
  max-width: 270px;
  padding: 15px 32px;
  background: var(--theme-gradient);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.8px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 24px var(--theme-glow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.btn-launch::after {
  content: "";
  position: absolute;
  top: -50%; left: -60%; width: 200%; height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(25deg);
  animation: btnShimmer 4s infinite;
}

@keyframes btnShimmer {
  0% { transform: translateX(-100%) rotate(25deg); }
  20% { transform: translateX(100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

.btn-launch:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 32px var(--theme-glow-strong);
}

.btn-launch:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-launch:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.progress-track {
  width: 100%; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; display: none;
}
.progress-fill {
  width: 0%; height: 100%; background: var(--theme-gradient); transition: width 0.3s;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.gallery-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--theme-accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.gallery-thumb {
  width: 100%;
  height: 135px;
  object-fit: cover;
  display: block;
}

.gallery-info {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.btn-delete-ss {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 15px;
  padding: 3px 6px;
  border-radius: 6px;
  transition: background 0.2s;
}
.btn-delete-ss:hover { background: rgba(239, 68, 68, 0.15); }

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.lightbox-modal.active { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* World Backups List */
.worlds-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.world-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  transition: border-color 0.2s;
}

.world-card-row:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.world-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.world-icon-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #090c12;
  image-rendering: pixelated;
  border: 1px solid var(--border-color);
}

/* Theme Picker Swatches */
.theme-swatches {
  display: flex;
  gap: 16px;
  margin-top: 14px;
}

.theme-swatch {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.theme-swatch:hover { 
  transform: scale(1.1); 
}

.theme-swatch.active { 
  border-color: #ffffff; 
  box-shadow: 0 0 20px currentColor; 
}

.swatch-check {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-swatch.active .swatch-check {
  opacity: 1;
  transform: scale(1);
}

.swatch-emerald { background: #10b981; color: #10b981; }
.swatch-diamond { background: #06b6d4; color: #06b6d4; }
.swatch-amethyst { background: #a855f7; color: #a855f7; }
.swatch-redstone { background: #f43f5e; color: #f43f5e; }

/* Server Ping Widget */
.ping-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}
.ping-online { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.ping-offline { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.ping-checking { background: rgba(234, 179, 8, 0.2); color: #facc15; }

/* Cards with Line Theme */
.card-line-theme,
.direct-server-card {
  border: 1px solid var(--theme-glow);
  background: linear-gradient(135deg, rgba(10, 14, 24, 0.85) 0%, rgba(18, 26, 42, 0.6) 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.card-line-theme:hover,
.direct-server-card:hover {
  border-color: var(--theme-glow-strong);
}

.card-line-theme::before,
.direct-server-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: var(--theme-gradient);
}

.server-ip-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #070a12;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.server-ip-box:focus-within {
  border-color: var(--theme-accent);
  box-shadow: 0 0 12px var(--theme-glow);
}

.direct-ip-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 9px 0;
}

.btn-direct-launch {
  width: 100%;
  padding: 12px 18px;
  background: var(--theme-gradient);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px var(--theme-glow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-direct-launch:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px var(--theme-glow-strong);
  filter: brightness(1.1);
}

.btn-direct-launch:active {
  transform: translateY(0);
}

.btn-direct-launch:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Language Switcher Buttons */
.lang-select-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-select-btn:hover {
  border-color: var(--theme-accent);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.09);
}

.lang-select-btn.active {
  border-color: var(--theme-accent);
  color: var(--text-main);
  background: var(--theme-glow);
  box-shadow: 0 0 12px var(--theme-glow);
}

@keyframes spinIcon {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning svg {
  animation: spinIcon 0.8s linear infinite;
}

/* App Modals */
.app-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}
.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 520px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 2;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

/* Pulse animation when server is booting */
.pulse-starting {
  animation: pulseStarting 1.5s infinite;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.15) !important;
}
@keyframes pulseStarting {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* --- Crosshair Studio Styles --- */
.crosshair-studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  align-items: start;
}

.crosshair-viewport {
  height: 270px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.7);
  transition: background 0.3s ease;
}

.crosshair-viewport.bg-grass {
  background: radial-gradient(circle at center, rgba(34, 197, 94, 0.25) 0%, rgba(20, 83, 45, 0.6) 60%, #061e11 100%),
              linear-gradient(135deg, #166534 0%, #14532d 50%, #0f2e1b 100%);
}

.crosshair-viewport.bg-cave {
  background: radial-gradient(circle at center, rgba(239, 68, 68, 0.15) 0%, rgba(15, 23, 42, 0.8) 50%, #05070a 100%),
              linear-gradient(135deg, #1e293b 0%, #0f172a 60%, #090d16 100%);
}

.crosshair-viewport.bg-sky {
  background: radial-gradient(circle at top, rgba(56, 189, 248, 0.45) 0%, rgba(14, 116, 144, 0.3) 60%, #071926 100%),
              linear-gradient(180deg, #0284c7 0%, #0369a1 40%, #0c4a6e 100%);
}

.crosshair-viewport.bg-stone {
  background: radial-gradient(circle at center, rgba(148, 163, 184, 0.2) 0%, rgba(30, 41, 59, 0.8) 70%, #070a0e 100%),
              linear-gradient(135deg, #334155 0%, #1e293b 60%, #0f172a 100%);
}

/* Subtle terrain grid line in viewport */
.viewport-scenery {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.viewport-reticle-wrap {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.7));
}

.viewport-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}

.preview-bg-picker {
  display: flex;
  gap: 4px;
}

.bg-pick-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.bg-pick-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.bg-pick-btn.active {
  background: var(--theme-accent);
  color: #000;
  border-color: var(--theme-accent);
}

.badge-active-crosshair {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-active-crosshair .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* Preset Category Tabs */
.reticle-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  margin-bottom: 6px;
}

#btn-check-ping {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  white-space: nowrap !important;
}

.reticle-cat-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reticle-cat-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.reticle-cat-btn.active {
  background: var(--theme-accent);
  color: #000;
  border-color: var(--theme-accent);
}

/* Preset Cards Grid */
.crosshair-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.reticle-preset-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reticle-preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.reticle-preset-btn.active {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--theme-accent);
  box-shadow: 0 0 14px var(--theme-glow);
}

.preset-icon-box {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  white-space: nowrap;
}

/* Color List */
.crosshair-colors-list {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.reticle-color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--c);
  cursor: pointer;
  transition: all 0.15s ease;
}

.reticle-color-swatch:hover {
  transform: scale(1.12);
}

.reticle-color-swatch.active {
  border-color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 12px var(--c);
}

.custom-color-wrapper {
  position: relative;
  width: 30px;
  height: 30px;
}

.custom-color-wrapper input[type="color"] {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.custom-color-wrapper::before {
  content: "";
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
  cursor: pointer;
}

/* --- Storage Cleaner Styles --- */
.cleaner-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cleaner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  transition: background 0.15s, border-color 0.15s;
}

.cleaner-row:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.cleaner-check-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.cleaner-check-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--theme-accent);
  cursor: pointer;
}

.cleaner-row-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.cleaner-row-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cleaner-size-pill {
  font-size: 12px;
  font-weight: 800;
  font-family: monospace;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--theme-accent);
  border: 1px solid var(--border-color);
  letter-spacing: 0.5px;
}

/* --- Host & Developer Access (@nak) --- */
.btn-host-badge {
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  color: var(--accent-color, #00FF88);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-host-badge:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: var(--accent-color, #00FF88);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.host-badge-at {
  color: var(--accent-color, #00FF88);
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.host-nav-tab {
  border-left: 2px solid var(--accent-color, #00FF88) !important;
  color: var(--accent-color, #00FF88) !important;
}

/* --- Global Announcement Bar --- */
.announcement-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(0, 255, 136, 0.15) 0%, rgba(13, 17, 23, 0.95) 100%);
  border-bottom: 1px solid rgba(0, 255, 136, 0.35);
  padding: 8px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  animation: slideDown 0.3s ease;
  z-index: 99;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.announcement-content {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.announcement-tag {
  background: var(--accent-color, #00FF88);
  color: #0d1117;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.announcement-msg {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  text-shadow: 0 0 6px rgba(0, 255, 136, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  transition: color 0.2s;
}

.announcement-close:hover {
  color: #fff;
}

/* --- Host Control Panel Sections --- */
.host-section-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.host-status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.host-status-badge.online {
  background: rgba(0, 255, 136, 0.15);
  color: var(--accent-color, #00FF88);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.host-status-selector {
  display: flex;
  gap: 12px;
}

.host-status-opt {
  cursor: pointer;
}

.host-status-opt input {
  display: none;
}

.status-pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.host-status-opt input:checked + .status-pill-online {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00FF88;
  color: #00FF88;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.host-status-opt input:checked + .status-pill-maint {
  background: rgba(255, 177, 66, 0.2);
  border-color: #ffb142;
  color: #ffb142;
  box-shadow: 0 0 12px rgba(255, 177, 66, 0.3);
}

.host-status-opt input:checked + .status-pill-down {
  background: rgba(255, 71, 87, 0.2);
  border-color: #ff4757;
  color: #ff4757;
  box-shadow: 0 0 12px rgba(255, 71, 87, 0.3);
}

/* --- Maintenance Fullscreen Overlay --- */
.maintenance-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 11, 16, 0.94);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.maintenance-card {
  max-width: 440px;
  padding: 36px 30px;
  background: #0d1117;
  border: 1px solid rgba(255, 177, 66, 0.4);
  box-shadow: 0 0 30px rgba(255, 177, 66, 0.15);
  border-radius: 16px;
  text-align: center;
}

.maintenance-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(255, 177, 66, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffb142;
}

.maintenance-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.maintenance-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.host-modal-box {
  max-width: 380px;
}

/* --- Modpack Force Update Banner --- */
.modpack-update-bar {
  background: linear-gradient(90deg, rgba(74, 144, 226, 0.18), rgba(20, 26, 38, 0.95));
  border-bottom: 1px solid rgba(74, 144, 226, 0.4);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.modpack-update-content {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.modpack-update-tag {
  background: #4a90e2;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.modpack-update-msg {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modpack-update-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* --- Host Crash Reports List & Cards --- */
.host-crash-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.host-crash-card {
  background: rgba(255, 71, 87, 0.05);
  border: 1px solid rgba(255, 71, 87, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.host-crash-card:hover {
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.4);
}

.host-crash-info {
  flex: 1;
  min-width: 0;
}

.host-crash-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.host-crash-player {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.host-crash-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.host-crash-time {
  font-size: 11px;
  color: var(--text-muted);
}

.host-crash-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.host-crash-modal-box {
  max-width: 680px;
}

/* --- Clan Cape Selector Styles --- */
.cape-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.cape-card {
  cursor: pointer;
}

.cape-card input {
  display: none;
}

.cape-card-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.cape-card input:checked + .cape-card-inner {
  background: rgba(0, 255, 136, 0.12);
  border-color: var(--accent-color, #00FF88);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.25);
}

.cape-color-badge {
  width: 16px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.cape-info {
  display: flex;
  flex-direction: column;
}

.cape-name {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.cape-desc {
  font-size: 10px;
  color: var(--text-muted);
}

/* Home Skin Box Cape Badge */
.home-cape-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  right: 6px;
  background: rgba(13, 17, 23, 0.92);
  border: 1px solid rgba(0, 255, 136, 0.45);
  padding: 3px 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 800;
  color: #00ff88;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.home-cape-badge span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cape-mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 6px #00ff88;
  flex-shrink: 0;
}

/* Squad Wardrobe & Locker Styles */
.wardrobe-sync-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--theme-accent);
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  padding: 4px 10px;
  border-radius: 12px;
}

.wardrobe-active-banner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.wardrobe-active-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.wardrobe-active-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wardrobe-active-val {
  font-size: 13px;
  font-weight: 900;
  color: var(--theme-accent);
}

.wardrobe-active-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
}

.wardrobe-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.wardrobe-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wardrobe-tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.wardrobe-tab-btn.active {
  background: var(--theme-accent);
  color: #000;
  border-color: var(--theme-accent);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.wardrobe-card {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.wardrobe-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.wardrobe-card.equipped {
  border-color: var(--theme-accent);
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.2);
  background: rgba(0, 255, 136, 0.04);
}

.wardrobe-card-preview {
  width: 72px;
  height: 72px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
}

.wardrobe-card-preview img {
  image-rendering: pixelated;
  max-width: 58px;
  max-height: 58px;
}

.wardrobe-card-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.wardrobe-card-tag {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.wardrobe-card-btn {
  width: 100%;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  transition: all 0.15s ease;
}

.wardrobe-card-btn:hover {
  background: var(--theme-accent);
  color: #000;
}

.wardrobe-card.equipped .wardrobe-card-btn {
  background: var(--theme-accent);
  color: #000;
  cursor: default;
}

.wardrobe-custom-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
}

/* Host Vault Row */
.vault-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 11px;
}

.vault-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vault-item-type-badge {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 255, 136, 0.12);
  color: var(--theme-accent);
}

.vault-item-name {
  font-weight: 700;
  color: var(--text-main);
}

.vault-item-tag {
  font-size: 10px;
  color: var(--text-muted);
}

/* NameMC Style Capes Grid & Cards */
.namemc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.namemc-cape-card {
  background: rgba(18, 22, 30, 0.95);
  border: 1px solid rgba(50, 70, 100, 0.45);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: pointer;
}

.namemc-cape-card:hover {
  border-color: rgba(0, 210, 255, 0.7);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.namemc-cape-card.equipped {
  border-color: #00ff88;
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.35);
}

.namemc-card-header {
  background: rgba(25, 32, 45, 0.85);
  border-bottom: 1px solid rgba(50, 70, 100, 0.3);
  padding: 6px 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: #8bb2df;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.namemc-cape-card.equipped .namemc-card-header {
  color: #00ff88;
}

.namemc-card-body {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #121620;
  background-image: 
    linear-gradient(45deg, #171c28 25%, transparent 25%), 
    linear-gradient(-45deg, #171c28 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #171c28 75%), 
    linear-gradient(-45deg, transparent 75%, #171c28 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.namemc-cape-img {
  max-height: 125px;
  max-width: 90%;
  object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.namemc-cape-card:hover .namemc-cape-img {
  transform: scale(1.08) translateY(-2px);
}

.namemc-equip-btn {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--theme-accent);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  z-index: 5;
}

.namemc-cape-card:hover .namemc-equip-btn,
.namemc-cape-card.equipped .namemc-equip-btn {
  opacity: 1;
}

.namemc-cape-card.equipped .namemc-equip-btn {
  background: #00ff88;
  color: #000;
  cursor: default;
}

.namemc-card-footer {
  background: rgba(15, 19, 28, 0.95);
  border-top: 1px solid rgba(50, 70, 100, 0.25);
  padding: 4px 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.namemc-player-count {
  font-size: 10px;
  font-weight: 700;
  color: #8c9ba5;
}



