:root {
  --accent: #f59e0b;
  --accent-text: #171208;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --page-bg: #0f0f10;
  --topbar-bg: #161618;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --muted: #9ca3af;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--page-bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  height: 58px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-wrap {
  position: relative;
}

.top-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #d4d4d8;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.top-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.top-btn.outline {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.accent-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.chevron {
  font-size: 12px;
  opacity: 0.7;
  transform: translateY(-2px);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 195px;
  background: #1c1c1f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  z-index: 40;
}

.dropdown-menu.open {
  display: flex;
}

.menu-item {
  background: transparent;
  border: none;
  color: #e4e4e7;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: left;
}

.menu-item:hover, .menu-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

/* Main */
.page-main {
  flex: 1;
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.hero-header h1 {
  font-size: clamp(25px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.hero-header p {
  font-size: 14.5px;
  color: var(--muted);
}

/* Fenêtre Launcher */
.stage-container {
  width: 100%;
  max-width: 980px;
}

.launcher-frame {
  --win-bg: #161412;
  --rail-bg: #131210;
  --sub-bg: #181614;
  --card-bg: rgba(30, 28, 25, 0.92);
  --win-border: rgba(255, 255, 255, 0.08);
  --win-text: #f5f5f4;
  --win-muted: #a8a29e;

  position: relative;
  width: 100%;
  height: 565px;
  background: var(--win-bg);
  border: 1px solid var(--win-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.75);
  color: var(--win-text);
}

.launcher-frame.mode-light {
  --win-bg: #f6f4f0;
  --rail-bg: #ebe8e1;
  --sub-bg: #efece6;
  --card-bg: rgba(255, 255, 255, 0.95);
  --win-border: rgba(0, 0, 0, 0.09);
  --win-text: #1c1917;
  --win-muted: #57534e;
}

.launcher-frame.is-fullscreen {
  position: fixed;
  inset: 14px;
  height: auto;
  max-width: none;
  z-index: 60;
}

/* Rail latéral */
.icon-rail {
  width: 58px;
  flex-shrink: 0;
  background: var(--rail-bg);
  border-right: 1px solid var(--win-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  z-index: 12;
}

.rail-top, .rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.rail-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  margin-bottom: 6px;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.rail-btn {
  position: relative;
  width: 40px;
  height: 38px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--win-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rail-btn:hover, .rail-btn.active {
  color: var(--win-text);
  background: rgba(128, 128, 128, 0.12);
}

.rail-btn::after, .rail-avatar::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 52px;
  background: #23211e;
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.rail-btn:hover::after, .rail-avatar:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.active-bar {
  position: absolute;
  left: -9px;
  width: 3px;
  height: 20px;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
  opacity: 0;
}

.rail-btn.active .active-bar {
  opacity: 1;
}

.notif-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.rail-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  cursor: pointer;
  margin-top: 2px;
}

.mc-face {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(to bottom, #3b2618 0 28%, #d6a57a 28% 100%);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.mc-face.alt {
  background: linear-gradient(to bottom, #1e293b 0 28%, #e2b48a 28% 100%);
}

.mc-face.large {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.mc-face .eye {
  position: absolute;
  top: 44%;
  width: 22%;
  height: 11%;
  background: linear-gradient(to right, #fff 50%, #2563eb 50%);
}

.mc-face .eye.l { left: 16%; }
.mc-face .eye.r { right: 16%; background: linear-gradient(to right, #2563eb 50%, #fff 50%); }

.online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--rail-bg);
}

/* Zone principale */
.launcher-main {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.win-controls {
  position: absolute;
  top: 10px;
  right: 14px;
  display: flex;
  gap: 10px;
  z-index: 15;
  color: var(--win-muted);
  font-size: 12px;
}

.wc-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  cursor: default;
}

.wc-btn:hover {
  background: rgba(128, 128, 128, 0.16);
  color: var(--win-text);
}

.screen-view {
  display: none;
  height: 100%;
  position: relative;
}

.screen-view.active {
  display: block;
}

.hidden {
  display: none !important;
}

/* Accueil */
.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 68% 22%, rgba(217, 155, 92, 0.36) 0%, rgba(120, 82, 52, 0.16) 40%, transparent 70%),
    linear-gradient(165deg, #3a2e24 0%, #241e19 45%, #161412 85%);
  z-index: 0;
  transition: background 0.3s ease;
}

.hero-backdrop.theme-factions {
  background:
    radial-gradient(ellipse at 68% 22%, rgba(239, 68, 68, 0.28) 0%, transparent 65%),
    linear-gradient(165deg, #351d1d 0%, #1f1717 50%, #161412 88%);
}

.hero-backdrop.theme-modded {
  background:
    radial-gradient(ellipse at 68% 22%, rgba(16, 185, 129, 0.28) 0%, transparent 65%),
    linear-gradient(165deg, #1b322b 0%, #16211e 50%, #161412 88%);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--win-bg) 30%, transparent 75%);
}

.launcher-frame.mode-light .hero-backdrop {
  opacity: 0.2;
}

.home-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 36px 36px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.welcome-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  margin-bottom: 5px;
}

.welcome-muted {
  color: var(--win-muted);
  font-weight: 500;
}

.account-menu-wrap {
  position: relative;
}

.player-dropdown {
  background: transparent;
  border: none;
  color: var(--win-text);
  font-size: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.mini-head {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #3b2618 0 35%, #d6a57a 35% 100%);
  display: inline-block;
}

.mini-head.alt {
  background: linear-gradient(to bottom, #1e293b 0 35%, #e2b48a 35% 100%);
}

.caret {
  font-size: 13px;
  opacity: 0.75;
}

.account-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 225px;
  background: #201e1b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.65);
  z-index: 25;
}

.account-popover.open {
  display: flex;
}

.popover-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #a8a29e;
  padding: 4px 8px;
}

.acc-item {
  background: transparent;
  border: none;
  color: #f5f5f4;
  padding: 8px 9px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.acc-item.selected, .acc-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.acc-name { flex: 1; }
.acc-check { color: var(--accent); font-weight: 800; }

.popover-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.acc-action {
  background: transparent;
  border: none;
  color: #d6d3d1;
  font-size: 12.5px;
  padding: 7px 9px;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.acc-action:hover { background: rgba(255, 255, 255, 0.07); }
.acc-action.danger { color: #f87171; }

.playtime-sub {
  font-size: 12.5px;
  color: var(--win-muted);
  margin-bottom: 12px;
}

.server-online-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--win-muted);
}

.green-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.server-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 10px 0 18px;
  flex-wrap: wrap;
}

.server-title {
  font-size: 35px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 11px;
}

.server-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--win-border);
  font-size: 12px;
  font-weight: 500;
}

.meta-chip.accent-subtle {
  background: var(--accent-soft);
  border-color: rgba(245, 158, 11, 0.28);
  color: var(--accent);
}

.server-play-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.cta-play-btn {
  min-width: 215px;
  height: 46px;
  padding: 0 28px;
  border: none;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 28px var(--accent-soft);
  transition: transform 0.12s ease, filter 0.15s ease;
}

.cta-play-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.launch-progress-bar {
  width: 215px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.launch-progress-bar.visible { opacity: 1; }

.launch-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.35s ease;
}

.server-switch-wrap { position: relative; }

.change-server-btn {
  background: transparent;
  border: none;
  color: var(--win-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.change-server-btn:hover { color: var(--win-text); }

.server-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 225px;
  background: #201e1b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
  z-index: 25;
}

.server-popover.open { display: flex; }

.srv-option {
  background: transparent;
  border: none;
  color: #f5f5f4;
  text-align: left;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.srv-option strong { font-size: 12.5px; }
.srv-option span { font-size: 11px; color: #a8a29e; }
.srv-option.active, .srv-option:hover { background: rgba(255, 255, 255, 0.08); }

/* Actualités */
.news-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--win-muted);
  margin-bottom: 11px;
}

.news-count {
  background: rgba(255, 255, 255, 0.09);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px;
}

.news-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.news-item {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  border-radius: 11px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.news-item:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.news-thumb { height: 92px; position: relative; padding: 9px; }
.thumb-arena { background: linear-gradient(135deg, #78350f 0%, #292524 55%, #1c1917 100%); }
.thumb-factions { background: linear-gradient(135deg, #1d4ed8 0%, #1e293b 55%, #0f172a 100%); }
.thumb-perf { background: linear-gradient(135deg, #065f46 0%, #1e293b 60%, #0f172a 100%); }

.badge-new {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 5px;
}

.news-body { padding: 10px 12px 12px; }
.news-body h3 { font-size: 12.5px; font-weight: 700; line-height: 1.35; margin-bottom: 5px; }
.news-meta { font-size: 10.5px; color: var(--win-muted); }

/* VUE INSTANCES (Style Modrinth) */
.instances-overview {
  padding: 34px 36px 28px;
  height: 100%;
  overflow-y: auto;
}

.inst-top-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.inst-top-header h2 {
  font-size: 24px;
  font-weight: 800;
}

.inst-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.inst-filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.instances-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.instance-card {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 13px;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.instance-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.inst-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inst-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  color: #fff;
}

.inst-icon.large {
  width: 52px;
  height: 52px;
  font-size: 24px;
}

.inst-icon.theme-arena { background: linear-gradient(135deg, #d97706, #78350f); }
.inst-icon.theme-factions { background: linear-gradient(135deg, #2563eb, #1e3a8a); }
.inst-icon.theme-modded { background: linear-gradient(135deg, #059669, #064e3b); }
.inst-icon.theme-vanilla { background: linear-gradient(135deg, #65a30d, #365314); }

.inst-card-meta {
  flex: 1;
  min-width: 0;
}

.inst-card-meta h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.inst-sub {
  font-size: 12px;
  color: var(--win-muted);
  font-family: 'JetBrains Mono', monospace;
}

.inst-quick-play {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--win-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--win-text);
  font-size: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.inst-quick-play:hover {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.inst-stats-row {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--win-muted);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(128, 128, 128, 0.07);
}

.inst-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
}

.hud-pill-mini {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
}

.neutral-pill-mini {
  background: rgba(128, 128, 128, 0.12);
  color: var(--win-muted);
  font-weight: 600;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
}

.open-hint {
  color: var(--win-muted);
  font-weight: 600;
}

.instance-card:hover .open-hint {
  color: var(--accent);
}

/* Fiche détaillée d'une instance (Modrinth-like) */
.instance-detail {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.detail-banner {
  padding: 22px 32px 16px;
  background: var(--sub-bg);
  border-bottom: 1px solid var(--win-border);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--win-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  display: inline-block;
}

.back-btn:hover {
  color: var(--accent);
}

.detail-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.detail-title-row h2 {
  font-size: 21px;
  font-weight: 800;
}

.detail-specs {
  font-size: 12px;
  color: var(--win-muted);
  font-family: 'JetBrains Mono', monospace;
}

.detail-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-tabs-bar {
  display: flex;
  gap: 4px;
  padding: 0 32px;
  background: var(--sub-bg);
  border-bottom: 1px solid var(--win-border);
  overflow-x: auto;
}

.inst-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--win-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.inst-tab:hover {
  color: var(--win-text);
}

.inst-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.14);
}

.detail-body {
  flex: 1;
  padding: 20px 32px 26px;
  overflow-y: auto;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Split Layout (Paramètres) */
.split-layout {
  display: flex;
  height: 100%;
}

.sub-sidebar {
  width: 215px;
  flex-shrink: 0;
  background: var(--sub-bg);
  border-right: 1px solid var(--win-border);
  padding: 28px 14px;
}

.sub-cat-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--win-muted);
  margin-bottom: 4px;
}

.sub-sidebar .sub-cat-label { padding: 0 10px; }

.sub-main-title {
  font-size: 22px;
  font-weight: 800;
  padding: 0 10px;
  margin-bottom: 18px;
}

.sub-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sub-nav-btn {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--win-muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.sub-nav-btn:hover { color: var(--win-text); background: rgba(128, 128, 128, 0.08); }
.sub-nav-btn.active { background: rgba(128, 128, 128, 0.14); color: var(--win-text); }

.sub-content {
  flex: 1;
  padding: 28px 30px;
  overflow-y: auto;
}

.search-box {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  border-radius: 8px;
  padding: 7px 12px;
}

.search-box.compact {
  min-width: 190px;
}

.search-ico { color: var(--win-muted); font-size: 14px; }

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--win-text);
  font-size: 13px;
  width: 100%;
}

.filter-chip {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  color: var(--win-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.set-pane { display: none; }
.set-pane.active { display: block; }

.mod-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mod-card {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mod-card.column {
  flex-direction: column;
  align-items: stretch;
}

.mod-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.green { background: #22c55e; }
.status-dot.muted { background: #71717a; }

.mod-name {
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mod-ver {
  font-size: 12px;
  color: var(--win-muted);
  font-family: 'JetBrains Mono', monospace;
}

.source-tag {
  font-size: 10px;
  font-family: 'Inter', sans-serif;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 600;
}

.source-tag.core { background: var(--accent-soft); color: var(--accent); }
.source-tag.mr { background: rgba(27, 217, 106, 0.14); color: #1bd96a; }
.source-tag.cf { background: rgba(241, 100, 54, 0.14); color: #f16436; }

.lock-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--win-muted);
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(128, 128, 128, 0.1);
}

/* Paramètres */
.settings-top-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  margin-bottom: 22px;
}

.settings-top-bar h3 { font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.settings-top-bar p { font-size: 13px; color: var(--win-muted); }

.cta-done-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 8px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

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

.ms-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--win-muted);
}

.ms-sq { width: 8px; height: 8px; display: inline-block; }
.ms-sq.r { background: #f25022; }
.ms-sq.g { background: #7fba00; }
.ms-sq.b { background: #00a4ef; }
.ms-sq.y { background: #ffb900; }

.secondary-btn {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  color: var(--win-text);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.account-detail-card {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  border-radius: 11px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.acc-skin-box {
  width: 64px;
  height: 76px;
  border-radius: 9px;
  border: 1px solid var(--win-border);
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.2);
}

.acc-fields { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.field-block { display: flex; flex-direction: column; }
.field-lbl { font-size: 11px; color: var(--win-muted); }
.field-block strong { font-size: 14px; }
.field-block code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--win-muted); }

.acc-card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.selected-tag { font-size: 12.5px; font-weight: 600; color: var(--win-muted); }
.link-muted { background: transparent; border: none; color: var(--win-muted); font-size: 12.5px; cursor: pointer; }
.link-muted:hover { color: #f87171; }

/* Simple panes */
.simple-pane { padding: 36px; height: 100%; overflow-y: auto; }
.pane-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.pane-top h2 { font-size: 22px; font-weight: 800; }

.pill-count {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shot-card {
  height: 180px;
  border-radius: 12px;
  border: 1px solid var(--win-border);
  padding: 14px;
  display: flex;
  align-items: flex-end;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}

.cosmetics-grid { display: grid; grid-template-columns: 230px 1fr; gap: 18px; }
.cape-preview-card {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cape-render {
  width: 68px;
  height: 108px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 30px;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}

.cape-preview-card strong { font-size: 13px; }
.cape-preview-card span { font-size: 11px; color: var(--win-muted); }

.cosmetic-controls { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.cos-list { display: flex; flex-direction: column; gap: 8px; }

.cos-option {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  color: var(--win-text);
  padding: 12px 15px;
  border-radius: 9px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.cos-option.active { border-color: var(--accent); background: var(--accent-soft); }

.hud-toggles {
  background: var(--card-bg);
  border: 1px solid var(--win-border);
  border-radius: 10px;
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
}

/* Tiroir latéral Amis */
.friends-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: #191715;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 22;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.55);
}

.friends-drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.drawer-tabs { display: flex; gap: 6px; }

.d-tab {
  background: transparent;
  border: none;
  color: #a8a29e;
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.d-tab.active { background: rgba(255, 255, 255, 0.09); color: #f5f5f4; }
.d-count { font-size: 10.5px; padding: 1px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); }
.drawer-close { background: transparent; border: none; color: #a8a29e; cursor: pointer; font-size: 13px; padding: 4px 6px; }

.drawer-search {
  margin: 10px 14px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a8a29e;
  font-size: 13px;
}

.drawer-search input { background: transparent; border: none; outline: none; color: #f5f5f4; font-size: 12.5px; width: 100%; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 14px 14px; }
.drawer-group-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: #78716c; margin: 12px 0 8px; }
.friend-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; }
.friend-row:hover { background: rgba(255, 255, 255, 0.05); }
.friend-row.offline { opacity: 0.55; }
.f-avatar { position: relative; width: 30px; height: 30px; flex-shrink: 0; }
.f-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.f-meta strong { font-size: 12.5px; color: #f5f5f4; }
.f-meta span { font-size: 11px; color: #a8a29e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-meta span.in-game { color: #4ade80; }

.f-join-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f4;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.msg-pill {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.drawer-footer {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11px;
  color: #4ade80;
}

/* Toast interne */
.launcher-toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #23211e;
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 35;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.launcher-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Switch */
.toggle { position: relative; width: 38px; height: 20px; display: inline-block; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.track { position: absolute; inset: 0; border-radius: 999px; background: rgba(128, 128, 128, 0.3); cursor: pointer; transition: 0.2s; }
.track::before { content: ""; position: absolute; width: 14px; height: 14px; left: 3px; bottom: 3px; border-radius: 50%; background: #fff; transition: 0.2s; }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::before { transform: translateX(18px); }

.ram-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* Dock inférieur */
.bottom-dock {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.dock-btn {
  background: #1b1b1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dock-btn:hover { color: #fff; background: #242428; }
.dock-btn.active { background: #27272b; color: #fafafa; border-color: rgba(255, 255, 255, 0.18); }

@media (max-width: 760px) {
  .launcher-frame { height: auto; min-height: 565px; }
  .split-layout { flex-direction: column; }
  .sub-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--win-border); }
  .instances-grid, .news-cards, .gallery-grid, .cosmetics-grid { grid-template-columns: 1fr; }
}


/* Sélecteur de compte au-dessus du bouton JOUER */
.play-account-row {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  position: relative;
}

.play-account-trigger {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--win-border);
  color: var(--win-text);
  border-radius: 8px;
  padding: 5px 10px 5px 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.play-account-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
}

.play-account-head {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(to bottom, #3b2618 0 35%, #d6a57a 35% 100%);
  flex-shrink: 0;
}

.play-account-head.alt {
  background: linear-gradient(to bottom, #1e293b 0 35%, #e2b48a 35% 100%);
}

.play-account-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 225px;
  background: #201e1b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.65);
  z-index: 30;
}

.play-account-popover.open {
  display: flex;
}

.play-account-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}




/* === Vexium Architecture & Mojang Compliance Section === */
.vexium-info-wrap {
  width: 100%;
  max-width: 1120px;
  margin: 28px auto 16px;
  padding: 28px;
  border-radius: 18px;
  background: var(--win-bg, rgba(24, 24, 27, 0.85));
  border: 1px solid var(--win-border, rgba(255, 255, 255, 0.1));
  color: var(--win-text, #f4f4f5);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

html:not(.dark) .vexium-info-wrap {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.vexium-info-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 24px;
}

.vexium-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: color-mix(in srgb, var(--accent, #f59e0b) 16%, transparent);
  color: var(--accent, #f59e0b);
  border: 1px solid color-mix(in srgb, var(--accent, #f59e0b) 38%, transparent);
  margin-bottom: 10px;
}

.vexium-info-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.vexium-info-header p {
  font-size: 14px;
  opacity: 0.78;
  line-height: 1.6;
}

.vexium-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.vexium-info-card {
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--win-border, rgba(255, 255, 255, 0.08));
}

html:not(.dark) .vexium-info-card {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

.vexium-info-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.vexium-info-card p {
  font-size: 13.5px;
  opacity: 0.76;
  line-height: 1.55;
}

.vexium-compliance-box {
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--win-border, rgba(255, 255, 255, 0.08));
  margin-bottom: 18px;
}

html:not(.dark) .vexium-compliance-box {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.08);
}

.vexium-compliance-box h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.vexium-compliance-box ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13.5px;
  opacity: 0.82;
  line-height: 1.55;
}

.vexium-site-footer {
  text-align: center;
  padding-top: 14px;
  border-top: 1px solid var(--win-border, rgba(255, 255, 255, 0.08));
  font-size: 12px;
  opacity: 0.65;
}

html:not(.dark) .vexium-site-footer {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.vexium-site-footer .disclaimer {
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
