@import url('https://fonts.googleapis.com/css2?family=Eczar:wght@400;500;600;700&display=swap');

/* ===========================
   Zmienne kolorów i layoutu
   =========================== */
:root {
  --color-bg: #000;
  --color-text: #fff;
  --color-muted: #bbb;
  --color-frame: #444;
  --color-outline: #444;
  --color-btn-bg: #fff;
  --color-btn-text: #000;
  --color-btn-bg-hover: #e6e6e6;

  --discord-accent: #5865F2;

  --radius: 12px;
  --col-left: 210px;
  --col-right: 210px;
  --page-max: 1140px;
  --gap-x: 24px;
  --gap-y: 24px;
  --gap: 24px;

  --mobile-bar-h: 56px; /* wysokość paska mobile */
}

/* ===========================
   Reset / baza
   =========================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; line-height: 1.5; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Eczar', serif;
  padding-top: 1rem;  
}

/* Linki */
a { color: var(--color-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===========================
   Górne menu (logo + auth)
   =========================== */
#top-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto 10px auto;
  height: 70px;
  width: 900px;
  padding: 0 20px;
}
#top-menu .logo { font-size: 1.5rem; font-weight: 700; }
#top-menu img { max-height: 60px; width: auto; display: block; }
#top-menu .auth .btn-link {
  display: inline-block;
  padding: 8px 16px;
  margin-left: 10px;
  border-radius: 4px;
  background: var(--color-btn-bg);
  color: var(--color-btn-text);
  text-decoration: none;
  transition: background .2s ease, opacity .2s ease;
}
#top-menu .auth .btn-link:hover { background: var(--color-btn-bg-hover); text-decoration: none; }

/* ===========================
   Baner
   =========================== */
#baner {
  width: 100%;
  max-width: 700px;
  height: 125px;
  margin: 1px auto;
  border: 1px solid var(--color-text);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
}
#baner img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: var(--radius); }

/* ===========================
   Layout 3 kolumny
   =========================== */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: var(--col-left) 1fr var(--col-right);
  column-gap: var(--gap-x);
  row-gap: var(--gap-y);
}

/* Karty / panele */
.card {
  border: 1px solid var(--color-outline);
  border-radius: var(--radius);
  padding: 18px;
  background: transparent;
}

/* ===========================
   Lewy sidebar
   =========================== */
#sidebar-left {
  border: 1px solid var(--color-frame);
  padding: 12px;
  background: transparent;
}
#sidebar-left h2 { font-size: 1.2rem; margin-bottom: 10px; opacity: .95; }
#sidebar-left nav ul { list-style: none; }
#sidebar-left nav li { margin: 10px 0; }
#sidebar-left nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--color-text);
  opacity: .9;
  transition: opacity .15s ease, background .15s ease;
}
#sidebar-left nav a:hover { background: rgba(255,255,255,.06); opacity: 1; }
#sidebar-left .group { padding: 12px; border: 1px solid var(--color-outline); border-radius: 12px; }
#sidebar-left .group + .group { margin-top: 16px; }

/* ===========================
   Środek
   =========================== */
#center-col { display: flex; flex-direction: column; gap: var(--gap); }

/* ===========================
   Prawy panel (Discord)
   =========================== */
#sidebar-right.discord { border: 1px solid #1e2a4a; border-radius: 8px; }
.discord { overflow: hidden; position: relative; }
.discord::before { content: ""; position: absolute; inset: 0; filter: saturate(1.1); z-index: 0; }
.discord .discord-body {
  position: relative; z-index: 1;
  padding: 24px; height: 200px;
  background: linear-gradient(180deg, rgba(46,58,116,.85), rgba(21,25,54,.85));
  display: flex; flex-direction: column; gap: 16px;
}
.discord h3 { font-size: 1.4rem; }
.discord p { color: var(--color-muted); line-height: 1.6; }
.btn-discord{
  margin-top: auto; display: inline-block; padding: 12px 18px;
  border-radius: 999px; background: var(--discord-accent); color: #fff;
  text-decoration: none; font-weight: 600; text-align: center;
  transition: filter .15s ease, transform .05s ease;
}
.btn-discord:hover{ filter:brightness(1.05); }
.btn-discord:active{ transform: translateY(1px); }

/* ===========================
   Stopka
   =========================== */
#site-footer { margin-top: 2rem; padding: 16px 0; text-align: center; }
#site-footer .brand { margin: 0; font-family: 'Eczar', serif; font-size: 1.1rem; }
#site-footer .tagline { margin: 4px 0 0; font-size: .95rem; letter-spacing: .3px; color: var(--color-muted); }

/* ===========================
   Formularz rejestracji
   =========================== */
#register {
  max-width: 520px; margin: 0 auto; padding: 20px;
  border: 1px solid var(--color-outline); border-radius: var(--radius);
  background: transparent; color: var(--color-text); text-align: left; font-size: 1rem;
}
#register ul { list-style: none; }
#register li { margin: 14px 0; }
#register input[type="text"],
#register input[type="password"],
#register select{
  width: 100%; padding: 10px 12px; border: 1px solid #333; border-radius: 10px;
  background:#0d0d0d; color: var(--color-text); outline: none; font-size:1rem;
  transition: border .2s ease, background .2s ease;
}
#register input:focus, #register select:focus{
  border-color:#666; background:#141414; box-shadow:0 0 0 2px rgba(255,255,255,.05);
}
#register a{ color: var(--color-text); text-decoration: underline; }
#register label{ cursor: pointer; }
#register input[type="checkbox"]{ transform: translateY(1px); }

