/* ============================================================
   ZXC MAFIA • REQUIEM DARK AESTHETICS (discord.gg/zxc)
   Inspired by: requiem-shop.ru & ZXC Discord Server
   Obsidian · Ash · 1000-7 · Clean Gothic Typography
   NO SCANLINES · NO PIXELATION · PURE LUXURY DARK
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,500;1,600;1,700&family=JetBrains+Mono:wght@400;600;800&family=Montserrat:wght@400;500;600;700;800;900&family=Unbounded:wght@400;600;700;800;900&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-2: #101010;
  --bg-3: #161616;
  --card: #0e0e0e;
  --bg-card: #0e0e0e;
  --bg-card-hover: #141414;
  --bg-tile: #121212;
  --bg-tile-hover: #181818;
  
  --ink: #ededed;
  --text-primary: #ededed;
  --muted: #8d8d8d;
  --text-secondary: #8d8d8d;
  --faint: #565656;
  --text-muted: #565656;
  
  --blood: #ededed;
  --blood-hi: #ffffff;
  --blood-red: #ef4444;
  --blood-glow: rgba(239, 68, 68, 0.4);
  
  --line: rgba(237, 237, 237, 0.14);
  --line-soft: rgba(237, 237, 237, 0.07);
  --glow: rgba(255, 255, 255, 0.045);
  --overlay: rgba(6, 6, 6, 0.74);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);

  --f-display: "Unbounded", cursive;
  --f-epitaph: "Cormorant Garamond", serif;
  --f-ui: "Archivo", system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, 'JetBrains Mono', monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.25, .46, .45, .94);
  --ease-btn: cubic-bezier(.4, 0, .2, 1);
  --ease-carve: cubic-bezier(.7, 0, .2, 1);
  --t-fast: .22s;
  --t-med: .45s;
  --t-slow: .9s;

  --header-h: 72px;
  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1440px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-card: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: #080808;
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.04) 0%, transparent 60%),
    radial-gradient(circle at 85% 85%, rgba(225, 29, 72, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 15% 90%, rgba(255, 255, 255, 0.02) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Subtle Organic Film Grain (NO SCANLINES, crystal clear) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Ash & Ember Particle Canvas */
#ash-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #252533;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #39394d;
}

/* ============================================================
   PRELOADER (Requiem Flame & Carved Mark)
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  transition: opacity .7s ease, visibility .7s;
}
#preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.pre-mark {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .6em;
  padding-left: .6em;
  color: var(--ink);
  user-select: none;
}
.pre-flame {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  background: linear-gradient(to top, var(--faint), var(--ink), transparent);
  animation: flame 1.4s ease-in-out infinite;
  box-shadow: 0 0 28px 6px var(--glow);
}
@keyframes flame {
  0%, 100% { transform: scaleY(1); }
  40% { transform: scaleY(.55); }
  70% { transform: scaleY(1.18); }
}

/* ============================================================
   SITE HEADER (Requiem v3 Dynamic Header)
   ============================================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-soft);
  transition: transform .5s var(--ease-out), background var(--t-med);
}
#site-header.hidden {
  transform: translateY(-100%);
}
.header-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
#shop-logo {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .22em;
  user-select: none;
  white-space: nowrap;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
}
#shop-logo:hover {
  opacity: 0.92;
}
#shop-logo .logo-mark {
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.4);
}
#shop-logo .logo-name {
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1.2px rgba(255, 255, 255, 0.85);
}
#shop-logo .logo-tag {
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.header-nav {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 14, 19, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-left: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.header-nav button.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-ui);
  font-size: 13px;
  letter-spacing: 0.02em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  position: relative;
  padding: 7px 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  user-select: none;
}

.header-nav button.nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.header-nav button.nav-tab.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.header-nav button.nav-tab.active .nav-tab-icon {
  color: #f87171;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
}

.nav-tab-icon {
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s ease, filter 0.2s ease;
}

.header-nav button.nav-tab:hover .nav-tab-icon {
  color: rgba(255, 255, 255, 0.85);
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: liveDotPulse 1.8s infinite;
}

@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.nav-room-badge {
  font-family: var(--f-mono);
  font-size: 11px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.header-nav button.nav-tab:active {
  transform: scale(0.97);
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.92) !important;
}

.icon-btn.is-muted {
  color: var(--faint);
  opacity: 0.6;
}

.icon-btn.has-user-avatar {
  padding: 0;
  border-color: rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  overflow: hidden;
}

.icon-btn.has-user-avatar:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.3);
}

.header-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.header-avatar-online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  border: 1.5px solid #0b0b0e;
  box-shadow: 0 0 6px #22c55e;
}

.host-desk-notice-banner {
  background: rgba(88, 101, 242, 0.08);
  border: 1px solid rgba(88, 101, 242, 0.25);
  border-radius: 0;
  padding: 14px 22px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}


.discord-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(88, 101, 242, 0.08);
  color: #e4e7ff;
  border: 1px solid rgba(88, 101, 242, 0.4);
  padding: 8px 18px;
  border-radius: 0;
  text-decoration: none;
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.discord-badge-btn svg {
  color: #5865F2;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}
.discord-badge-btn:hover {
  background: rgba(88, 101, 242, 0.2);
  border-color: #5865F2;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(88, 101, 242, 0.35);
}
.discord-badge-btn:hover svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px #5865F2);
}
.discord-badge-btn:active {
  transform: scale(0.95);
}

#burger-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  cursor: pointer;
}
#burger-btn span {
  width: 20px;
  height: 1.5px;
  background: var(--ink);
  transition: .3s var(--ease-out);
}
#burger-btn.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#burger-btn.open span:nth-child(2) { opacity: 0; }
#burger-btn.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   REQUIEM HERO SECTION
   ============================================================ */
