/* ══════════════════════════════════════
   CONFIG
══════════════════════════════════════ */
:root {
  --accent:    #8620d6;
  --accent-2:  #8620d6;
  --bg:        #09090b;
  --surface:   #111116;
  --surface-2: #18181f;
  --border:    rgba(255,255,255,0.07);
  --border-h:  rgba(255,255,255,0.14);
  --text:      #f4f4f5;
  --muted:     #71717a;
  --muted-2:   #3f3f46;

--font-display: 'DM Sans', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --r: 14px;
  --r-sm: 8px;
}

/* ══════════════════════════════════════
   RESET & BASE
══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;

  /* wygładzanie czcionki */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  font-weight: 400;
  letter-spacing: 0.2px;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted-2); border-radius: 99px; }

/* ══════════════════════════════════════
   NOISE OVERLAY
══════════════════════════════════════ */

.team-av {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 1px solid var(--border);
}

body::after {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
}

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 64px;
  display: flex; align-items: center;
  padding: 0 2rem;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(9, 9, 11, 0);
  border-color: var(--border);
  backdrop-filter: blur(6px);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-right: auto;
}
.nav-logo em { color: var(--accent); font-style: normal; }
.nav-links {
  display: flex; gap: 0.25rem; list-style: none;
}
.nav-links a {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0); }
.nav-action {
  margin-left: 1rem;
  display: flex; gap: 0.5rem;
}
.nav-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
}
.nav-btn-ghost {
  color: var(--muted);
  border: 1px solid var(--border);
}
.nav-btn-ghost:hover { color: var(--text); border-color: var(--border-h); background: rgba(255, 255, 255, 0); }
.nav-btn-fill {
  background: var(--accent);
  color: #fff;
}
.nav-btn-fill:hover { opacity: 0.88; transform: translateY(-1px); }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 80px 2rem 4rem;
  text-align: center;
  overflow: hidden;
}

/* GRID */
.grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);

  background-size: 50px 50px;

  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);

  animation: gridMove 18s linear infinite;
}

@keyframes gridMove {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(50px);
  }
}

/* PARTICLES */
#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* glow orbs */
.hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 127, 255, 0) 0%, transparent 70%);
  top: -150px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.hero::after {
  display: none !important;
}

.hero-inner { position: relative; z-index: 1; max-width: 780px; }

.hero-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(91,127,255,0.1);
  border: 1px solid rgba(91,127,255,0.25);
  padding: 0.35rem 0.9rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #a5b4fc;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.1s ease forwards;
}
.hero-pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 6px #818cf8;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(129,140,248,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(129,140,248,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  color: var(--text);
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s ease forwards;
}
.hero-title .hl {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  font-weight: 400;
  opacity: 0;
  animation: fadeUp 0.7s 0.3s ease forwards;
}

.hero-btns {
  display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.7s 0.4s ease forwards;
}
.btn-lg {
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-size: 0.9rem; font-weight: 600;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(91,127,255,0.4), 0 8px 20px rgba(91,127,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(91,127,255,0.6), 0 12px 28px rgba(91,127,255,0.35); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-h); background: rgba(255,255,255,0.06); transform: translateY(-1px); }

/* hero banner */
.hero-banner-wrap {
  margin-top: 4rem;
  position: relative;
  opacity: 0;
  animation: fadeUp 0.8s 0.55s ease forwards;
}
.hero-banner-wrap::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: calc(var(--r) + 1px);
  background: linear-gradient(135deg, rgba(91,127,255,0.4), rgba(167,139,250,0.2), transparent 60%);
  z-index: 0;
}
.hero-banner-inner {
  position: relative; z-index: 1;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
}
.hero-banner-inner img { width: 100%; max-width: 820px; }

/* stats */
.hero-stats {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0;
  margin-top: 3.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  opacity: 0;
  animation: fadeUp 0.7s 0.65s ease forwards;
}
.stat-item {
  flex: 1; min-width: 130px;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
  text-align: center;
  transition: background 0.2s;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(255,255,255,0.03); }
