  /* ===== ALBION NEUTRAL BASE (NOT GREEN UI) ===== */

  --bg:#0a0f0c;                 /* prawie czarne tło */
  --panel:rgba(18,22,20,.92);   /* ciemny grafit z nutą zieleni */
  --panel2:rgba(18,22,20,.75);

  --line:rgba(240,230,200,.12); /* pergaminowe linie */
  --line2:rgba(240,230,200,.20);

  --text:#e7efe9;
  --muted:#aebbb3;
  --muted2:#c8d2cc;

  --gold:#e0b85a;               /* Albionowe złoto */

  --danger:#ffb4b4;
  --ok:#b7ffbf;

  --shadow:0 18px 50px rgba(0,0,0,.55);
  --shadow2:0 10px 24px rgba(0,0,0,.40);

  --radius:16px;
  --radius2:12px;
}


/* ===== Reset / base ===== */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img{max-width:100%;height:auto}
a{color:inherit}
code,kbd,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}

/* Scrollbar (Webkit) */
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.12);
  border-radius:999px;
  border:2px solid rgba(0,0,0,.35);
}
*::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.16)}
*::-webkit-scrollbar-track{background:rgba(0,0,0,.25)}

/* ===== Typography helpers ===== */
h1,h2,h3{margin:0 0 10px 0}
p{margin:0 0 10px 0;line-height:1.55}
.small{font-size:12px;color:var(--muted)}
.muted{color:var(--muted);font-size:12px;margin-top:6px}
.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 8px;border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.06);
  font-size:12px;color:var(--muted2);
}

/* ===== Buttons ===== */
.btn{
  appearance:none;
  text-decoration:none;
  cursor:pointer;
  background:rgba(255,255,255,.07);
  border:1px solid var(--line);
  padding:8px 10px;
  border-radius:12px;
  font-size:13px;
  color:var(--text);
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  user-select:none;
}
.btn:hover{border-color:var(--line2)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}

.btn.gold{
  background:linear-gradient(180deg,#f0c35a,#b8861b);
  color:#1a1203;border:0;font-weight:900;
}
.btn.danger{
  background:rgba(255,70,70,.12);
  border-color:rgba(255,70,70,.25);
  color:var(--danger);
}

/* ===== Panels / cards ===== */
.panel{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.panel-head{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.03);
  font-weight:900;
  font-size:13px;
  letter-spacing:.2px;
}
.panel-body{padding:12px}

.card{
  background:var(--panel2);
  border:1px solid rgba(255,255,255,.10);
  border-radius:var(--radius);
  box-shadow:var(--shadow2);
  padding:12px;
}

/* ===== Forms ===== */
label{display:block;margin:10px 0 6px 0;color:var(--muted2);font-size:13px}
input,select,textarea{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.25);
  color:var(--text);
  outline:none;
}
textarea{min-height:110px;resize:vertical}
input:focus,select:focus,textarea:focus{
  border-color:rgba(240,195,90,.35);
  box-shadow:0 0 0 3px rgba(240,195,90,.12);
}
.form-row{display:flex;gap:10px;flex-wrap:wrap}
.form-row > *{flex:1;min-width:220px}

.help{font-size:12px;color:var(--muted);margin-top:6px}
.err{color:var(--danger);font-size:13px;white-space:pre-wrap;margin-top:10px}
.ok{color:var(--ok);font-size:13px;white-space:pre-wrap;margin-top:10px}

/* ===== Tables ===== */
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  border-radius:var(--radius);
}
.table th,.table td{
  padding:10px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:13px;
  text-align:left;
}
.table th{
  background:rgba(255,255,255,.04);
  color:var(--muted2);
  font-weight:900;
}
.table tr:last-child td{border-bottom:0}

/* ===== Layout helpers ===== */
.wrap{max-width:1200px;margin:0 auto;padding:12px}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.spacer{height:12px}
.sep{height:1px;background:rgba(255,255,255,.10);margin:12px 0}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:900px){.grid2{grid-template-columns:1fr}}

.kbd{
  font-size:12px;color:var(--muted2);
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.25);
  border-bottom-color:rgba(255,255,255,.22);
  padding:2px 6px;border-radius:8px;
}

/* ===== Generic modal fallback (jeśli nie masz własnego) ===== */
.modal{
  position:fixed;inset:0;
  display:none;
  z-index:999;
}
.modal[aria-hidden="false"]{display:block}
.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
.modal-box{
  position:absolute;left:50%;top:50%;
  transform:translate(-50%,-50%);
  width:min(520px, calc(100vw - 24px));
  background:rgba(14,20,27,.92);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  box-shadow:0 18px 60px rgba(0,0,0,.55);
  overflow:hidden;
}
.modal-head{
  display:flex;justify-content:space-between;align-items:center;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.03)
}
.modal-title{font-weight:900}
.modal-x{background:transparent;border:0;color:var(--text);font-size:22px;cursor:pointer}
.modal-body{padding:12px}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}