#hero {
  min-height: 70vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px var(--gutter) 50px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 62%);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}
.hero-eyebrow .dash {
  width: 44px;
  height: 1px;
  background: var(--line);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
#hero-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(34px, 5.8vw, 86px);
  line-height: 1.05;
  letter-spacing: .06em;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35em;
  flex-wrap: nowrap;
  margin-bottom: 16px;
  width: 100%;
}
.hero-word {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
}
#hero-title .ltr {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transform: translateY(.22em) scale(1.12);
}
#hero-title.carved .ltr {
  animation: carve 1.15s var(--ease-carve) forwards;
  animation-delay: calc(var(--i) * 90ms + 120ms);
}
@keyframes carve {
  0% { opacity: 0; filter: blur(14px); transform: translateY(.22em) scale(1.12); }
  60% { opacity: 1; }
  100% { opacity: 1; filter: blur(0); transform: none; }
}
#hero-title .ltr.hollow {
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}
@media (max-width: 640px) {
  #hero-title {
    flex-wrap: wrap;
    font-size: clamp(28px, 9vw, 50px);
    gap: 0.1em 0.25em;
  }
}
.hero-epitaph {
  margin-top: 14px;
  font-family: var(--f-epitaph);
  font-style: italic;
  font-size: clamp(19px, 2.4vw, 27px);
  letter-spacing: .02em;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 1.1s var(--ease-out) 1.1s forwards;
}
.hero-cta-row {
  margin-top: 42px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 1.1s var(--ease-out) 1.3s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.hero-divider {
  width: min(200px, 36vw);
  height: 1px;
  margin: 40px auto 0;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--faint) 50%, var(--line) 80%, transparent);
  opacity: 0;
  animation: fadeUp 1s ease 1.5s forwards;
}
.hero-scroll {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: 0;
  animation: heroScrollIn 1s ease 1.8s forwards;
}
@keyframes heroScrollIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-scroll .stem {
  width: 1px;
  height: 38px;
  background: linear-gradient(var(--muted), transparent);
  animation: stem 2.2s ease-in-out infinite;
  transform-origin: top center;
}
@keyframes stem {
  0%, 100% { transform: scaleY(1); opacity: .9; }
  50% { transform: scaleY(.55); opacity: .4; }
}