.stat-num {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
  display: block;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 500; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   SECTION COMMON
══════════════════════════════════════ */
.section { padding: 6rem 2rem; }
.container { max-width: 1100px; margin: 0 auto; }
.container-sm { max-width: 800px; margin: 0 auto; }

.sec-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.sec-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
.sec-sub {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 460px;
  line-height: 1.75;
}

/* ══════════════════════════════════════
   FACTIONS
══════════════════════════════════════ */
#applications { background: var(--bg); }

.factions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.faction-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.faction-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--fc, var(--accent)), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.faction-card:hover {
  border-color: var(--border-h);
  background: var(--surface-2);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.faction-card:hover::before { opacity: 1; }

.fc-top {
  display: flex; align-items: center; gap: 0.85rem;
  margin-bottom: 0.9rem;
}
.fc-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: background 0.2s;
}
.faction-card:hover .fc-icon { background: rgba(255,255,255,0.06); }
.fc-name { font-size: 1rem; font-weight: 600; color: var(--text); }
.fc-tag {
  font-size: 0.7rem; font-weight: 500;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  margin-top: 0.15rem;
  display: inline-block;
}
.fc-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.65; margin-bottom: 1.25rem; }
.fc-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; font-weight: 600;
  color: var(--fc, var(--accent));
  padding: 0.55rem 1rem;
  border-radius: var(--r-sm);
  background: rgba(91,127,255,0.08);
  border: 1px solid rgba(91,127,255,0.15);
  transition: all 0.2s;
}
.faction-card:hover .fc-cta {
  background: rgba(91,127,255,0.15);
  gap: 0.6rem;
}

/* ══════════════════════════════════════
   TEAM
══════════════════════════════════════ */
#team { background: var(--surface); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.team-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.team-av {
  width: 60px; height: 60px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(91,127,255,0.3);
}
.team-name { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.team-role {
  font-size: 0.72rem; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.team-bio { font-size: 0.8rem; color: var(--muted); margin-top: 0.6rem; line-height: 1.55; }


/* ══════════════════════════════════════
   CTA
══════════════════════════════════════ */
#join { background: var(--surface); }

.cta-card {
  max-width: 720px; margin: 0 auto;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,127,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 900; letter-spacing: -1px;
  color: var(--text); margin-bottom: 0.75rem;
}
.cta-title span { color: var(--accent); }
.cta-desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.75; }
.cta-btns { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.75rem 2rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text);
}
.footer-logo em { color: var(--accent); font-style: normal; }
.footer-copy { font-size: 0.78rem; color: var(--muted-2); }

