/* ================================================================
   alap színek és témák
   ================================================================ */
:root {
  color-scheme: light dark;

  --page-bg: #f3f4f6;
  --header-bg: #f5f5f5;
  --content-bg: #ffffff;
  --footer-bg: #f5f5f5;
  --main: #ffffff;

  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;

  --topbar-divider: #c3c3bb;
  --downbar-divider: #c3c3bb;

  --topbar-strong: #111827;
  --topbar-soft: #111827;

  --sidebar-bg: #f5f5f5;
  --sidebar-line: rgba(17, 24, 39, 0.08);
  --sidebar-main-text: #111827;
  --sidebar-sub-text: #111827;
  --sidebar-sub-icon: #6b7280;
  --sidebar-hover: rgba(17, 24, 39, 0.08);
  --sidebar-card-text: #111827;

  --overlay: rgba(0, 0, 0, 0.45);

  --topbar-height: 44px;
  --downbar-height: 70px;
  --downbar-bmc-space: 220px;
}

:root[data-theme="dark"] {
  --page-bg: #141922;
  --header-bg: #101010;
  --content-bg: #17191a;
  --footer-bg: #101010;
  --main: #1d232c;

  --text: #e7eaf0;
  --muted: #a3adbc;
  --line: #2f3642;

  --topbar-divider: #a5a39c;
  --downbar-divider: #a5a39c;

  --topbar-strong: #ffffff;
  --topbar-soft: #ffffff;

  --sidebar-bg: #101010;
  --sidebar-line: rgba(255, 255, 255, 0.08);
  --sidebar-main-text: #ffffff;
  --sidebar-sub-text: #ffffff;
  --sidebar-sub-icon: rgba(255, 255, 255, 0.66);
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-card-text: #ffffff;

  --overlay: rgba(0, 0, 0, 0.56);
}

/* ================================================================
   alap reset
   ================================================================ */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* ================================================================
   fő layout
   ================================================================ */
.app-shell {
  min-height: 100vh;
}

/* ================================================================
   fő tartalmi oszlop fix topbar + fix downbar mellett
   ================================================================ */
.main-shell {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ================================================================
   overlay sidebar
   ================================================================ */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  pointer-events: none;
}

.sidebar-overlay.open {
  pointer-events: auto;
}

.sidebar-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 500ms ease;
}

.sidebar-overlay.open .sidebar-backdrop {
  opacity: 1;
}

.sidebar-drawer {
  position: absolute;
  top: 0;
  left: 0;
  width: min(380px, 92vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-line);
  transform: translateX(-100%);
  transition:
    transform 500ms ease,
    box-shadow 500ms ease;
  box-shadow: none;
}

.sidebar-overlay.open .sidebar-drawer {
  transform: translateX(0);
  box-shadow: 24px 0 48px rgba(0, 0, 0, 0.22);
}

.sidebar-drawer,
.sidebar-drawer-header {
  background: var(--sidebar-bg);
}

.sidebar-drawer-header {
  min-height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--sidebar-line);
}

.sidebar-brand-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 38px;
}

.sidebar-brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sidebar-card-text);
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 20px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

:root[data-theme="light"] .sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.18);
}

.nav-group {
  margin-bottom: 8px;
}

.nav-main,
.sub-item,
.cmd-option {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: 12px;
  font: inherit;
}

.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  color: var(--sidebar-main-text);
  font-weight: 600;
}

.nav-main:hover,
.nav-main.open {
  background: var(--sidebar-hover);
}

.nav-main,
.nav-main .nav-icon,
.nav-main .nav-icon svg {
  color: var(--sidebar-main-text);
}

.nav-main-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  color: var(--sidebar-main-text);
}

.nav-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon svg path[fill="currentColor"] {
  fill: currentColor;
}

.submenu {
  display: none;
  padding: 4px 0 4px 8px;
}

.submenu-block {
  margin-top: 4px;
}

.sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  color: var(--sidebar-sub-text);
}

.sub-item:hover,
.sub-item.open,
.cmd-option:hover,
.cmd-option.active {
  background: var(--sidebar-hover);
}

