/* BestNickname 2026 refresh: visual layer only. Markup, text and URLs are unchanged.
   Loaded last; remove its <link> in require/head.php to roll back. */
:root {
  --bn-page: #f6f7fb;
  --bn-surface: #ffffff;
  --bn-surface-soft: #f1f2fb;
  --bn-ink: #151829;
  --bn-muted: #5b6076;
  --bn-accent: #4f46e5;
  --bn-accent-strong: #3f37c9;
  --bn-accent-soft: #eef0ff;
  --bn-good: #15803d;
  --bn-bad: #c2410c;
  --bn-line: #e4e6f0;
  --bn-shadow: 0 1px 2px rgba(21, 24, 41, 0.04), 0 8px 24px rgba(21, 24, 41, 0.06);
  --bn-shadow-soft: 0 1px 2px rgba(21, 24, 41, 0.05);
  --bn-radius: 14px;
  --bn-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

html, body { background: var(--bn-page); color: var(--bn-ink); }
body { font-family: var(--bn-font); font-size: 16px; line-height: 1.55; }
a { color: var(--bn-accent); }
a:hover { color: var(--bn-accent-strong); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; }

/* Header */
nav[aria-label="Main navigation"] {
  background: rgba(255, 255, 255, 0.92) !important;
  border-bottom: 1px solid var(--bn-line);
  box-shadow: none !important;
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.nav-links a { color: var(--bn-ink) !important; font-weight: 600 !important; border-radius: 10px; padding: 8px 10px !important; }
.nav-links a:hover { background: var(--bn-accent-soft); color: var(--bn-accent) !important; text-shadow: none !important; }
.navbar-custom-menu .form-control,
.navbar-custom-menu .input-group input {
  border: 1px solid var(--bn-line) !important;
  border-radius: 999px !important;
  background: var(--bn-surface-soft) !important;
  min-height: 40px;
}
.input-group-btn, .input-group-btn > button, .navbar-custom-menu .btn {
  border-radius: 999px !important;
}
.navbar-custom-menu .btn, .input-group-btn > button {
  background: var(--bn-accent) !important;
  border-color: var(--bn-accent) !important;
  color: #fff !important;
}

/* Page title */
.title-main h1, .main > h1, h1 { color: var(--bn-ink); font-weight: 800; letter-spacing: -0.02em; }

/* Section cards: no heavy blue bars */
.block-header, .block-header-new {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 18px 2px 8px !important;
}
.block-header h1, .block-header h2, .block-header h3, .block-header h4, .block-header p,
.block-header-new h2, .block-header-new p {
  color: var(--bn-ink) !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
  padding: 0 !important;
  text-shadow: none !important;
}
.block-header h2, .block-header p, .block-header-new p { font-size: 20px !important; line-height: 1.3 !important; }

.block-body, .block-body-main, .block-body-new,
.recovery-hero, .recovery-tool, .recovery-tips, .recovery-intro,
.sidebar-right-block > div, .block-body-main.copy-link {
  background: var(--bn-surface) !important;
  border: 1px solid var(--bn-line) !important;
  border-radius: var(--bn-radius) !important;
  box-shadow: var(--bn-shadow) !important;
}
.block-body { margin-bottom: 18px !important; padding: 16px !important; }

/* Nickname cards: an even grid with large, copyable names */
.recovery-list-shell {
  display: grid !important;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.recovery-list-shell > :not(.item) { grid-column: 1 / -1; }
.recovery-list-shell .item, .item {
  background: var(--bn-surface) !important;
  border: 1px solid var(--bn-line) !important;
  border-radius: 12px !important;
  box-shadow: var(--bn-shadow-soft) !important;
  margin: 0 !important;
  padding: 10px 10px 8px !important;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.block-body-new .item, .names-table .item { margin: 4px !important; display: inline-flex !important; }
.item:hover { border-color: #c7cbf5 !important; box-shadow: var(--bn-shadow) !important; transform: translateY(-1px) !important; }
.item .main-nickname {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--bn-ink) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.35;
  padding: 6px 4px;
  width: 100%;
}
.item .main-nickname:hover { background: var(--bn-accent-soft) !important; color: var(--bn-accent) !important; }
.item hr.hr { border-top: 1px solid var(--bn-line) !important; margin: 6px 0 !important; opacity: 1; }
.item .votes { gap: 6px !important; justify-content: center !important; }
.vote-btn, .item .votes .rank_green, .item .votes .rank_red {
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 600;
  min-height: 30px;
  padding: 3px 10px !important;
}
.item .votes .rank_green { background: #ecfdf3 !important; color: var(--bn-good) !important; }
.item .votes .rank_red { background: #fff4ed !important; color: var(--bn-bad) !important; }
.vote-btn:hover { filter: brightness(0.97); }

/* Filter, buttons and forms */
.recovery-list-tools { background: var(--bn-surface-soft) !important; border: 1px solid var(--bn-line) !important; border-radius: 12px !important; }
.recovery-list-tools input, #add_nick input[type=text], .copy-link input[type="text"] {
  border: 1px solid var(--bn-line) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}
.recovery-list-tools input:focus, #add_nick input[type=text]:focus { border-color: var(--bn-accent) !important; box-shadow: 0 0 0 3px #e0e7ff !important; }
.button, #add_nick .button, #add_nick [type=submit], .block-body-main.copy-link .button, .gen-btn, .row-gen .gen-left-side .gen-button .gen-btn {
  background: var(--bn-accent) !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: #fff !important;
  font-weight: 700 !important;
}
.button:hover, #add_nick .button:hover, #add_nick [type=submit]:hover, .gen-btn:hover { background: var(--bn-accent-strong) !important; transform: none !important; }
.bn-more-btn { padding: 10px 22px !important; }

/* Sidebar tags and link lists as pills */
.nick-link-new a, .nick-link a, .top-ranking-cat a, .top-ranking-nick a {
  background: var(--bn-surface-soft);
  border-radius: 999px;
  color: var(--bn-ink) !important;
  display: inline-block;
  font-weight: 600;
  padding: 5px 11px !important;
}
.nick-link-new a:hover, .nick-link a:hover, .top-ranking-cat a:hover, .top-ranking-nick a:hover {
  background: var(--bn-accent-soft) !important;
  color: var(--bn-accent) !important;
  text-shadow: none !important;
}
.quick-links a { color: var(--bn-accent) !important; }

/* Ads keep their reserved space, styled as quiet cards */
.bn-ad { background: var(--bn-surface) !important; border-color: var(--bn-line) !important; border-radius: var(--bn-radius) !important; }

/* Footer */
.main-footer { background: var(--bn-surface) !important; border-top: 1px solid var(--bn-line) !important; }
.main-footer a { color: var(--bn-muted); font-weight: 600; margin-left: 14px; }

@media (max-width: 640px) {
  .recovery-list-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .item .main-nickname { font-size: 16px !important; }
  .block-header h2, .block-header p, .block-header-new p { font-size: 18px !important; }
}

/* Language switcher: two readable columns with flags and full names */
.Language button {
  align-items: center;
  background: var(--bn-surface) !important;
  border: 1px solid var(--bn-line) !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  gap: 7px;
  height: 38px !important;
  padding: 0 12px !important;
  width: auto !important;
}
.Language button:hover, .Language button[aria-expanded="true"] { background: var(--bn-accent-soft) !important; border-color: #c7cbf5 !important; }
.lang-current-flag { border-radius: 3px; height: 14px; width: 20px; background-size: cover; }
.Language ul {
  background: var(--bn-surface) !important;
  border: 1px solid var(--bn-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 32px rgba(21, 24, 41, 0.14) !important;
  grid-template-columns: 1fr 1fr;
  height: auto !important;
  margin: 0 !important;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  width: 340px !important;
  z-index: 10000;
}
.Language a { border-radius: 10px; font-size: 14px; grid-template-columns: 20px minmax(0, 1fr) !important; }
.Language a .language-code { display: none; }
.Language a .fi { border-radius: 2px; height: 14px; width: 20px; }
.Language li:hover { background: transparent !important; }
.Language a:hover, .Language a[aria-current="true"] { background: var(--bn-accent-soft) !important; color: var(--bn-accent) !important; }
@media (max-width: 1152px) {
  .Language ul { position: fixed !important; right: 12px !important; left: auto !important; top: 64px !important; width: min(340px, calc(100vw - 24px)) !important; font-size: 15px; }
}
@media (max-width: 380px) {
  .Language ul { grid-template-columns: 1fr; }
}
.Language li { display: block !important; justify-content: stretch !important; width: 100% !important; }
.Language a { justify-content: start !important; text-align: left !important; width: 100%; }

/* Mobile header: search field and button on one row so the fixed header does not cover the title */
@media (max-width: 1152px) {
  .navbar-custom-menu > .input-group,
  .navbar-custom-menu form .input-group,
  .navbar-custom-menu .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px;
    width: 100% !important;
  }
  .navbar-custom-menu .input-group .form-control,
  .navbar-custom-menu .input-group input { flex: 1 1 auto; min-width: 0; width: auto !important; }
  .navbar-custom-menu .input-group-btn,
  .navbar-custom-menu .input-group .btn { flex: 0 0 auto; margin: 0 !important; width: auto !important; }
}

/* Recovery/hub blocks in the same palette */
.recovery-kicker { color: var(--bn-accent) !important; letter-spacing: 0.04em; }
.recovery-hero h2, .recovery-tool h2, .recovery-intro h2, .recovery-faq h3,
.recovery-hero-panel strong, .recovery-list-tools label, .recovery-group h3 { color: var(--bn-ink) !important; }
.recovery-hero p, .recovery-tool p, .recovery-intro p, .recovery-hero-panel span { color: var(--bn-muted) !important; }
.recovery-actions a, .recovery-builder button, .recovery-builder-output button,
.recovery-uses li, .recovery-link-list a, .recovery-hub-card a {
  background: var(--bn-accent-soft) !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  color: var(--bn-accent) !important;
  font-weight: 700;
}
.recovery-actions a:hover, .recovery-builder button:hover, .recovery-builder-output button:hover,
.recovery-link-list a:hover, .recovery-hub-card a:hover { background: #e0e3ff !important; }
.recovery-hero-panel { background: var(--bn-surface-soft) !important; border: 1px solid var(--bn-line) !important; border-radius: 12px !important; }
.recovery-hero-panel div { border-color: var(--bn-line) !important; }
.recovery-tips span { background: #ecfdf3 !important; border-color: #c6f0d6 !important; border-radius: 999px !important; color: #166534 !important; }
.recovery-group { border-color: var(--bn-line) !important; border-radius: 12px !important; }
.recovery-group button, .recovery-example-list button { background: var(--bn-surface-soft) !important; border-radius: 10px !important; color: var(--bn-ink) !important; }
.recovery-group button:hover, .recovery-example-list button:hover { background: var(--bn-accent-soft) !important; color: var(--bn-accent) !important; }