/* ══════════════════════════════════════
   MODAL
══════════════════════════════════════ */
.modal-bg {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-bg.show { display: flex; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-h);
  border-radius: 18px;
  max-width: 620px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  animation: modalIn 0.22s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
  padding: 1.5rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  position: sticky; top: 0;
  background: var(--surface); z-index: 1;
  border-radius: 18px 18px 0 0;
}
.modal-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.modal-subtitle { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.modal-close {
  margin-left: auto;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s; flex-shrink: 0;
}
.modal-close:hover { border-color: var(--border-h); color: var(--text); background: rgba(255,255,255,0.05); }
.modal-body { padding: 1.75rem; }

/* FORM */
.fg { margin-bottom: 1.1rem; }
.fl {
  display: block;
  font-size: 0.75rem; font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.3px;
  margin-bottom: 0.45rem;
}
.fi, .fsel, .fta {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-family: var(--font-body); font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fi:focus, .fsel:focus, .fta:focus {
  border-color: rgba(91,127,255,0.5);
  box-shadow: 0 0 0 3px rgba(91,127,255,0.1);
}
.fi::placeholder, .fta::placeholder { color: var(--muted-2); }
.fta { resize: vertical; min-height: 88px; }
.fsel option { background: #18181f; }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.range-wrap { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.45rem; }
.frange { flex: 1; -webkit-appearance: none; height: 4px; border-radius: 99px; background: var(--surface-2); outline: none; }
.frange::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(91,127,255,0.25);
  transition: box-shadow 0.2s;
}
.frange::-webkit-slider-thumb:hover { box-shadow: 0 0 0 5px rgba(91,127,255,0.25); }
.range-num { font-size: 0.85rem; font-weight: 700; color: var(--accent); min-width: 22px; text-align: right; }

.fsub-btn {
  width: 100%; padding: 0.8rem;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 0.9rem; font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(91,127,255,0.3);
  margin-top: 0.25rem;
}
.fsub-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.fsub-btn:disabled { opacity: 0.45; transform: none; cursor: not-allowed; }

.f-alert {
  margin-top: 0.9rem; padding: 0.75rem 1rem;
  border-radius: 8px; font-size: 0.83rem;
  display: none;
}
.f-alert.ok { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.2); color: #6ee7b7; display: block; }
.f-alert.err { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; display: block; }

/* ══════════════════════════════════════
   REVEAL
══════════════════════════════════════ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-action .nav-btn-ghost { display: none; }
  .fg-row { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .cta-card { padding: 2.5rem 1.5rem; }
  footer { flex-direction: column; text-align: center; }
}

#rules {
  background: var(--surface);
}

.rules-box {
  margin-top: 3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  color: var(--muted);
  line-height: 1.8;
}

.rules-box h3 {
  color: var(--text);
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.rules-box h3:first-child {
  margin-top: 0;
}

.rules-box p {
  font-size: 0.9rem;
}

.rule-title {
  transition: all 0.35s ease;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  display: inline-block;
  opacity: 0.6;
  transform: translateX(0);
}

.rule-title.active {
  background: #7700ff;
  color: var(--text);
  opacity: 1;
  transform: translateX(6px);
  box-shadow: 0 0 0 1px #7700ff;
}

.rule-text {
  margin-bottom: 1.25rem;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 70px;
  width: auto;
  object-fit: contain;
}

#rules .reveal {
  opacity: 1 !important;
  transform: none !important;
}

.rules-box {
  width: 100%;
  overflow-wrap: break-word;
}

@media (max-width: 680px) {

  #rules {
    padding: 4rem 1rem;
  }

  .rules-box {
    padding: 1.2rem;
    font-size: 0.85rem;
    line-height: 1.7;
  }

  .rule-title {
    font-size: 0.95rem;
  }

}

#rules {
  scroll-margin-top: 90px;
}

#keybinds {
  background: var(--bg);
}

.keybinds-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.keybinds-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  transition: 0.25s;
}

.keybinds-card:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  background: var(--surface-2);
}

.keybinds-card h3 {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: var(--accent);
  letter-spacing: 1px;
}

.key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.key:last-child {
  border-bottom: none;
}

.kbd {
  min-width: 55px;
  text-align: center;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.75rem;
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.05);
}

/* ===== KEYBIND OVERLAY ===== */
.keybind-overlay {
  position: fixed;
  top: 90px;
  right: 20px;
  width: 260px;
  z-index: 999;
  background: rgba(17, 17, 22, 0.85);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.keybind-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  letter-spacing: 1px;
}

.keybind-header button {
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}

.keyboard {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kb-row {
  display: flex;
  gap: 0.4rem;
  justify-content: space-between;
}

.keycap {
  flex: 1;
  text-align: center;
  padding: 0.55rem 0;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.2s, box-shadow 0.2s;
  user-select: none;
}

/* 🔥 CLICK ANIMATION */
.keycap:active {
  transform: translateY(3px) scale(0.96);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(119,0,255,0.4);
}

/* highlight pulse (JS trigger) */
.keycap.active {
  animation: keyPulse 0.25s ease;
}

@keyframes keyPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(119,0,255,0.6); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* mobile */
@media (max-width: 680px) {
  .keybind-overlay {
    width: 220px;
    right: 10px;
    top: 80px;
  }
}

/* ===== KEYBOARD ===== */

#keybinds {
  background: var(--bg);
}

.keyboard {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}

.kb-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.key {
  position: relative;
  min-width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;

  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);

  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.key:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(119, 0, 255, 0.25);
  background: var(--surface-2);
}

.key.wide {
  min-width: 120px;
}

.key.alt {
  background: rgba(119, 0, 255, 0.08);
  border-color: rgba(119, 0, 255, 0.25);
}

/* tooltip */
.key::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);

  background: #0b0b10;
  border: 1px solid var(--border);
  color: var(--text);

  padding: 0.5rem 0.75rem;
  border-radius: 8px;

  font-size: 0.75rem;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;

  z-index: 10;
}