.command-list {
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--sidebar-line);
}

.cmd-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--sidebar-sub-text);
}

.with-icon .submenu-icon,
.with-icon .submenu-flag {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.submenu-icon {
  color: var(--sidebar-sub-icon);
}

.submenu-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
  stroke: none;
}

.submenu-flag .flag-img {
  width: 18px;
  height: 13px;
}

.toggle-icon,
.lang-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.toggle-icon svg,
.lang-arrow svg {
  width: 12px;
  height: 12px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.nav-main.open .toggle-icon svg,
.sub-toggle.open .toggle-icon svg,
.language-picker.open .lang-arrow svg {
  transform: rotate(180deg);
}

/* ================================================================
   aktív menüpont kiemelés
   ================================================================ */
.sub-item.active,
.cmd-option.active {
  background: var(--sidebar-hover);
  color: var(--sidebar-sub-text);
  font-weight: 700;
}

.sub-item.active .submenu-icon,
.cmd-option.active .submenu-icon {
  color: var(--sidebar-main-text);
}

.sub-item.active .submenu-flag,
.cmd-option.active .submenu-flag {
  opacity: 1;
}

/* ================================================================
   topbar fixen felül
   ================================================================ */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;

  min-height: var(--topbar-height);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--topbar-divider);
  background: var(--header-bg);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-menu-toggle {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--topbar-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  padding: 0;
  flex: 0 0 40px;
}

.topbar-menu-toggle:hover {
  background: rgba(127, 127, 127, 0.1);
}

.topbar-menu-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

.topbar-brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 34px;
}

.topbar-brand-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--topbar-strong);
  white-space: nowrap;
}

.crumbs {
  display: none;
}

/* ================================================================
   topbar jobb oldali elemek egyenletes távolsággal
   ================================================================ */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  width: auto;
  margin-left: auto;
}

/* ================================================================
   topbar gombok
   ================================================================ */
.flag-img {
  width: 22px;
  height: 16px;
  display: block;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.language-picker {
  position: relative;
}

.language-current {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  color: var(--topbar-soft);
  border-radius: 10px;
  padding: 0 8px;
  cursor: pointer;
}

/* ================================================================
   topbar nyelvválasztó menü
   ================================================================ */
.language-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1600;
  width: max-content;
  max-width: min(92vw, 360px);
  max-height: min(70vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 6px;
  background: var(--main);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.language-picker.open .language-menu {
  display: block;
}

/* ================================================================
   nyelvválasztó görgetősáv
   ================================================================ */
.language-menu::-webkit-scrollbar {
  width: 8px;
}

.language-menu::-webkit-scrollbar-track {
  background: transparent;
}

.language-menu::-webkit-scrollbar-thumb {
  background: rgba(127, 127, 127, 0.35);
  border-radius: 999px;
}

:root[data-theme="light"] .language-menu::-webkit-scrollbar-thumb {
  background: rgba(17, 24, 39, 0.22);
}

:root[data-theme="dark"] .language-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
}

.language-item {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 8px;
}

.language-item:hover {
  background: var(--content-bg);
}

/* ================================================================
   discord widget
   ================================================================ */
.discord-widget-panel {
  display: none;
  position: absolute;
  right: 14px;
  top: calc(var(--topbar-height) + 6px);
  width: min(360px, calc(100vw - 28px));
  background: var(--main);
  border: 1px solid var(--line);
  border-radius: 12px;
  z-index: 1600;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.discord-widget-panel.open {
  display: block;
}

.discord-widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.discord-widget-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.discord-widget-name {
  font-size: 14px;
  font-weight: 700;
}

.discord-widget-status {
  font-size: 12px;
  color: var(--muted);
}

.discord-widget-loading {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
}

.discord-widget-frame {
  display: none;
  width: 100%;
  height: 420px;
  border: 0;
}

.support-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.support-meta strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-meta small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================================
   csak a középső tartalom görgethető
   ================================================================ */
.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 28px 20px 24px;
  margin-top: var(--topbar-height);
  margin-bottom: var(--downbar-height);
  height: calc(100vh - var(--topbar-height) - var(--downbar-height));
  background: var(--content-bg);
}

/* ================================================================
   fő tartalom keskenyebb és keret nélküli
   ================================================================ */
.card {
  width: min(100%, 980px);
  margin: 0 auto;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

h1 {
  margin: 0 0 10px;
}

.table-wrap {
  overflow: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

/* ================================================================
   parancs kép gomb
   ================================================================ */
.command-actions {
  margin: 14px 0 16px;
}

.command-image-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--main);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.command-image-button:hover {
  background: var(--header-bg);
  transform: translateY(-1px);
}

:root[data-theme="dark"] .command-image-button {
  background: #1a2230;
  border-color: #334155;
  color: #e7eaf0;
}

:root[data-theme="dark"] .command-image-button:hover {
  background: #243041;
}

/* ================================================================
   közös modal stílusok
   ================================================================ */
.dialog-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1800;
}

.dialog-modal.open {
  display: flex;
}

.dialog-modal-dialog {
  width: min(1100px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  background: var(--main);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.image-dialog {
  width: min(1100px, calc(100vw - 40px));
}

.stats-dialog {
  width: min(480px, calc(100vw - 40px));
}

.dialog-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--main);
}

.dialog-modal-close {
  position: relative;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--content-bg);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  flex: 0 0 40px;
}

