:root {
    --bg: #0b0f14;
    --bg2: #0f1620;
    --card: #0f1722cc;
    --line: #1b2a3b;
    --text: #e6edf6;
    --muted: #a6b3c2;

    --accent: #4dabf7;
    /* akcent */
    --glow: #62899;
    /* glow/gradient */

    --danger: #ff4d6d;
    --ok: #4dabf7;

    --radius: 18px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background:
        radial-gradient(1100px 520px at 12% -10%, rgba(98, 137, 153, .18), transparent 60%),
        radial-gradient(900px 520px at 90% 0%, rgba(77, 171, 247, .14), transparent 58%),
        radial-gradient(800px 520px at 50% 110%, rgba(98, 137, 153, .12), transparent 60%),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;

    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.page {
    min-height: 100vh;
    background: transparent !important;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px
}

main {
    flex: 1;
    padding: 34px 0 40px;
}

/* NAV */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: linear-gradient(to bottom, rgba(11, 15, 20, .90), rgba(11, 15, 20, .60));
    border-bottom: 1px solid rgba(27, 42, 59, .65);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "Space Grotesk", Inter, sans-serif;
    letter-spacing: .2px;
}

.brand .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 18px rgba(77, 171, 247, .70);
}

.brand span {
    font-size: 15px;
    opacity: .95;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    font-size: 13px;
    color: var(--muted);
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: .18s ease;
}

.nav-links a:hover {
    color: var(--text);
    border-color: rgba(77, 171, 247, .28);
    background: rgba(77, 171, 247, .10);
}

.nav-links a.active {
    color: var(--text);
    border-color: rgba(77, 171, 247, .40);
    background: rgba(77, 171, 247, .14);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(77, 171, 247, .45);
    background: rgba(77, 171, 247, .12);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;

    transition: .18s ease;
    cursor: pointer;
    user-select: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .28);
}

.btn.primary {
    background: linear-gradient(135deg, rgba(77, 171, 247, .34), rgba(98, 137, 153, .22));
    border-color: rgba(77, 171, 247, .55);
}

.btn.ghost {
    border-color: rgba(27, 42, 59, .90);
    background: rgba(15, 22, 32, .55);
    color: var(--muted);
}

.btn.ghost:hover {
    color: var(--text);
    border-color: rgba(77, 171, 247, .28);
    background: rgba(77, 171, 247, .08);
}

/* HOME ONLY: centrowanie pionowe tylko na stronie głównej */
body.home main {
    display: flex;
    justify-content: center;
}

.main-center {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* HERO / CARD */
.page-hero,
.card {
    border: 1px solid rgba(27, 42, 59, .85);
    background: linear-gradient(180deg, rgba(15, 22, 32, .78), rgba(15, 22, 32, .52));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.page-hero {
    position: relative;
    overflow: hidden;
}

.hero-logo {
    position: absolute;
    right: 30px;
    bottom: 25px;

    width: 150px;
    max-width: 35%;
    opacity: .9;

    pointer-events: none;
}

.page-hero h1 {
    margin: 0;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 32px;
    letter-spacing: .2px;
}

.page-hero p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
    max-width: 72ch;
}

.hero-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* GRID */
.grid-2 {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
    align-items: start;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr
    }
}

.card h3 {
    margin: 0 0 10px;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 16px;
    letter-spacing: .2px;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.sep {
    height: 1px;
    background: rgba(27, 42, 59, .65);
    margin: 16px 0;
}

/* STATUS */
.pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(77, 171, 247, .30);
    background: rgba(77, 171, 247, .10);
}

.pill .led {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(103, 247, 77, 0.7);
    box-shadow: 0 0 14px rgba(103, 247, 77, 0.7);
}

.kv {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px dashed rgba(27, 42, 59, .75);
}

.kv:first-of-type {
    border-top: none;
    padding-top: 0
}

.kv .k {
    color: var(--muted);
    font-size: 12px
}

.kv .v {
    font-weight: 800;
    font-size: 13px
}

/* ACCORDION (Regulamin) */
.accordion {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.acc-item {
    border: 1px solid rgba(27, 42, 59, .85);
    background: rgba(15, 22, 32, .52);
    border-radius: 16px;
    overflow: hidden;
}

.acc-btn {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;

    padding: 14px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    font-weight: 800;
    font-size: 13px;
}

.acc-btn span {
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
}

.chev {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(27, 42, 59, .85);
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: .18s ease;
}


/* Panel zamiast max-height/height animujemy gridem */
.acc-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 220ms ease;
    padding:0vh 1.5vh 0vh 1.5vh;
}

/* Ważne: treść musi być "ucinana" */
.acc-panel .acc-content {
    overflow: hidden;
}

/* Stan otwarty */
.acc-item.is-open .acc-panel {
    grid-template-rows: 1fr;
}

/* Dodatkowy lekki efekt (tani w renderze) */
.acc-content {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease;
    will-change: opacity, transform;
}

.acc-item.is-open .acc-content {
    opacity: 1;
    transform: translateY(0);
}