.key:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0px);
}

/* ══════════════════════════════════════
   KEYBINDS / KLAVIATURA UI (FIXED)
══════════════════════════════════════ */

#keybinds {
  background: var(--bg);
  position: relative;
  overflow: visible;
}

#keybinds .reveal {
  position: relative;
  z-index: 1;
}

/* keyboard container */
.keyboard {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  overflow: visible;
  position: relative;
  z-index: 5;
}

/* rows */
.kb-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* KEY */
.key {
  position: relative;

  min-width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;

  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);

  cursor: pointer;
  user-select: none;

  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;

  will-change: transform;
}

/* CLICK ANIMATION */
.key:active {
  transform: scale(0.92) translateY(2px);
  background: var(--surface-2);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

/* hover (PC only) */
@media (hover: hover) {
  .key:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(119, 0, 255, 0.25);
    background: var(--surface-2);
  }
}

/* special key */
.key.alt {
  background: rgba(119, 0, 255, 0.08);
  border-color: rgba(119, 0, 255, 0.25);
}

.key.wide {
  min-width: 120px;
}

/* ══════════════════════════════════════
   TOOLTIP (FIXED - NO BUGGING HEADER)
══════════════════════════════════════ */

.key::after {
  content: attr(data-tip);
  position: absolute;

  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  background: #0b0b10;
  border: 1px solid var(--border);
  color: var(--text);

  padding: 0.5rem 0.75rem;
  border-radius: 8px;

  font-size: 0.75rem;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;

  transition: 0.18s ease;

  z-index: 9999;

  max-width: 220px;
  text-align: center;
}

/* hover tooltip (PC) */
@media (hover: hover) {
  .key:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* mobile click tooltip */
.key.show::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══════════════════════════════════════
   MOBILE FIX
══════════════════════════════════════ */

@media (max-width: 680px) {
  .keyboard {
    gap: 0.6rem;
  }

  .kb-row {
    gap: 0.5rem;
  }

  .key {
    min-width: 46px;
    height: 46px;
    font-size: 0.8rem;
  }

  .key.wide {
    min-width: 100px;
  }

  /* tooltip lepszy na mobile */
  .key::after {
    font-size: 0.72rem;
    max-width: 180px;
    white-space: normal;
  }
}

/* =========================
   MOBILE OVERLAY
========================= */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: 0.35s ease;
  z-index: 90;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* =========================
   MOBILE MENU BASE
========================= */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 280px;
  background: #0f0f0f;

  transform: translateX(110%);
  opacity: 0;
  filter: blur(10px);

  transition: 0.35s ease;
  z-index: 100;

  display: flex;
  flex-direction: column;
  padding: 80px 24px;
  gap: 18px;
}

/* OPEN STATE */
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  filter: blur(0);
}

/* LINKS */
.mobile-menu a {
  color: white;
  text-decoration: none;
  font-size: 18px;
  opacity: 0.85;
  transition: 0.2s;
}

.mobile-menu a:hover {
  opacity: 1;
  transform: translateX(4px);
}

/* BUTTONS */
.mobile-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-mobile {
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
}

.btn-mobile.ghost {
  border: 1px solid #333;
  color: white;
}

.btn-mobile.fill {
  background: #6c5ce7;
  color: white;
}

/* =========================
   HAMBURGER ANIMATION ☰ → ✕
========================= */
.nav-toggle {
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  display: none;
  z-index: 120;
}

/* active state (✕) */
.nav-toggle.active {
  content: "✕";
}

/* =========================
   MOBILE BREAKPOINT
========================= */
@media (max-width: 900px) {
  .nav-links,
  .nav-action {
    display: none;
  }

  .nav-toggle {
    display: block;
  }
}

