/* Wspolne style calego serwisu: strona glowna i gra. */
:root {
  --forest-900: #14231a;
  --forest-800: #1c3226;
  --forest-700: #26443a;
  --moss: #6f9a5a;
  --gold: #e0a83a;
  --gold-dark: #b98518;
  --parchment: #f6f0e2;
  --ink: #1d2a22;
  --muted: #5b6a60;
}

html { scroll-behavior: smooth; }
body.site {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.6;
}
.site h1, .site h2, .site h3, .site .brand {
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  letter-spacing: .2px;
}

/* --- nawigacja ------------------------------------------------------------ */
.site .navbar { background: rgba(20, 35, 26, .96); padding: .6rem 0; }
/* Bootstrap zeruje boczny margines kontenera w nawigacji ponizej breakpointu */
.site .navbar > .container { padding-left: 15px; padding-right: 15px; }
.site .brand { color: var(--gold) !important; font-size: 1.6rem; font-weight: 700; }
.site .brand:hover { color: #f3c862 !important; text-decoration: none; }
.site .nav-login .form-control {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; min-width: 9rem;
}
.site .nav-login .form-control::placeholder { color: #b9c7bd; }
.site .nav-login .form-control:focus { background: rgba(255, 255, 255, .14); border-color: var(--gold); box-shadow: none; color: #fff; }

.site .btn-gold {
  background: var(--gold); border-color: var(--gold); color: #24190a; font-weight: 600;
}
.site .btn-gold:hover, .site .btn-gold:focus { background: #efbb52; border-color: #efbb52; color: #24190a; }
.site .btn-outline-light-soft { color: #e9efe9; border-color: rgba(255, 255, 255, .4); }
.site .btn-outline-light-soft:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.site footer.site-footer { background: var(--forest-900); color: #9fb0a5; padding: 1.6rem 0; font-size: .9rem; }
.site .app-version { opacity: .6; margin-left: .4rem; font-variant-numeric: tabular-nums; }
.site footer.site-footer a { color: #cfdbd2; }

.site .nav-login .form-control { min-width: 9rem; }
@media (max-width: 991px) {
  .site .nav-login { margin-top: .8rem; }
  .site .nav-login .form-control { min-width: 0; }
}

/* --- menu gry ------------------------------------------------------------- */
.site .navbar .nav-link { color: #c9d6cd; padding: .5rem .8rem; border-radius: 6px; }
/* strzalka grupy zawsze w tej samej linii co nazwa (dluzsze nazwy w innych jezykach, np. "Gemeinschaft") */
@media (min-width: 992px) { .site .navbar .nav-link { white-space: nowrap; } }
.site .navbar .nav-link:hover, .site .navbar .nav-link:focus { color: #fff; background: rgba(255, 255, 255, .08); }
.site .navbar .nav-link.active { color: var(--gold); background: rgba(224, 168, 58, .12); }
.site .navbar .nav-premium { color: var(--gold); font-weight: 700; white-space: nowrap; text-decoration: none; padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(224, 168, 58, .35); }
.site .navbar .nav-premium::before { content: "◈ "; }
.site .navbar .nav-premium:hover, .site .navbar .nav-premium.active { background: rgba(224, 168, 58, .14); color: var(--gold); }
.site .navbar .dropdown-item.active, .site .navbar .dropdown-item:active { background: rgba(224, 168, 58, .16); color: var(--gold); }
.site .navbar .dropdown-item.disabled small { opacity: .8; margin-left: .3rem; }
@media (max-width: 991px) { .site .navbar .nav-premium { display: inline-block; margin: .5rem 0; } }
.site .navbar .badge-new, .site .navbar .quest-new { background: var(--gold); color: #24190a; font-weight: 700; margin-left: .3rem; }
.site .dropdown-menu { background: var(--forest-800); border: 1px solid rgba(255, 255, 255, .14); }
.site .dropdown-item { color: #9fb0a5; }
.site a.dropdown-item { color: #e3ebe5; }
.site a.dropdown-item:hover, .site a.dropdown-item:focus { background: rgba(255, 255, 255, .08); color: #fff; }
.site .dropdown-item.disabled { color: #7d8f84; }
.lang-switch { display: flex; align-items: center; gap: .4rem; margin: 0; }
.lang-switch label { margin: 0; font-size: .85rem; }
.lang-switch select { width: auto; background-color: transparent; color: inherit; border-color: rgba(255, 255, 255, .25); font-size: .85rem; }
.lang-switch select option { color: #1d2a22; }
.site .navbar .nav-account strong { color: #fff; }
.site .navbar .nav-account .nav-link.active strong { color: var(--gold); }
.site .navbar .dropdown-divider { border-top-color: rgba(255, 255, 255, .14); }

/* pasek zasobow pod nawigacja */
.resbar { background: var(--forest-800); color: #dfe9e2; border-top: 1px solid rgba(255, 255, 255, .06); font-size: .9rem; }
.resbar .container { display: flex; flex-wrap: wrap; align-items: center; padding-top: .45rem; padding-bottom: .45rem; }
.resbar .where { color: var(--gold); font-family: Georgia, serif; font-weight: 700; margin-right: 1.4rem; }
.resbar .where small { color: #9fb0a5; font-family: inherit; font-weight: 400; margin-left: .35rem; }
.resbar .res { margin-right: 1.4rem; white-space: nowrap; }
.resbar .res b { font-variant-numeric: tabular-nums; color: #fff; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .35rem; }
.dot.wood { background: #b5793c; } .dot.stone { background: #9aa5ad; } .dot.food { background: #a7c957; }

/* --- uklad podstron ------------------------------------------------------- */
.app-main { padding-top: 2rem; padding-bottom: 3rem; min-height: 60vh; }
.page-head { margin-bottom: 1.6rem; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; color: var(--forest-800); margin: 0; }
.page-head p { color: var(--muted); margin: .25rem 0 0; }

.panel {
  background: #fff; border: 1px solid #e7dfca; border-radius: 12px; padding: 1.4rem 1.5rem;
  box-shadow: 0 1px 2px rgba(28, 50, 38, .05);
}
.panel + .panel { margin-top: 1.2rem; }
.panel h2 { font-size: 1.15rem; font-weight: 700; color: var(--forest-800); margin-bottom: 1rem; }
.panel-narrow { max-width: 30rem; margin: 1rem auto; }
.panel-narrow.wide { max-width: 38rem; }

.site .form-control { border-color: #d6ccb0; }
.site .form-control:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 .2rem rgba(224, 168, 58, .25); }
.site label { font-weight: 600; color: var(--forest-800); }
.site .btn-forest { background: var(--forest-800); border-color: var(--forest-800); color: #fff; font-weight: 600; }
.site .btn-forest:hover, .site .btn-forest:focus { background: var(--forest-700); border-color: var(--forest-700); color: #fff; }
.site .btn-gold:disabled, .site .btn-gold.disabled { background: #d9cfb3; border-color: #d9cfb3; color: #7a6f55; cursor: not-allowed; }
.app-main a:not(.btn) { color: #8a6210; }
.app-main a:not(.btn):hover { color: #6b4b0b; }
.site .alert { border-radius: 10px; border: 0; }
.site .alert-success { background: #e3f0d8; color: #274018; }
.site .alert-warning { background: #fbefcf; color: #5a4210; }
.site .alert-danger { background: #f8dcd6; color: #5d1f14; }
.site .alert-info { background: #dfeaef; color: #1f3f4d; }

.table-plain { width: 100%; border-collapse: collapse; }
.table-plain th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: .5rem .6rem; border-bottom: 2px solid #e7dfca; }
.table-plain td { padding: .7rem .6rem; border-bottom: 1px solid #efe8d5; vertical-align: middle; }
.table-plain tr:last-child td { border-bottom: 0; }
.num { font-variant-numeric: tabular-nums; }

.chip { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e9e1c8; color: #5a4a1d; }
.chip.ok { background: #dcebc9; color: #2b4a17; }
.chip.gold { background: var(--gold); color: #24190a; }

@media (max-width: 767px) {
  .resbar .where { width: 100%; margin-bottom: .2rem; }
  .app-main { padding-top: 1.3rem; }
}

/* menu na srednich ekranach (992-1199 px): mniejsze odstepy i bez podpisu "Gracz ...", zeby pozycje nie zawijaly sie w dwie linie */
/* 1200-1399 px: ciasniejsze odstepy, bo nazwy w innych jezykach sa dluzsze (np. niemieckie) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .site .navbar .nav-link { padding: .5rem .6rem; }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .site .navbar .nav-link { padding: .5rem .4rem; font-size: .95rem; }
  .site .navbar .navbar-user-label { display: none; }
  .site .navbar .nav-premium { padding: .3rem .55rem; }
}

/* Pulapki dla automatow (bot_lib.php): ukryty link w menu i ukryte pole formularzy - ludzie ich nie widza
   ani nie przechodza do nich klawiatura (tabindex -1, aria-hidden); wypelnia / klika je tylko skrypt. */
.hp-link, .hp-field { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; opacity: 0 !important; }
/* Cloudflare Turnstile w formularzach logowania (zwykle niewidoczny; gdy wymaga klikniecia - nad przyciskiem) */
.cf-turnstile:not(:empty) { margin-bottom: .5rem; }

/* przyrost surowcow na godzine na pasku zasobow */
.resbar .res-prod { color: #9fd18b; font-size: .78em; font-weight: 600; margin-left: .15rem; }

/* znacznik Premium przy saldzie denarow w menu */
.nav-premium .premium-state { margin-left: .35rem; font-size: .72em; font-weight: 600; letter-spacing: .02em; }
.nav-premium .premium-state.on { color: var(--gold); }
.nav-premium .premium-state.off { color: rgba(255, 255, 255, .45); font-weight: 400; }
.resbar .res-prod.neg { color: #ff9d8a; }
/* Turnstile w formularzu logowania na pasku menu: gdy Cloudflare pokazuje zadanie, wysuwa sie pod formularzem (nie rozsuwa paska) */
.nav-login { position: relative; }
.nav-login .cf-turnstile:not(:empty) { position: absolute; top: calc(100% + .5rem); right: 0; z-index: 1050; margin: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); border-radius: 6px; }
@media (max-width: 991.98px) { .nav-login .cf-turnstile:not(:empty) { position: static; box-shadow: none; margin: .5rem 0; } }

/* nazwa swiata obok logo (tryb swiata, worlds_lib.php) */
.site .navbar .world-chip { color: #c9d6cd; font-size: .78rem; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: .05rem .5rem; margin: 0 .8rem 0 -.6rem; white-space: nowrap; }