.dialog-modal-close::before,
.dialog-modal-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
}

.dialog-modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.dialog-modal-close:hover {
  background: var(--main);
}

.dialog-modal-body {
  padding: 18px;
  background: var(--content-bg);
}

.image-modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: calc(100vh - 130px);
}

.image-modal-body img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.image-modal-message {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

/* ================================================================
   látogatói stat modal
   ================================================================ */
.stats-list {
  display: grid;
  gap: 12px;
}

.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--main);
}

.stats-row span {
  color: var(--muted);
  font-weight: 600;
}

.stats-row strong {
  color: var(--text);
  font-size: 18px;
}

/* ================================================================
   első lépések oldal
   ================================================================ */
.page-intro {
  margin: 0 0 16px;
  color: var(--text);
  line-height: 1.75;
}

.setup-steps {
  margin: 0;
  padding-left: 24px;
  display: grid;
  gap: 18px;
}

.setup-step {
  padding-left: 4px;
}

.setup-step h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.setup-step p {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
}

/* ================================================================
   alsó sáv fixen alul
   ================================================================ */
.downbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;

  min-height: var(--downbar-height);
  height: var(--downbar-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-top: none;
  background: var(--footer-bg);
  flex: 0 0 auto;
  overflow: visible;
}

/* ================================================================
   downbar felső kitöltött íve
   ================================================================ */
.downbar::before,
.downbar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  width: 148%;
  height: 18px;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% 100%;
}

.downbar::before {
  z-index: 0;
  background-color: var(--footer-bg);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 64' preserveAspectRatio='none'>\
  <path fill='black' d='M0,64 L0,16 Q500,42 1000,16 L1000,64 Z'/>\
</svg>");
  mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 64' preserveAspectRatio='none'>\
  <path fill='black' d='M0,64 L0,16 Q500,42 1000,16 L1000,64 Z'/>\
</svg>");
}

.downbar::after {
  z-index: 1;
  background-color: var(--downbar-divider);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 64' preserveAspectRatio='none'>\
  <defs>\
    <linearGradient id='curveMask' x1='0%' y1='0%' x2='100%' y2='0%'>\
      <stop offset='0%' stop-color='black' stop-opacity='0'/>\
      <stop offset='20%' stop-color='black' stop-opacity='0.22'/>\
      <stop offset='50%' stop-color='black' stop-opacity='1'/>\
      <stop offset='80%' stop-color='black' stop-opacity='0.22'/>\
      <stop offset='100%' stop-color='black' stop-opacity='0'/>\
    </linearGradient>\
  </defs>\
  <path d='M24,16 Q500,42 976,16' fill='none' stroke='url(%23curveMask)' stroke-width='6' stroke-linecap='round'/>\
</svg>");
  mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 64' preserveAspectRatio='none'>\
  <defs>\
    <linearGradient id='curveMask' x1='0%' y1='0%' x2='100%' y2='0%'>\
      <stop offset='0%' stop-color='black' stop-opacity='0'/>\
      <stop offset='20%' stop-color='black' stop-opacity='0.22'/>\
      <stop offset='50%' stop-color='black' stop-opacity='1'/>\
      <stop offset='80%' stop-color='black' stop-opacity='0.22'/>\
      <stop offset='100%' stop-color='black' stop-opacity='0'/>\
    </linearGradient>\
  </defs>\
  <path d='M24,16 Q500,42 976,16' fill='none' stroke='url(%23curveMask)' stroke-width='6' stroke-linecap='round'/>\
</svg>");
}