#modalBg.fade-in .modal-body {
  animation: modalIn .25s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title {
  font-weight: 700;
  margin: 15px 0 10px;
  padding-left: 6px;
}

.section-title.ooc { color: #60a5fa; }
.section-title.ic { color: #34d399; }
.section-title.custom { color: #fbbf24; }

.modal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.modal-tab {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: 0.2s;

  color: #fff;
}

.modal-tab.active {
  background: #7700ff;
  border-color: #7700ff;
}

.modal-section {
  display: none;
}

.modal-section.active {
  display: block;
}

/* ══════════════════════════════════════
   HERO ANIMATED BACKGROUND
══════════════════════════════════════ */

.hero {
  position: relative;
  overflow: hidden;
}

/* background container */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* content over bg */
.hero-inner {
  position: relative;
  z-index: 2;
}

/* animated grid */
.grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);

  background-size: 50px 50px;

  mask-image: radial-gradient(circle at center, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 90%);

  animation: gridMove 18s linear infinite;
  opacity: 0.7;
}

@keyframes gridMove {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(50px);
  }
}

/* glow orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
}

.orb-1 {
  width: 420px;
  height: 420px;

  background: #7700ff;

  top: -120px;
  left: -80px;

  animation: floatOrb1 12s ease-in-out infinite;
}

.orb-2 {
  width: 340px;
  height: 340px;

  background: #4f46e5;

  bottom: -100px;
  right: -60px;

  animation: floatOrb2 15s ease-in-out infinite;
}

@keyframes floatOrb1 {
  0%,100% {
    transform: translate(0,0);
  }

  50% {
    transform: translate(40px,-30px);
  }
}

@keyframes floatOrb2 {
  0%,100% {
    transform: translate(0,0);
  }

  50% {
    transform: translate(-30px,40px);
  }
}

/* particles canvas */
#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
pointer-events: auto;
  z-index: 0; 
}

/* premium buttons */
.btn-lg {
  transition:
    transform .18s ease,
    box-shadow .25s ease,
    background .25s ease;
}

.btn-lg:hover {
  transform: translateY(-3px);
}

/* subtle hero vignette */
.hero::after {
  content: '';

  position: absolute;
  inset: 0;

  background:
    radial-gradient(circle at center,
    transparent 40%,
    rgba(0,0,0,0.45) 100%);

  z-index: 1;
  pointer-events: none;
}

/* reveal smoother */
.reveal {
  transition:
    opacity .8s cubic-bezier(.2,.65,.2,1),
    transform .8s cubic-bezier(.2,.65,.2,1);
}

/* mobile optimization */
@media (max-width: 680px) {

  .grid {
    background-size: 36px 36px;
  }

  .orb-1 {
    width: 260px;
    height: 260px;
  }

  .orb-2 {
    width: 220px;
    height: 220px;
  }

  .cursor-glow {
    display: none;
  }

}

#loader {
  position: fixed;
  inset: 0;
  background: #09090b;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-direction: column;

  transition: opacity .6s ease, visibility .6s ease;
}

#loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  text-align: center;
}

.loader-logo {
  width: 120px;
  margin-bottom: 20px;
  animation: popIn 1s ease;
}