/* ============================================================
   REQUIEM SIGNATURE BUTTONS (Slide-Fill & Letter Tracking)
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 28px;
  font-family: var(--f-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  border-radius: 8px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ededed;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .24s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn--blood {
  background: linear-gradient(135deg, #e11d48, #9f1239);
  border: 1px solid #fb7185;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(225, 29, 72, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn--blood:hover {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  box-shadow: 0 6px 30px rgba(225, 29, 72, 0.55), 0 0 20px rgba(244, 63, 94, 0.4);
  transform: translateY(-2px);
  color: #ffffff !important;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ededed !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(255, 255, 255, 0.12);
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: .4;
  pointer-events: none;
}
.btn--sm {
  height: 42px;
  padding: 0 22px;
  font-size: 10.5px;
  letter-spacing: .22em;
}
.btn--sm:hover {
  letter-spacing: .26em;
}
.btn--full {
  width: 100%;
}

/* Main Container */
.main-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 24px) 24px 80px;
  position: relative;
  z-index: 10;
}

/* ============================================================
   REQUIEM USER PROFILE HEADER (.cab-shell)
   ============================================================ */
.cab-shell {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px 32px;
  box-shadow: var(--shadow-card);
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.cab-shell:hover {
  border-color: rgba(255, 255, 255, 0.22);
}
.cab-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.04), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(239, 68, 68, 0.03), transparent 45%);
}
.cab-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}
.cab-who-block {
  display: flex;
  align-items: center;
  gap: 18px;
}
.cab-avatar {
  width: 58px;
  height: 58px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), border-color 0.25s ease;
}
.cab-avatar:hover {
  transform: scale(1.05);
  border-color: var(--ink);
}
.cab-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cab-who-meta b {
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cab-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}
.cab-badge--member {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
@media (max-width: 640px) {
  .cab-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ============================================================
   MODE SELECTION CARDS (Requiem Carve Animation)
   ============================================================ */

.modes-selection-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

.mode-choice-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
  box-shadow: var(--shadow-card);
}

.mode-choice-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.95);
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 18px;
}

.mode-title {
  font-family: var(--f-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.mode-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.65;
}

/* Requiem Interactive Button */
.mode-btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e11d48, #9f1239);
  color: #ffffff;
  font-family: var(--f-ui);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1px solid #fb7185;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(225, 29, 72, 0.35);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.mode-btn-primary:hover {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  box-shadow: 0 6px 28px rgba(225, 29, 72, 0.55), 0 0 16px rgba(244, 63, 94, 0.4);
  transform: translateY(-2px);
  color: #ffffff;
}

.mode-btn-primary:active {
  transform: scale(0.97);
}

.mode-btn-primary span, .mode-btn-primary svg {
  position: relative;
  z-index: 2;
}

.mode-btn-secondary {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 14px 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.mode-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.join-code-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.join-code-input {
  background: #09090d;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  color: #ffffff;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  flex: 1;
  transition: border-color 0.3s ease;
}
.join-code-input:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* ============================================================
   HOST PANEL (ПАНЕЛЬ ВЕДУЩЕГО)
   ============================================================ */

.host-desk-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}

.host-left-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.host-card-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s;
}

.panel-header-title {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Timer Widget */
.host-timer-box {
  background: #0a0a0f;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.timer-digits {
  font-family: var(--f-mono);
  font-weight: 800;
  font-size: 3.6rem;
  color: #ffffff;
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: 16px;
}

.timer-digits.urgent {
  color: var(--blood);
  text-shadow: 0 0 20px var(--blood-glow);
  animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.timer-controls-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.timer-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s var(--ease-btn);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.timer-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
}
.timer-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}



/* Player Table Matrix */
.players-table-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.player-row-item {
  background: #13131b;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.25s var(--ease-btn);
}

.player-row-item:hover {
  border-color: var(--line);
  background: #1a1a26;
  transform: translateY(-1px);
}

.player-row-item.dead {
  opacity: 0.45;
  background: #0c0c11;
  text-decoration: line-through;
}

.player-row-item.current-speaker {
  border-color: #ffffff;
  background: #1e1f2d;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
}

.player-seat-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a1a26;
  border: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  font-family: var(--f-mono);
}