/* ===== Bottom bar ===== */
.bb{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:900;
  background:rgba(10,14,20,.82);
  border-top:1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
}
.bb-inner{
  max-width:1400px;
  margin:0 auto;
  padding:10px 12px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.bb-tile{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
}
.bb-tile:hover{border-color:rgba(255,255,255,.20)}
.bb-ico{
  width:34px;height:34px;
  display:grid;place-items:center;
  border-radius:12px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.10);
}
.bb-title{font-weight:900;font-size:13px}
.bb-desc{color:var(--muted);font-size:12px;margin-top:2px}
.bb-meta{
  margin-left:auto;
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
@media (max-width:860px){
  .bb-meta{width:100%;margin-left:0}
}

/* Żeby belka nie zasłaniała treści */
body{ padding-bottom:86px; }

/* ===== Bottom bar (doprecyzowany, Albion-like) ===== */
.bb{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:900;
  background:rgba(10,14,20,.86);
  border-top:1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.bb-inner{
  max-width:1400px;
  margin:0 auto;
  padding:10px 12px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
}
.bb-left{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.bb-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
  min-width:260px;
}

.bb-tile{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
.bb-tile:hover{border-color:rgba(255,255,255,.20)}
.bb-tile.is-active{
  border-color:rgba(240,195,90,.35);
  box-shadow:0 0 0 3px rgba(240,195,90,.12);
}

.bb-ico{
  width:34px;height:34px;
  display:grid;place-items:center;
  border-radius:12px;
  background:rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.10);
}
.bb-title{font-weight:900;font-size:13px;line-height:1}
.bb-desc{color:var(--muted);font-size:12px;margin-top:2px;line-height:1.15}

.bb-meta{
  color:var(--muted);
  font-size:12px;
  white-space:nowrap;
}
.bb-links{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.bb-link{
  color:#f3e6c7;
  font-size:12px;
  text-decoration:none;
  opacity:.9;
}
.bb-link:hover{opacity:1;text-decoration:underline}
.bb-dot{color:rgba(255,255,255,.35);font-size:12px}

.bb-build{
  color:rgba(255,255,255,.55);
  font-size:11px;
  white-space:nowrap;
}

/* Mobile: belka w 2 rzędy */
@media (max-width:900px){
  .bb-inner{flex-direction:column;align-items:stretch}
  .bb-right{align-items:flex-start;min-width:0}
}

/* Żeby belka nie zasłaniała treści */
body{ padding-bottom:96px; }

/* ===== VIDEO BACKGROUND (INDEX ONLY) ===== */
.bg{
  position:fixed;
  inset:0;
  z-index:-2;
  overflow:hidden;
  background:#000;
}
.bg video{
  width:100%;
  height:100%;
  object-fit:cover;
  filter:brightness(.55) saturate(1.05);
}
.bg::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    180deg,
    rgba(0,0,0,.55),
    rgba(0,0,0,.25) 40%,
    rgba(0,0,0,.65)
  );
}

/* ===== AUTOPLAY OVERLAY ===== */
.autoplayOverlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.65);
}
.autoplayBox{
  background:rgba(14,20,27,.95);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  padding:18px;
  max-width:420px;
  text-align:center;
  box-shadow:0 18px 60px rgba(0,0,0,.55);
}
/* WYŁĄCZENIE OVERLAY AUTOPLAY */
.autoplayOverlay{
  display:none !important;
}

.pin{
  position:absolute;
  transform:translate(-50%,-100%);
  display:flex;gap:6px;align-items:center;
  background:rgba(0,0,0,.65);
  border:1px solid rgba(255,255,255,.2);
  padding:6px 8px;border-radius:12px;
  font-size:12px;white-space:nowrap;
  cursor:pointer;
}
.pin img{width:18px;height:18px}
.pin:hover{border-color:#f0c35a}
.pin b{color:#f0c35a}

/* ===== HARD FIX: PAGE SHELL ===== */
html, body {
  background:#0a0f0c !important;
}

.page, .ao-page {
  background:
    radial-gradient(circle at 50% 20%, rgba(224,184,90,.06), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65)),
    #0a0f0c !important;
  min-height:100vh;
}

/* ===== MAIN GAME LAYOUT BACKGROUND ===== */
.layout, .ao-game {
  background:transparent;
}

/* ===== LEFT PANEL FIX ===== */
.leftcol, .ao-leftpanel {
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.35)),
    rgba(18,22,20,.92);
  border-radius:16px;
  padding:12px;
}

/* ===== CENTER COLUMN FIX ===== */
.centercol, .ao-mid {
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.45));
  border-radius:16px;
  padding:10px;
}
/* ============================= */
/* ZAMIANA: GÓRNA BELKA -> DÓŁ   */
/* ============================= */

/* 1. Główna belka (ta co była na górze) */
.topnav,
.menu-top,
.header-bar {
  position: fixed !important;
  bottom: 0;
  top: auto !important;
  left: 0;
  right: 0;
  z-index: 900;

  background: rgba(10,14,20,.90);
  border-top: 1px solid rgba(255,255,255,.15);
  border-bottom: none;

  backdrop-filter: blur(8px);
}

/* 2. Zawartość belki – wyrównanie jak w Albionie */
.topnav .tabs,
.menu-top .tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* 3. Zapas na dole, żeby belka nie zasłaniała treści */
body {
  padding-bottom: 90px !important;
}

/* 4. Usuwamy pustą przestrzeń po starej górnej belce */
.page,
.ao-page {
  padding-top: 0 !important;
}