@keyframes popIn {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.loader-bar {
  width: 200px;
  height: 4px;
  background: #222;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px auto;
  position: relative;
}

.loader-bar::after {
  content: "";
  position: absolute;
  left: -50%;
  width: 50%;
  height: 100%;
  background: #7700ff;
  animation: loadMove 1.5s infinite;
}

@keyframes loadMove {
  0% { left: -50%; }
  100% { left: 100%; }
}

.loader-inner p {
  color: #888;
  font-size: 13px;
  margin-top: 10px;
}

body {
  opacity: 0;
  animation: pageIn 0.8s ease forwards;
}

@keyframes pageIn {
  to {
    opacity: 1;
  }
}

.loader-logo {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  margin: 0 auto 20px auto;
  animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.loader-progress-text {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
  opacity: 0.7;
  color: white;
}

#intro {
  position: fixed;
  inset: 0;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: introFade 2.5s ease forwards;
}

.intro-logo {
  width: 180px;
  opacity: 0;
  transform: scale(0.8);
  animation: logoIn 1.2s ease forwards;
}

@keyframes logoIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes introFade {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.nav-action {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* desktop: wszystko w jednej linii */
.nav-login {
  margin-left: 0;
}

/* MOBILE */
@media (max-width: 768px) {
  .nav-auth {
    flex-direction: column;
    align-items: flex-end; /* albo center jak wolisz */
  }

  .nav-auth a {
    width: 100%;
    text-align: center;
  }
}

.nav-user-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* profil */
.nav-profile {
  display: none;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}

/* avatar */
.nav-profile img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #5865F2;
}

/* tooltip nick */
.nav-profile::after {
  content: attr(data-name);
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
  white-space: nowrap;
}

.nav-profile:hover::after {
  opacity: 1;
}

.nav-user{
  display:flex;
  align-items:center;
  position:relative;
}

/* avatar */
.nav-user .profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-user .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #5865F2;
}

/* DROPDOWN */
.dropdown {
  position: absolute;
  top: 55px;
  right: 0;

  width: 180px;
  background: rgba(10, 12, 20, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;

  backdrop-filter: blur(15px);

  display: none;
  flex-direction: column;
  overflow: hidden;

  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.dropdown a {
  padding: 12px;
  color: white;
  text-decoration: none;
  font-size: 14px;

  transition: 0.2s;
}

.dropdown a:hover {
  background: rgba(88,101,242,0.2);
}

/* show */
.nav-user.active .dropdown {
  display: flex;
}

.profile-dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
}

.avatar-small {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.dropdown-menu {
  position: absolute;
  top: 110%;
  right: 0;
  background: #0f1118;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  min-width: 160px;

  display: none;
  flex-direction: column;
  overflow: hidden;
}

.dropdown-menu a {
  padding: 10px;
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.dropdown-menu a:hover {
  background: rgba(255,255,255,0.05);
}

.dropdown-menu.active {
  display: flex;
}

.dashboard-wrap{
  padding:120px 10%;
}

.dash-hero{
  margin-bottom:40px;
}

.dash-hero h1{
  font-size:42px;
  color:white;
}

.dash-hero p{
  opacity:.7;
}

.dash-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}

.dash-card{
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  padding:20px;
  border-radius:16px;
  transition:.3s;
}

.dash-card:hover{
  transform:translateY(-5px);
  border-color:rgba(255,255,255,0.25);
}

.dash-title{
  font-size:14px;
  opacity:.6;
  margin-bottom:10px;
}

.dash-value{
  font-size:18px;
  color:white;
}

.dash-user{
  display:flex;
  align-items:center;
  gap:12px;
}

.dash-avatar{
  width:48px;
  height:48px;
  border-radius:50%;
}

.dash-name{
  color:white;
  font-weight:600;
}

.dash-sub{
  font-size:12px;
  opacity:.6;
}

.nav-user{
  position:relative;
  display:flex;
  align-items:center;
}

/* ================= PROFILE ================= */

.profile-wrap{
  display:flex;
  align-items:center;
  gap:10px;

  padding:8px 14px;

  border-radius:14px;

  background:rgba(255,255,255,0.04);

  border:1px solid rgba(255,255,255,0.08);

  backdrop-filter:blur(10px);

  cursor:pointer;

  transition:.2s ease;
}

.profile-wrap:hover{
  background:rgba(255,255,255,0.08);

  border-color:rgba(255,255,255,0.12);
}

.profile-wrap img{
  width:34px !important;
  height:34px !important;

  border-radius:50%;

  object-fit:cover;
}

.profile-wrap span{
  color:#fff;

  font-size:14px;
  font-weight:600;
}

/* ================= DROPDOWN ================= */

.profile-menu{
  position:absolute;

  top:60px;
  right:0;

  width:190px;

  padding:8px;

  border-radius:16px;

  background:rgba(12,12,18,.96);

  border:1px solid rgba(255,255,255,.08);

  backdrop-filter:blur(16px);

  box-shadow:
    0 10px 30px rgba(0,0,0,.35);

  z-index:9999;

  display:none;

  animation:menuFade .15s ease;
}

/* ================= LOGOUT ================= */

.profile-menu a{
  display:flex;
  align-items:center;
  justify-content:center;

  width:100%;

  padding:12px;

  border-radius:12px;

  text-decoration:none;

  color:#ff7a7a;

  font-size:14px;
  font-weight:600;

  background:rgba(255,70,70,.06);

  transition:.2s ease;
}

.profile-menu a:hover{
  background:rgba(255,70,70,.14);

  transform:translateY(-1px);
}

/* ================= ANIM ================= */

@keyframes menuFade{
  from{
    opacity:0;
    transform:translateY(-6px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }
}

.user-menu {
  position: absolute;
  top: 52px;
  right: 0;

  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 10px;
  min-width: 180px;

  background: rgba(15, 15, 18, 0.75);
  backdrop-filter: blur(14px);

  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;

  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  pointer-events: none;

  transition: 0.25s ease;
}

.user-menu.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.logout-btn {
  padding: 11px 12px;
  border-radius: 12px;

  border: 1px solid rgba(255, 60, 110, 0.25);

  background: linear-gradient(
    135deg,
    rgba(255, 0, 80, 0.18),
    rgba(255, 0, 80, 0.05)
  );

  color: #fff;
  cursor: pointer;

  display: flex;
  justify-content: space-between;
  align-items: center;

  transition: 0.25s ease;
  overflow: hidden;
  position: relative;
}

.logout-btn::before {
  content: "";
  position: absolute;
  inset: 0;

  background: radial-gradient(
    circle at 20% 50%,
    rgba(255, 0, 80, 0.25),
    transparent 70%
  );

  opacity: 0;
  transition: 0.3s;
}

.logout-btn:hover {
  transform: translateX(5px);
  box-shadow: 0 0 22px rgba(255, 0, 80, 0.25);
}

.logout-btn:hover::before {
  opacity: 1;
}

.user-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

#modalBg {
  opacity: 0;
  transition: opacity .3s ease;
}

#modalBg.show {
  opacity: 1;
}

#modalBg.closing {
  opacity: 0;
}

.modal-content {
  animation: modalOpen .3s ease;
}

#modalBg.closing .modal-content {
  animation: modalClose .3s ease forwards;
}