.player-name-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.player-name-text.is-editable {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  padding: 2px 6px;
  margin: -2px -6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.player-name-text.is-editable:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.player-name-text.is-editable:hover .rename-hint-icon {
  opacity: 1;
}

.rename-hint-icon {
  opacity: 0.35;
  transition: opacity 0.15s ease;
}

.player-role-badge {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.2s ease;
}

.player-role-badge.is-interactive {
  cursor: pointer;
}

.player-role-badge.is-interactive:hover {
  transform: translateY(-1px);
  filter: brightness(1.2);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.role-badge-mafia { background: rgba(225, 29, 72, 0.12); color: #f43f5e; border: 1px solid rgba(225, 29, 72, 0.35); }
.role-badge-don { background: rgba(225, 29, 72, 0.18); color: #ef4444; border: 1px solid rgba(225, 29, 72, 0.45); }
.role-badge-town { background: rgba(255, 255, 255, 0.06); color: #e4e4e7; border: 1px solid rgba(255, 255, 255, 0.14); }
.role-badge-unassigned { background: rgba(255, 255, 255, 0.02); color: #71717a; border: 1px dashed rgba(255, 255, 255, 0.18); }
.role-badge-maniac { background: rgba(225, 29, 72, 0.2); color: #fca5a5; border: 1px solid rgba(225, 29, 72, 0.4); }

.host-delete-player-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #71717a;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.18s ease;
}

.host-delete-player-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.role-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.role-pick-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.role-pick-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.role-pick-item.role-pick--mafia:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.08);
}

.role-pick-title {
  font-family: var(--f-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.role-pick-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.foul-indicators-row {
  display: flex;
  gap: 4px;
}

.foul-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #252636;
  cursor: pointer;
  transition: all 0.2s;
}

.foul-dot.active {
  background: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
}

.foul-dot.penalty-death {
  background: var(--blood);
  box-shadow: 0 0 8px var(--blood-glow);
}

/* ============================================================
   3D ROLE CARDS & PRESENTATION
   ============================================================ */

.cards-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.zxc-role-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.35s var(--ease-out);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.zxc-role-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.95);
}

.role-card-art-box {
  width: 200px;
  height: 200px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--line-soft);
  background: #07070a;
}

.role-card-art-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-card-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
  margin-bottom: 6px;
}

.role-card-tagline {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.role-card-desc {
  font-size: 0.85rem;
  color: #a0a0b2;
  line-height: 1.6;
  text-align: left;
}

/* ============================================================
   3D FLIP CARD INTERACTIVE VIEWER
   ============================================================ */

.flip-card-container {
  perspective: 1000px;
  width: 320px;
  height: 460px;
  margin: 0 auto;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card-container.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
}

.flip-card-front {
  background: #09090d;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.flip-card-back {
  background: #0f0f16;
  border: 1px solid var(--line);
  transform: rotateY(180deg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   MODAL WINDOWS & AUTH
   ============================================================ */

.zxc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.zxc-modal-overlay.active {
  display: flex;
  opacity: 1;
  animation: modalOverlayIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.zxc-modal-dialog {
  background: linear-gradient(155deg, #121217 0%, #09090d 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  width: 100%;
  max-width: 480px;
  padding: 34px 36px;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 40px rgba(0, 0, 0, 0.7);
  position: relative;
  transform: translateY(18px) scale(0.96);
  animation: modalDialogSpring 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

.zxc-modal-dialog::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 100% 0%, rgba(225, 29, 72, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes modalDialogSpring {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}
.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: rotate(90deg) scale(1.08);
}
.modal-close-btn:active {
  transform: rotate(90deg) scale(0.92);
}

/* Auth Sliding Segmented Control (Вход / Регистрация) */
.auth-mode-switch {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
  backdrop-filter: blur(10px);
}

.auth-mode-glider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 6px);
  height: calc(100% - 8px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}

.auth-mode-switch[data-mode="register"] .auth-mode-glider {
  transform: translateX(calc(100% + 4px));
}

.auth-mode-btn {
  position: relative;
  z-index: 2;
  flex: 1;
  background: transparent !important;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  padding: 9px 16px;
  border-radius: 7px;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  user-select: none;
}

.auth-mode-btn.active {
  color: #ffffff !important;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.auth-mode-btn:hover:not(.active) {
  color: #ffffff;
}

.auth-mode-btn:active {
  transform: scale(0.97);
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

#authEmailGroup {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.28s ease, 
              margin-bottom 0.32s ease, 
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

#authEmailGroup.open {
  max-height: 90px;
  opacity: 1;
  margin-bottom: 16px;
  transform: translateY(0);
}

.auth-input-label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  letter-spacing: 0.4px;
}

.auth-text-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: #ffffff;
  font-family: var(--f-ui);
  font-size: 0.92rem;
  transition: all 0.25s ease;
}
.auth-text-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.08);
}

.auth-discord-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.32);
  color: #e4e7ff;
  padding: 13px 20px;
  border-radius: 12px;
  font-family: var(--f-ui);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.auth-discord-btn svg {
  color: #5865F2;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}
.auth-discord-btn:hover {
  background: #5865F2;
  border-color: #5865F2;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.45);
  transform: translateY(-1px);
}
.auth-discord-btn:hover svg {
  color: #ffffff;
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}
.auth-discord-btn:active {
  transform: scale(0.97);
}

.prompt-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ededed;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.prompt-icon-badge svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: transform 0.25s ease;
}
.prompt-icon-badge:hover svg {
  transform: scale(1.1);
}
.prompt-icon-badge.is-danger,
.prompt-icon-badge.type-danger,
.prompt-icon-badge.type-logout {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.38);
  color: #f43f5e;
  box-shadow: 0 0 24px rgba(225, 29, 72, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.prompt-icon-badge.is-warning,
.prompt-icon-badge.type-warning {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.38);
  color: #facc15;
  box-shadow: 0 0 24px rgba(234, 179, 8, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.prompt-icon-badge.is-info,
.prompt-icon-badge.type-info {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================================
   PREMIUM MODAL & ACTION BUTTONS
   ============================================================ */

/* Cancel / Ghost button */
.pill-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  user-select: none;
  white-space: nowrap;
}
.pill-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}
.pill-btn-ghost:active {
  transform: scale(0.97);
}

/* Confirm / White button */
.pill-btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  user-select: none;
  white-space: nowrap;
}
.pill-btn-white:hover {
  background: #ffffff;
  color: #08080a;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}
.pill-btn-white:active {
  transform: scale(0.97);
}

/* Blood / Danger button */
.btn--blood-danger,
.pill-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #e11d48, #9f1239);
  border: 1px solid #fb7185;
  color: #ffffff;
  border-radius: 8px;
  padding: 10px 22px;
  font-family: var(--f-ui);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(225, 29, 72, 0.35);
  user-select: none;
  white-space: nowrap;
}
.btn--blood-danger:hover,
.pill-btn-danger:hover {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.55);
  transform: translateY(-1px);
}
.btn--blood-danger:active,
.pill-btn-danger:active {
  transform: scale(0.97);
}

