/* ── FLHelper Common Styles ── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark:    #2a2218;
  --bg-panel:   #3a3228;
  --bg-game:    url("https://www.fantasyland.ru/images/pic.new/bg_game.jpg") repeat #666;
  --bg-header:  url("https://www.fantasyland.ru/images/pic.new/battle_bg_new.jpg") repeat;
  --color-text:    #DDDDDD;
  --color-gold:    #F8D577;
  --color-muted:   #AAAAAA;
  --color-dim:     #888888;
  --color-border:  #AAAAAA;
  --color-sep:     #4a3a28;
  --color-hover-bg: rgba(248,213,119,0.08);
  --color-active-bg: rgba(248,213,119,0.15);
  --max-w: 1340px;
}

/* ── BASE ── */
body {
  background-image: var(--bg-header);
  background-repeat: repeat;
  background-color: var(--bg-dark);
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: var(--color-text);
  min-height: 100vh;
}

a { color: var(--color-gold); font-weight: bold; text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #666; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #888; }

/* ── HEADER ── */
.site-header {
  background: var(--bg-header);
  border-bottom: 3px double var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.header-logo:hover { text-decoration: none; }
.header-logo img { height: 32px; image-rendering: pixelated; }
.header-title-text {
  font-size: 20px;
  font-weight: bold;
  color: var(--color-gold);
  text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
  line-height: 1.2;
}
.header-title-text span {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
  font-weight: normal;
}
.header-count {
  margin-left: auto;
  color: var(--color-muted);
  font-size: 12px;
  flex-shrink: 0;
}

/* ── NAV ── */
.site-nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-panel);
  border: 1px solid #777;
  color: var(--color-text);
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.12s;
  white-space: nowrap;
  cursor: pointer;
}
.nav-link:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: #4a3c28;
  text-decoration: none;
}
.nav-link.active {
  background: #5a4010;
  border-color: var(--color-gold);
  color: var(--color-gold);
}
.nav-link.nav-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.nav-link-icon { font-size: 16px; }

/* ── GAME PANEL ── */
.panel-box {
  background: var(--bg-game);
  border: 3px double var(--color-border);
}
.game-panel {
  background: var(--bg-game);
  border: 3px double var(--color-border);
  padding: 10px 14px;
}
.panel-title {
  padding: 8px 12px;
  font-weight: bold;
  color: var(--color-gold);
  font-size: 13px;
  border-bottom: 1px solid #555;
  background: rgba(0,0,0,0.35);
}

/* ── MAIN WRAP ── */
.main-wrap {
  max-width: var(--max-w);
  margin: 14px auto 40px;
  padding: 0 14px;
}

/* ── BADGE / COUNT ── */
.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: normal;
  background: rgba(0,0,0,0.35);
  color: var(--color-gold);
  border: 1px solid #5a4a28;
}

/* ── FORM CONTROLS ── */
.search-input,
.owner-search-input,
.sort-select {
  background: #2a2218;
  border: 1px solid #666;
  color: var(--color-text);
  padding: 5px 10px;
  font-size: 13px;
  outline: none;
  font-family: Arial, sans-serif;
}
.search-input:focus,
.owner-search-input:focus { border-color: var(--color-gold); }
.sort-select option { background: #2a2218; }

/* ── DIVIDER LINE ── */
.fl-divider {
  height: 1px;
  background: url("https://www.fantasyland.ru/images/pic.new/sub_border.gif") repeat-x center;
  margin: 8px 0;
}

/* ── FOOTER ── */
.site-footer {
  border-top: 3px double var(--color-border);
  background: var(--bg-header);
  background-color: var(--bg-dark);
  padding: 14px 18px;
  text-align: center;
  color: #777;
  font-size: 12px;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .site-nav { gap: 2px; flex-wrap: wrap; }
  .nav-link { padding: 8px 10px; font-size: 12px; min-height: 36px; display: flex; align-items: center; }
  .header-title-text { font-size: 16px; }
  .header-inner { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 480px) {
  .nav-link { padding: 8px 7px; font-size: 11px; }
  .header-title-text span { display: none; }
}