/* Preferencje systemowe: bez animacji */
@media (prefers-reduced-motion: reduce) {

    .acc-panel,
    .acc-content {
        transition: none !important;
        transform: none !important;
    }
}

.acc-item.open .chev {
    transform: rotate(180deg);
    color: var(--text);
    border-color: rgba(77, 171, 247, .28);
    background: rgba(77, 171, 247, .08);
}

.rules-accept {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    user-select: none;
}

.check input {
    accent-color: var(--accent);
    width: 16px;
    height: 16px
}

/* FACTIONS (Podania) */
.factions {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .factions {
        grid-template-columns: 1fr
    }
}

.faction-card {
    border: 1px solid rgba(27, 42, 59, .85);
    background: linear-gradient(180deg, rgba(15, 22, 32, .72), rgba(15, 22, 32, .48));
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .30);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 185px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
    border-radius: 999px;
    width: max-content;
    border: 1px solid rgba(77, 171, 247, .28);
    background: rgba(77, 171, 247, .08);
}

.faction-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6
}

.req {
    margin: 0;
    padding-left: 16px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7
}

.faction-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

/* MODAL (Podania) */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 100;
}

.modal.open {
    display: flex
}

.modal-card {
    width: min(680px, 100%);
    border: 1px solid rgba(27, 42, 59, .85);
    background: linear-gradient(180deg, rgba(15, 22, 32, .92), rgba(15, 22, 32, .78));
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.modal-head {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(27, 42, 59, .70);
}

.modal-head h3 {
    margin: 0;
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 16px;
}

.x {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid rgba(27, 42, 59, .85);
    background: rgba(11, 15, 20, .35);
    color: var(--muted);
    cursor: pointer;
}

.x:hover {
    color: var(--text);
    border-color: rgba(77, 171, 247, .28);
    background: rgba(77, 171, 247, .08);
}

.modal-body {
    padding: 16px
}

.form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 720px) {
    .form {
        grid-template-columns: 1fr
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px
}

.field label {
    font-size: 12px;
    color: var(--muted)
}

.field input,
.field textarea,
.field select {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(27, 42, 59, .85);
    background: rgba(11, 15, 20, .40);
    color: var(--text);
    outline: none;
    font-size: 13px;
}

.field textarea {
    min-height: 120px;
    resize: vertical
}

.modal-actions {
    padding: 0 16px 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.hint {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

/* FOOTER */
footer {
    margin-top: auto;
    border-top: 1px solid rgba(27, 42, 59, .70);
    background: rgba(11, 15, 20, .55);
    padding: 18px 0;
    font-size: 12px;
    color: var(--muted);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-inner a {
    color: var(--muted)
}

.footer-inner a:hover {
    color: var(--text)
}






/* ===== PAGE TRANSITIONS ===== */

.page {
    animation: pageIn .55s ease forwards;
}

.page.fade-out {
    animation: pageOut .45s ease forwards;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pageOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

















/* ===== STATUS COLORS ===== */

/* ONLINE */
.pill.online {
    border-color: rgba(77, 247, 123, .45);
    background: rgba(77, 247, 123, .12);
}

.pill.online .led {
    background: #4df77b;
    box-shadow: 0 0 14px rgba(77, 247, 123, .85);
    animation: pulse-green 1.6s infinite;
}

/* OFFLINE */
.pill.offline {
    border-color: rgba(255, 77, 109, .45);
    background: rgba(255, 77, 109, .12);
}

.pill.offline .led {
    background: #ff4d6d;
    box-shadow: 0 0 14px rgba(255, 77, 109, .85);
}

/* ANIMACJA TYLKO DLA ONLINE */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 rgba(77, 247, 123, 0);
    }

    50% {
        box-shadow: 0 0 14px rgba(77, 247, 123, .9);
    }

    100% {
        box-shadow: 0 0 0 rgba(77, 247, 123, 0);
    }
}





.footer-disclaimer {
  flex: 1;
  text-align: center;
  font-size: 11px;
  letter-spacing: .4px;
  opacity: .55;
  text-transform: uppercase;
  user-select: none;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
















/* ===== MANAGEMENT ===== */

.management {
  margin-top: 24px;
}

.management .muted {
  margin: -4px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 14px;
}

.manager {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(27, 42, 59, .8);
  background: rgba(11, 15, 20, .35);

  transition: .2s ease;
}

.manager:hover {
  border-color: rgba(77, 171, 247, .35);
  background: rgba(77, 171, 247, .06);
}

.manager strong {
  display: block;
  font-size: 14px;
}

.manager span {
  font-size: 12px;
  color: var(--muted);
}

/* Avatar */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;

  display: grid;
  place-items: center;

  font-weight: 900;
  font-size: 15px;
  color: var(--text);

  background: linear-gradient(
    135deg,
    rgba(77, 171, 247, .35),
    rgba(98, 137, 153, .25)
  );
  box-shadow: 0 0 18px rgba(77, 171, 247, .25);
}

.management-bottom {
  margin: 60px auto 40px;
  max-width: 1100px;
}

.management-bottom h3 {
  font-size: 18px;
}