.downbar-inner {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
  width: max-content;
  max-width: calc(100% - var(--downbar-bmc-space) - 36px);
  z-index: 2;
}

.downbar-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.downbar-updated {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.downbar-link {
  margin-top: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.downbar-link:hover {
  color: var(--text);
}

/* ================================================================
   betöltődést jelző animált pontok
   ================================================================ */
.loading-dots {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  min-width: 18px;
  letter-spacing: 0;
}

.loading-dots span {
  display: inline-block;
  width: 6px;
  text-align: center;
  opacity: 0.25;
  transform: scale(1);
  animation: loadingDotPulse 1s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loadingDotPulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }

  20% {
    opacity: 1;
    transform: scale(1.35);
  }
}

/* ================================================================
   rövid szeparátor a discord ikon előtt
   ================================================================ */
.topbar-separator {
  width: 1px;
  height: 24px;
  background: var(--line);
  opacity: 0.9;
  align-self: center;
  margin: 0;
  flex: 0 0 auto;
}

/* ================================================================
   topbar gyorsműveletek
   ================================================================ */
.topbar-action-menu {
  position: relative;
}

.topbar-icon-button,
.language-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: none;
  background: transparent;
  color: var(--topbar-soft);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: none;
}

.topbar-icon-button:hover,
.language-current:hover {
  background: rgba(127, 127, 127, 0.1);
}

/* ================================================================
   discord ikon méret
   ================================================================ */
#discordIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
}

#discordIcon svg {
  width: 25px;
  height: 25px;
  display: block;
}

.topbar-icon-button .btn-icon,
.language-current .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
}

.topbar-action-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1600;
  min-width: 260px;
  padding: 6px;
  background: var(--main);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.topbar-action-dropdown.open {
  display: grid;
  gap: 4px;
}

.topbar-action-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  font: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

/* ================================================================
   discord lenyíló menü hover állapot
   ================================================================ */
:root[data-theme="light"] .topbar-action-item:hover,
:root[data-theme="light"] .topbar-action-item:focus-visible {
  background: rgba(17, 24, 39, 0.08);
}

:root[data-theme="dark"] .topbar-action-item:hover,
:root[data-theme="dark"] .topbar-action-item:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.topbar-action-item-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  flex: 0 0 18px;
}

.topbar-action-item-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.topbar-action-item-icon svg path,
.topbar-action-item-icon svg polygon {
  fill: currentColor;
}

.topbar-action-item-support {
  align-items: center;
}

.topbar-action-item-support .support-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.topbar-action-item-support .support-meta strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-action-item-support .support-meta small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.language-current {
  color: var(--topbar-soft);
}

:root[data-theme="light"] .language-current,
:root[data-theme="dark"] .language-current {
  background: transparent;
  border: none;
}

:root[data-theme="light"] .language-menu,
:root[data-theme="dark"] .language-menu {
  background: var(--main);
  border-color: var(--line);
}

/* ================================================================
   reszponzív topbar
   ================================================================ */