@keyframes modalOpen {
  from {
    opacity: 0;
    transform: scale(.92) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalClose {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  to {
    opacity: 0;
    transform: scale(.92) translateY(10px);
  }
}
/*USER LOGOWANIE*/
.user-dropdown {
  position: relative;
  display: inline-block;
  font-family: 'Inter', sans-serif;
}

.user-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  transition: 0.2s;
}

.user-trigger:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #7c5cff;
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.user-menu {
  position: absolute;
  right: 0;
  top: 110%;

  min-width: 160px;
  background: rgba(15,15,20,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;

  padding: 10px;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);

  transition: 0.2s ease;
}

/* AKTYWNY STAN (klik) */
.user-dropdown.active .user-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.logout-btn {
  width: 100%;
  padding: 8px;
  border-radius: 8px;

  border: 1px solid rgba(255,80,80,0.3);
  background: rgba(255,80,80,0.08);

  color: #ff6b6b;
  cursor: pointer;

  transition: 0.2s;
}

.logout-btn:hover {
  background: rgba(255,80,80,0.15);
  transform: scale(1.02);
}

.user-menu {
  z-index: 999;
}

.user-dropdown {
  position: relative;
  z-index: 1000;
}

.user-trigger {
  z-index: 1001;
  position: relative;
}

.user-menu {
  pointer-events: auto;
}

.user-dropdown.active .user-menu {
  pointer-events: auto;
}

.modal-user-profile {
    display: flex;
    align-items: center;
    justify-content: center; /* Wyśrodkowanie w poziomie */
    gap: 15px;
    margin: 20px auto; /* Wyśrodkowanie elementu */
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-width: fit-content; /* Minimalizm: szerokość dopasowana do zawartości */
}

.modal-user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Delikatna ramka wokół avatara */
}