/* Toast Notifications */
.zxc-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
}

.zxc-toast-item {
  background: #181822;
  border: 1px solid var(--line);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideToast 0.3s ease-out;
}

@keyframes slideToast {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1024px) {
  .zxc-top-hero-card {
    grid-template-columns: 1fr;
  }
  .modes-selection-row {
    grid-template-columns: 1fr;
  }
  .host-desk-container {
    grid-template-columns: 1fr;
  }
  .editorial-banner-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* ============================================================
   CUSTOM PROCEDURAL EDITORIAL BANNERS (NO STATIC PHOTOS)
   ============================================================ */

.editorial-banner {
  background: #0d0d0f;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.9);
}

.editorial-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 80% 20%, rgba(225, 29, 72, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.02) 0%, transparent 45%);
  pointer-events: none;
}

.editorial-watermark-kanji {
  position: absolute;
  right: 24px;
  bottom: -20px;
  font-family: serif;
  font-size: 150px;
  font-weight: 900;
  color: #ffffff;
  opacity: 0.025;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

.editorial-banner-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
}

.editorial-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 0;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: #d4d4d8;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.editorial-tag-pill .pulse-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e11d48;
  box-shadow: 0 0 10px #e11d48;
}

.editorial-title {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1.85rem;
  color: #ffffff;
  letter-spacing: 1px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.editorial-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.6;
}