@media (max-width: 1024px) {
  .topbar-actions {
    gap: 14px;
    flex-wrap: nowrap;
    padding-bottom: 0;
    justify-content: flex-end;
    width: auto;
    margin-left: auto;
  }

  .topbar-icon-button,
  .language-current {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }

  .language-current .lang-arrow,
  .language-current span:nth-child(2) {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --topbar-height: 38px;
    --downbar-height: 60px;
    --downbar-bmc-space: 170px;
  }

  .topbar {
    padding: 5px 10px;
    gap: 8px;
  }

  .topbar-actions {
    gap: 10px;
  }

  .topbar-brand-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  .topbar-brand-title {
    font-size: 15px;
  }

  .topbar-separator {
    height: 20px;
  }

  .discord-widget-panel {
    right: 10px;
    top: calc(var(--topbar-height) + 6px);
    width: calc(100vw - 20px);
  }

  .topbar-action-dropdown {
    right: 0;
    min-width: 240px;
  }

  .content {
    padding: 18px 14px 18px;
  }

  .sidebar-drawer {
    width: min(340px, 92vw);
  }

  .downbar {
    padding: 8px 10px;
  }

  .downbar::before,
  .downbar::after {
    width: 158%;
    height: 14px;
  }

  .downbar::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 56' preserveAspectRatio='none'>\
  <path fill='black' d='M0,56 L0,14 Q500,34 1000,14 L1000,56 Z'/>\
</svg>");
    mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 56' preserveAspectRatio='none'>\
  <path fill='black' d='M0,56 L0,14 Q500,34 1000,14 L1000,56 Z'/>\
</svg>");
  }

  .downbar::after {
    -webkit-mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 56' preserveAspectRatio='none'>\
  <defs>\
    <linearGradient id='curveMaskMobile' x1='0%' y1='0%' x2='100%' y2='0%'>\
      <stop offset='0%' stop-color='black' stop-opacity='0'/>\
      <stop offset='22%' stop-color='black' stop-opacity='0.18'/>\
      <stop offset='50%' stop-color='black' stop-opacity='1'/>\
      <stop offset='78%' stop-color='black' stop-opacity='0.18'/>\
      <stop offset='100%' stop-color='black' stop-opacity='0'/>\
    </linearGradient>\
  </defs>\
  <path d='M28,14 Q500,34 972,14' fill='none' stroke='url(%23curveMaskMobile)' stroke-width='5' stroke-linecap='round'/>\
</svg>");
    mask-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 56' preserveAspectRatio='none'>\
  <defs>\
    <linearGradient id='curveMaskMobile' x1='0%' y1='0%' x2='100%' y2='0%'>\
      <stop offset='0%' stop-color='black' stop-opacity='0'/>\
      <stop offset='22%' stop-color='black' stop-opacity='0.18'/>\
      <stop offset='50%' stop-color='black' stop-opacity='1'/>\
      <stop offset='78%' stop-color='black' stop-opacity='0.18'/>\
      <stop offset='100%' stop-color='black' stop-opacity='0'/>\
    </linearGradient>\
  </defs>\
  <path d='M28,14 Q500,34 972,14' fill='none' stroke='url(%23curveMaskMobile)' stroke-width='5' stroke-linecap='round'/>\
</svg>");
  }

  .downbar-title {
    font-size: 12px;
  }

  .downbar-updated,
  .downbar-link {
    font-size: 10px;
  }

  /* ================================================================
     mobilon kisebb és magasabban korlátozott nyelvlista
     ================================================================ */
  .language-menu {
    max-width: min(92vw, 300px);
    max-height: min(60vh, 320px);
  }
}

/* ================================================================
   buy me a coffee widget igazítása a fix downbar jobb sarkába
   a widget belső kinézetéhez nem nyúlunk
   ================================================================ */
#bmc-wbtn {
  position: fixed !important;
  right: 18px !important;
  bottom: calc((var(--downbar-height) - 48px) / 2) !important;
  z-index: 1250 !important;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
}

#bmc-wbtn + div {
  right: 18px !important;
  bottom: calc(var(--downbar-height) + 8px) !important;
  z-index: 1250 !important;
}

@media (max-width: 768px) {
  #bmc-wbtn {
    right: 10px !important;
    bottom: calc((var(--downbar-height) - 48px) / 2) !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
  }

  #bmc-wbtn + div {
    right: 10px !important;
    bottom: calc(var(--downbar-height) + 8px) !important;
  }
}