.modal-user-profile .info {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Tekst wyrównany do lewej wewnątrz wyśrodkowanego bloku */
}

.modal-user-profile .info strong {
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

.modal-user-profile .info span {
    font-size: 0.75em;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-required {
    justify-content: center;
    color: #ff6b6b;
    font-weight: 500;
    font-size: 0.9em;
    padding: 10px;
    border: none !important;
    background: transparent !important;
}

/* Styl dla licznika znaków */
.char-counter {
    transition: color 0.3s ease;
}
.char-counter.limit-reached {
    color: #ff4d4d !important;
}

/* Animacja przycisku wysyłania */
.fsub-btn {
    transition: all 0.2s ease;
}
.fsub-btn:active {
    transform: scale(0.98); /* Kliknięcie "wciska" przycisk */
}

/* Podświetlenie pola po kliknięciu (focus) */
.fi:focus, .fta:focus {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

.limit-reached {
    color: #ff4d4d !important;
}

#live-stats { padding: 4rem 0; background: rgba(0,0,0,0.2); }

.player-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
  gap: 15px; 
  margin-top: 30px; 
}

.player-item { 
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px; 
  border-radius: 12px; 
  text-align: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  color: #cccccc7a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.player-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.player-item::before {
  content: '●';
  color: #4ade80; /* Zielona kropka "online" */
  font-size: 0.6rem;
}

#player-count { 
  color: var(--primary-color); 
  text-shadow: 0 0 20px rgba(var(--primary-rgb), 0.5);
}


/* ══════════════════════════════════════
   MODERN LIFTING - ENHANCEMENTS
══════════════════════════════════════ */

/* 1. Glassmorphism 2.0 - bardziej "premium" */
.cta-card, .rules-box, .player-item {
    background: linear-gradient(135deg, rgba(24, 24, 31, 0.8), rgba(20, 20, 25, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
}

/* 2. Interaktywne przyciski z "Glow" */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, var(--accent), #a855f7);
    border: none;
    color: white;
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}
.btn-primary:hover::after { left: 100%; }

/* 3. Poprawa czytelności długich tekstów */
.rules-box p, .cta-desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--muted);
    letter-spacing: 0.01em;
}

/* 4. Subtelny "Focus" dla pól formularza */
.fi, .fta {
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid var(--border) !important;
    transition: all 0.3s ease;
}
.fi:focus, .fta:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(134, 32, 214, 0.15) !important;
}

/* 5. Nagłówki z subtelnym gradientem */
h2 span {
    background: linear-gradient(to right, var(--accent), #e879f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Nowy kontener globalny */
.global-bg {
  position: fixed; /* Kluczowe: tło nie przewija się z treścią */
  inset: 0;
  z-index: -1; /* Zawsze pod spodem */
  overflow: hidden;
  background-color: #0b090b; /* Główny kolor tła strony */
}

.grid {
  position: absolute;
  inset: 0;
}

.orb {
  position: absolute;
}

.hero, section {
  background: transparent !important;
}

/* Kontener odliczania */
#countdown {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 2rem;
}

/* Pojedynczy element czasu */
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  /* Efekt "szkła" spójny z Twoim UI */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  
  padding: 1.25rem 1rem;
  border-radius: var(--r);
  min-width: 80px;
  transition: transform 0.2s, border-color 0.2s;
}

.countdown-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Liczba */
.countdown-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.25rem;
}

/* Etykieta (dni, godz, itd.) */
.countdown-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
}

.connect-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem 2rem;
  border-radius: var(--r);
  max-width: 500px;
  margin: 2rem auto;
  transition: all 0.3s ease;
}

.connect-card:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.connect-content {
  display: flex;
  flex-direction: column;
}

.connect-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 4px;
}

.connect-ip {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.connect-btn {
  display: inline-block;
  background: var(--surface-2);
  border: 1px solid var(--border-h);
  color: var(--text);
  padding: 0.8rem 1.2rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.connect-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(134, 32, 214, 0.3);
}

/* Responsywność dla telefonów */
@media (max-width: 480px) {
  .connect-card { flex-direction: column; text-align: center; }
}