.submitButton{
  display:inline-block; width:100%; padding:12px 18px; border-radius:999px; border:none;
  background:#fff; color:#000; font-weight:700; font-size:1rem; cursor:pointer;
  transition: filter .15s ease, transform .05s ease;
}
.submitButton:hover{ filter:brightness(.95); }
.submitButton:active{ transform: translateY(1px); }

/* ===========================
   Tabele (globalnie)
   =========================== */
table{
  width:100%; border-collapse:collapse; background:#131313; color:var(--color-text);
  border:1px solid var(--color-frame); border-radius:6px; overflow:hidden;
}
th,td{ padding:10px 12px; border-bottom:1px solid var(--color-frame); text-align:left; }
th{
  background:var(--color-frame); color:var(--color-text); font-weight:600;
  text-transform:uppercase; letter-spacing:.5px;
}
tr:last-child td{ border-bottom:none; }
tr:hover td{ background:rgba(255,255,255,0.05); }

/* ===========================
   Selecty i przyciski (global)
   =========================== */
select:not([multiple]){
  height:42px; padding:0 40px 0 12px; border:1px solid var(--color-frame); border-radius:12px;
  background:#0f0f0f; color:var(--color-text); font:inherit; line-height:1; outline:none;
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat:no-repeat; background-position:right 12px center; background-size:18px;
}
select:not([multiple]):hover{ background:#121212; }
select:not([multiple]):focus{ border-color:#777; box-shadow:0 0 0 3px rgba(255,255,255,.06); background:#151515; }
select::-ms-expand{ display:none; }

input[type="submit"], button[type="submit"], .btn, .btn.btn-info{
  height:42px; padding:0 18px; border-radius:12px; border:1px solid transparent;
  background:#fff; color:#000; font-weight:700; line-height:1; cursor:pointer;
  transition: filter .15s ease, transform .05s ease, box-shadow .2s ease;
}
input[type="submit"]:hover, button[type="submit"]:hover, .btn:hover, .btn.btn-info:hover{ filter:brightness(.95); }
input[type="submit"]:active, button[type="submit"]:active, .btn:active, .btn.btn-info:active{ transform:translateY(1px); }

/* ===========================
   Responsywność (desktop -> tablet)
   =========================== */
@media (max-width: 1100px){
  .page{ grid-template-columns: 240px 1fr; }
  #sidebar-right{ grid-column: 1 / -1; }
}

/* ===========================
   Mobile: pasek, szuflada, overlay, scrollbar
   =========================== */
@media (max-width: 915px){
  .page{ grid-template-columns: 1fr; }
  #baner{ height: 125px; }
  #top-menu{ display: none; }

  /* pasek mobilny widoczny tylko tu */
  #mobile-bar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
	margin-top:-9px;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--mobile-bar-h);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-frame);
    padding: 10px 12px;
  }
  #mobile-bar .brand img{
    display:block; height: calc(var(--mobile-bar-h) - 22px); width:auto;
  }
  #mobile-bar .hamburger{
    display:inline-flex; align-items:center; gap:8px;
    border:1px solid var(--color-frame); border-radius:10px;
    background:#0f0f0f; color:var(--color-text);
    padding:10px 14px; font-weight:700; cursor:pointer;
  }

  /* overlay aktywny przy otwartym menu */
  body.menu-open #menu-overlay{ opacity:1; visibility:visible; }

  /* szuflada (lewy panel) */
  #sidebar-left{
    position: fixed;
    top: var(--mobile-bar-h);
    left: 0;                        /* zmień na right:0 + translateX(100%) jeśli wolisz z prawej */
    height: calc(100dvh - var(--mobile-bar-h));
    width: min(85vw, 320px);
    padding: 16px;
    background: #000;
    z-index: 999;
    transform: translateX(-100%);
    transition: transform .22s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* scrollbar – Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--color-frame) transparent;
  }
  body.menu-open #sidebar-left{ transform: translateX(0); }
  body.menu-open{ overflow: hidden; }

  /* scrollbar – WebKit */
  #sidebar-left::-webkit-scrollbar{ width:10px; height:10px; }
  #sidebar-left::-webkit-scrollbar-track{
    background: transparent;
    border-left: 1px solid var(--color-frame);
  }
  #sidebar-left::-webkit-scrollbar-thumb{
    background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.10));
    border: 2px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    background-clip: padding-box;
  }
  #sidebar-left::-webkit-scrollbar-thumb:hover{
    background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.18));
  }
  #sidebar-left::-webkit-scrollbar-thumb:active{
    background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.25));
  }
}

/* ===========================
   Overlay (global)
   =========================== */
#menu-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
  z-index: 998;
}
@media (min-width: 916px){
  #mobile-bar { display: none !important; }
  #menu-overlay { display: none !important; }
}