.editorial-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.editorial-meta-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 1px;
  font-weight: 600;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

/* Vector Art Centerpiece in Banner */
.editorial-vector-art {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  position: relative;
}

/* Timeline of Night Steps */
.rules-timeline-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
}

.rules-step-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all 0.25s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.rules-step-card:hover {
  border-color: var(--line);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.rules-step-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--step-accent, #ffffff);
}

.rules-step-num {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--step-accent, #ffffff);
  min-width: 32px;
  padding-top: 2px;
}

.rules-step-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 13px;
  color: #ededed;
  flex-shrink: 0;
}

.rules-step-body {
  flex: 1;
}

.rules-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.rules-step-name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
}

.rules-step-team {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 9999px;
  font-weight: 700;
  text-transform: uppercase;
}

.rules-step-desc {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Fouls Visual Grid */
.foul-visual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.foul-visual-card {
  background: var(--bg-tile);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all 0.25s var(--ease-out);
}

.foul-visual-card:hover {
  transform: translateY(-2px);
  border-color: var(--line);
}

.foul-meter-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}

.foul-meter-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.foul-meter-dot.active-warn {
  background: #facc15;
  border-color: #eab308;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
}

.foul-meter-dot.active-mute {
  background: #f97316;
  border-color: #ea580c;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
}

.foul-meter-dot.active-death {
  background: #ef4444;
  border-color: #dc2626;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
}

.foul-card-title {
  font-family: var(--f-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.foul-card-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Roles Filter Bar */
.role-filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.role-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  padding: 9px 22px;
  border-radius: 0;
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s var(--ease-btn);
}

.role-filter-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  letter-spacing: 0.22em;
}

.role-filter-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.15);
}

/* ============================================================
   PAGE & VIEW SWITCH TRANSITIONS
   ============================================================ */
.app-view {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  will-change: opacity, transform;
}

.app-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: appViewEntrance 0.36s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-view.view-leaving {
  opacity: 0;
  transform: translateY(-10px);
  animation: appViewExit 0.16s cubic-bezier(0.4, 0, 1, 1) forwards;
  pointer-events: none;
}

@keyframes appViewEntrance {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes appViewExit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ============================================================
   GLOBAL INTERACTIVE MICRO-ANIMATIONS (EVERYWHERE FEEDBACK)
   ============================================================ */

/* Disable mobile tap flash */
*, *::before, *::after {
  -webkit-tap-highlight-color: transparent;
}

/* Smooth physics for all interactive elements */
button,
.btn,
.icon-btn,
.nav-tab,
.role-filter-btn,
.host-tab-btn,
.quick-action-btn,
.auth-mode-btn,
.auth-discord-btn,
.mode-card,
.zxc-role-card,
.player-slot-card,
.foul-visual-card,
.rules-step-card,
.rules-tab-btn,
.modal-close-btn {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tactile micro-press feedback on click/tap everywhere */
button:active:not(:disabled),
.btn:active:not(:disabled),
.icon-btn:active:not(:disabled),
.nav-tab:active:not(:disabled),
.role-filter-btn:active:not(:disabled),
.host-tab-btn:active:not(:disabled),
.quick-action-btn:active:not(:disabled),
.auth-discord-btn:active:not(:disabled),
.rules-tab-btn:active:not(:disabled) {
  transform: scale(0.95) !important;
  transition: transform 0.08s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Card tactile feedback on click */
.mode-card:active,
.player-slot-card:active,
.foul-visual-card:active,
.rules-step-card:active {
  transform: scale(0.985);
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered wave entrance for role cards */
.zxc-role-card {
  animation: roleCardEntrance 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--card-index, 0) * 0.04s);
}

@keyframes roleCardEntrance {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Host Desk Tab Smooth Switching */
.host-tab-btn {
  position: relative;
  overflow: hidden;
}
.host-tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--blood-hi);
  transform: translateX(-50%);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.host-tab-btn.active::after {
  width: 80%;
}


