/* LINEAGE 2 H5 THEME */
html.h5-theme,
body.h5-theme {
  --bg-primary: #0d0d0d;
  --bg-secondary: #1a1a1a;
  --text-primary: #d4af37;
  --text-secondary: #8b7355;
  --header-bg: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  --link-color: #d32f2f;
  --border-color: #3a3a3a;
  --gold-accent: #ffa726;
  --red-accent: #d32f2f;
  --blue-accent: #1e88e5;
  font-family: 'Segoe UI', 'Trebuchet MS', Arial, sans-serif;
}

body.h5-theme {
  background: #0d0d0d;
  color: #d4af37;
  text-shadow: 0 0 2px rgba(212, 175, 55, 0.3);
}

/* H5 Header — csak a fő site-header, ne a profil/kártya <header> elemek */
body.h5-theme header.site-header {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #d32f2f 0%, #ffa726 50%, #d32f2f 100%) 1;
  box-shadow:
    0 2px 10px rgba(211, 47, 47, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 20px rgba(255, 167, 38, 0.3);
  position: relative;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px 6px;
}

body.h5-theme header.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffa726 30%, #d4af37 50%, #ffa726 70%, transparent);
  box-shadow: 0 0 8px rgba(255, 167, 38, 0.6);
}

body.h5-theme header.site-header::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 167, 38, 0.5), transparent);
}

body.h5-theme header.site-header h1 {
  color: #ffa726;
  text-shadow: 0 0 10px rgba(255, 167, 38, 0.8), 0 2px 4px rgba(0,0,0,0.8);
  font-weight: 700;
  letter-spacing: 1px;
}

body.h5-theme:not(.l2-window-nav) .header-top-row {
  justify-content: center;
  width: 100%;
}

body.h5-theme:not(.l2-window-nav) .header-brand {
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

body.h5-theme:not(.l2-window-nav) .header-brand img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

body.h5-theme:not(.l2-window-nav) .site-header .site-title {
  font-size: 1.55em;
  letter-spacing: 0.08em;
}

/* H5 fejléc: csak logó + státuszsáv (menü az oldalsávban) */

/* H5 oldal: bal oldalsáv + tartalom */
body.h5-theme:not(.l2-window-nav) .h5-page-shell {
  display: grid;
  grid-template-columns: minmax(200px, 230px) minmax(0, 1fr);
  gap: 14px 18px;
  padding: 10px 14px 24px;
  max-width: 1480px;
  margin: 0 auto;
  align-items: start;
  box-sizing: border-box;
}

body.h5-theme:not(.l2-window-nav) .h5-sidebar {
  position: sticky;
  top: 10px;
  align-self: start;
}

body.h5-theme:not(.l2-window-nav) .h5-sidebar-nav,
body.h5-theme:not(.l2-window-nav) .main-nav--sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin: 0;
  padding: 8px 0;
  background: linear-gradient(180deg, #1e1e1e 0%, #141414 100%);
  border: 1px solid #5a4a38;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 14px rgba(0, 0, 0, 0.35);
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  padding: 4px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row:first-child {
  border-top: none;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row > a,
body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row > .dropdown > .dropbtn,
body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row--admin > a,
body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row--account > a {
  width: 100%;
  justify-content: flex-start;
  min-height: 0;
  padding: 8px 12px;
  border-radius: 0;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  text-align: left;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row > a::after {
  display: none;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .dropdown > .dropbtn {
  cursor: pointer;
  position: relative;
  padding-right: 28px;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .dropdown > .dropbtn::after {
  content: '▾';
  display: block !important;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: #8b7355;
  border: none;
  inset: auto;
  clip-path: none;
  pointer-events: none;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .dropdown.open > .dropbtn::after {
  content: '▴';
  color: #ffa726;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row > a:hover,
body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row > .dropdown > .dropbtn:hover,
body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row--admin > a:hover {
  background: rgba(211, 47, 47, 0.15);
  border-left-color: #d32f2f;
  color: #ffd37a;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .dropdown {
  width: 100%;
  display: block;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .dropdown-content {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  max-height: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: none;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0 4px 8px;
  margin: 0;
  overflow: hidden;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .dropdown.open > .dropdown-content {
  display: block;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .dropdown-content a {
  display: block;
  padding: 5px 10px 5px 18px;
  font-size: 0.76rem;
  border: none !important;
  background: transparent !important;
  color: #b8a078 !important;
  clip-path: none;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .dropdown-content a:hover {
  color: #ffd37a !important;
  background: rgba(255, 167, 38, 0.08) !important;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .submenu-content {
  position: static;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0 0 0 8px;
  background: transparent;
  box-shadow: none;
  transition: max-height 0.2s ease, opacity 0.2s ease;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .submenu.open .submenu-content {
  max-height: 200px;
  opacity: 1;
}

body.h5-theme:not(.l2-window-nav) .main-nav--sidebar .main-nav__row--admin {
  border-top: 1px solid rgba(182, 64, 64, 0.35);
  padding-top: 4px;
}

body.h5-theme:not(.l2-window-nav) .h5-page-main {
  min-width: 0;
}

body.h5-theme:not(.l2-window-nav) .h5-page-main > main {
  padding: 0;
}

body.h5-theme:not(.l2-window-nav) main {
  padding: 0;
}

@media (max-width: 960px) {
  body.h5-theme:not(.l2-window-nav) .h5-page-shell {
    grid-template-columns: 1fr;
    padding: 8px 10px 20px;
  }

  body.h5-theme:not(.l2-window-nav) .h5-sidebar {
    position: static;
  }

  body.h5-theme:not(.l2-window-nav) .main-nav--sidebar {
    max-height: 42vh;
    overflow-y: auto;
  }
}

/* L2 és egyéb: fejléc menü rács (H5 sidebar layout nélkül) */
body.h5-theme.l2-window-nav .main-nav,
body.h5-theme:not(.l2-window-nav) .main-nav:not(.main-nav--header):not(.main-nav--sidebar):not(.main-nav--drawer) {
  flex: 1 1 100%;
  width: 100%;
  overflow: visible !important;
  position: relative;
  z-index: 10000;
  display: grid;
  grid-template-columns: repeat(var(--nav-cols, 8), minmax(0, 1fr));
  gap: 5px;
  align-items: stretch;
  margin-top: 2px;
}

body.h5-theme .main-nav:not(.main-nav--header):not(.main-nav--sidebar):not(.main-nav--drawer) .main-nav__row,
body.h5-theme.l2-window-nav .main-nav__row {
  display: contents;
}

body.h5-theme .main-nav:not(.main-nav--header):not(.main-nav--sidebar):not(.main-nav--drawer) .main-nav__row--admin,
body.h5-theme.l2-window-nav .main-nav__row--admin {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(var(--nav-cols, 8), minmax(0, 1fr));
  gap: 5px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
}

body.h5-theme .main-nav:not(.main-nav--header):not(.main-nav--sidebar):not(.main-nav--drawer) .main-nav__row--account,
body.h5-theme.l2-window-nav .main-nav__row--account {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(var(--nav-cols, 8), minmax(0, 1fr));
  gap: 5px;
}

body.h5-theme .main-nav:not(.main-nav--header):not(.main-nav--sidebar):not(.main-nav--drawer) .main-nav__row--admin > a,
body.h5-theme.l2-window-nav .main-nav__row--admin > a {
  border-color: #5a4030;
  background: linear-gradient(180deg, #2a2218 0%, #1a1610 100%);
}

body.h5-theme .dropdown {
  position: relative;
  z-index: auto;
}

body.h5-theme .dropdown:hover {
  z-index: 10050;
}

body.h5-theme .dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
  pointer-events: auto;
}

body.h5-theme .main-nav--header > .main-nav__row > a,
body.h5-theme .main-nav--header > .main-nav__row > .dropdown > .dropbtn,
body.h5-theme .main-nav--header > .main-nav__row--admin > a,
body.h5-theme .main-nav--header > .main-nav__row--account > a,
body.h5-theme.l2-window-nav .main-nav__row > a,
body.h5-theme.l2-window-nav .main-nav__row > .dropdown > .dropbtn,
body.h5-theme.l2-window-nav .main-nav__row--admin > a,
body.h5-theme.l2-window-nav .main-nav__row--account > a {
  width: 100%;
  box-sizing: border-box;
}

/* H5 Buttons with cut corners — főmenü gombok */
body.h5-theme .main-nav--header > .main-nav__row > a,
body.h5-theme .main-nav--header > .main-nav__row > .dropdown > .dropbtn,
body.h5-theme .main-nav--header > .main-nav__row--admin > a,
body.h5-theme .main-nav--header > .main-nav__row--account > a,
body.h5-theme.l2-window-nav .main-nav__row > a,
body.h5-theme.l2-window-nav .main-nav__row > .dropdown > .dropbtn,
body.h5-theme.l2-window-nav .main-nav__row--admin > a,
body.h5-theme.l2-window-nav .main-nav__row--account > a,
body.h5-theme button,
body.h5-theme .dark-mode-toggle {
  position: relative;
  clip-path: polygon(
    5px 0, calc(100% - 5px) 0,
    100% 5px, 100% calc(100% - 5px),
    calc(100% - 5px) 100%, 5px 100%,
    0 calc(100% - 5px), 0 5px
  );
  overflow: hidden;
}

body.h5-theme .main-nav--header > .main-nav__row > a::after,
body.h5-theme .main-nav--header > .main-nav__row > .dropdown > .dropbtn::after,
body.h5-theme .main-nav--header > .main-nav__row--admin > a::after,
body.h5-theme .main-nav--header > .main-nav__row--account > a::after,
body.h5-theme.l2-window-nav .main-nav__row > a::after,
body.h5-theme.l2-window-nav .main-nav__row > .dropdown > .dropbtn::after,
body.h5-theme.l2-window-nav .main-nav__row--admin > a::after,
body.h5-theme.l2-window-nav .main-nav__row--account > a::after,
body.h5-theme button::after,
body.h5-theme .dark-mode-toggle::after {
  content: '';
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  clip-path: inherit;
  pointer-events: none;
}

/* H5 Navigation — fejléc + L2 főmenü gombok (nem oldalsáv) */
body.h5-theme .main-nav--header > .main-nav__row > a,
body.h5-theme .main-nav--header > .main-nav__row > .dropdown > .dropbtn,
body.h5-theme .main-nav--header > .main-nav__row--admin > a,
body.h5-theme .main-nav--header > .main-nav__row--account > a,
body.h5-theme.l2-window-nav .main-nav__row > a,
body.h5-theme.l2-window-nav .main-nav__row > .dropdown > .dropbtn,
body.h5-theme.l2-window-nav .main-nav__row--admin > a,
body.h5-theme.l2-window-nav .main-nav__row--account > a {
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  border: 1px solid #6e5a40;
  color: #d4af37;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 2px 4px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
}

body.h5-theme .main-nav--header > .main-nav__row > a:hover,
body.h5-theme .main-nav--header > .main-nav__row > .dropdown > .dropbtn:hover,
body.h5-theme .main-nav--header > .main-nav__row--admin > a:hover,
body.h5-theme .main-nav--header > .main-nav__row--account > a:hover,
body.h5-theme.l2-window-nav .main-nav__row > a:hover,
body.h5-theme.l2-window-nav .main-nav__row > .dropdown > .dropbtn:hover,
body.h5-theme.l2-window-nav .main-nav__row--admin > a:hover,
body.h5-theme.l2-window-nav .main-nav__row--account > a:hover {
  background: linear-gradient(180deg, #3a1f1f 0%, #2b1616 100%);
  border-color: #b64040;
  color: #ffd37a;
  box-shadow: 0 0 10px rgba(182, 64, 64, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* H5 Theme Toggle */
body.h5-theme .dark-mode-toggle {
  background: linear-gradient(180deg, #b71c1c 0%, #8f1414 100%);
  border: 1px solid #b64040;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-weight: 600;
  transition: all 0.2s ease;
}

body.h5-theme .dark-mode-toggle:hover {
  background: linear-gradient(180deg, #d32f2f 0%, #b71c1c 100%);
  box-shadow: 0 0 12px rgba(255, 68, 68, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* H5 Buttons */
body.h5-theme button {
  background: linear-gradient(180deg, #b71c1c 0%, #8f1414 100%);
  color: #ffffff;
  border: 1px solid #b64040;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-weight: 600;
  transition: all 0.2s ease;
}

body.h5-theme button:hover {
  background: linear-gradient(180deg, #d32f2f 0%, #b71c1c 100%);
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* H5 Main Container */
body.h5-theme main {
  background: #0d0d0d;
  position: relative;
  padding: 25px;
  transition: all 0.4s ease;
  z-index: 1;
}

body.h5-theme main::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
  pointer-events: none;
}

/* H5 Inputs */
body.h5-theme input,
body.h5-theme textarea,
body.h5-theme select {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  color: #d4af37;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #3a3a3a 0%, #8b7355 50%, #3a3a3a 100%) 1;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 0 5px rgba(139, 115, 85, 0.2);
  transition: all 0.3s ease;
}

body.h5-theme input:focus,
body.h5-theme textarea:focus,
body.h5-theme select:focus {
  border-image: linear-gradient(135deg, #ffa726 0%, #d4af37 50%, #ffa726 100%) 1;
  box-shadow:
    0 0 12px rgba(255, 167, 38, 0.6),
    inset 0 2px 4px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(212, 175, 55, 0.3);
  outline: none;
}

/* H5 Tables */
body.h5-theme table {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 3px solid transparent;
  border-image: linear-gradient(135deg, #8b7355 0%, #d4af37 20%, #ffa726 50%, #d4af37 80%, #8b7355 100%) 1;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(255, 167, 38, 0.1),
    0 0 15px rgba(212, 175, 55, 0.3);
  position: relative;
}

body.h5-theme table::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffa726, transparent);
  opacity: 0.5;
}

body.h5-theme table::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffa726, transparent);
  opacity: 0.5;
}

body.h5-theme table th {
  background: linear-gradient(135deg, #2a2a2a 0%, #1d1d1d 100%);
  color: #ffa726;
  border: 1px solid transparent;
  border-image: linear-gradient(135deg, #3a3a3a 0%, #8b7355 50%, #3a3a3a 100%) 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 5px rgba(255, 167, 38, 0.4);
  font-weight: 700;
  padding: 14px 12px;
  position: relative;
}

body.h5-theme table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 167, 38, 0.5), transparent);
}

body.h5-theme table td {
  background: linear-gradient(135deg, #1a1a1a 0%, #222222 100%);
  color: #d4af37;
  border: 1px solid #2a2a2a;
  padding: 12px;
  transition: all 0.3s ease;
}

body.h5-theme table tr:hover td {
  background: linear-gradient(135deg, #252525 0%, #2d2d2d 100%);
  box-shadow: inset 0 0 8px rgba(255, 167, 38, 0.2);
  color: #ffa726;
}

/* H5 Links */
body.h5-theme a {
  color: #ffa726;
  text-shadow: 0 0 4px rgba(255, 167, 38, 0.4);
  transition: all 0.3s ease;
}

body.h5-theme a:hover {
  color: #ff4444;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

/* H5 User Info */
body.h5-theme .user-info {
  color: #d4af37;
}

body.h5-theme .user-info a {
  color: #ffa726;
  text-shadow: 0 0 4px rgba(255, 167, 38, 0.4);
}

body.h5-theme .user-info a:hover {
  color: #ff4444;
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

/* H5 Error/Message */
body.h5-theme .error {
  background: linear-gradient(135deg, #330000 0%, #1a0000 100%);
  color: #ff6666;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #d32f2f 0%, #ff4444 50%, #d32f2f 100%) 1;
  box-shadow:
    0 0 10px rgba(211, 47, 47, 0.3),
    inset 0 0 15px rgba(255, 68, 68, 0.1);
}

body.h5-theme .message {
  background: linear-gradient(135deg, #003300 0%, #001a00 100%);
  color: #66ff66;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #4caf50 0%, #66ff66 50%, #4caf50 100%) 1;
  box-shadow:
    0 0 10px rgba(76, 175, 80, 0.3),
    inset 0 0 15px rgba(102, 255, 102, 0.1);
}

/* H5 Code blocks */
body.h5-theme code {
  background: #1a1a1a;
  color: #ffa726;
  border: 1px solid #3a3a3a;
}

/* H5 Dropdown */
html[data-theme="h5"] body.h5-theme .dropdown-content,
body.h5-theme .dropdown-content {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #8b7355 0%, #d4af37 50%, #8b7355 100%) 1;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(212, 175, 55, 0.3);
  min-width: 260px;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 140px);
  box-sizing: border-box;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 10002;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

body.h5-theme .dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.15s ease 0.1s, visibility 0s linear 0s;
}

body.h5-theme .dropdown-content a {
  color: #d4af37;
  border-bottom: 1px solid #2a2a2a;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

body.h5-theme .dropdown-content a:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: #ffffff;
}

body.h5-theme .separator {
  border-top: 1px solid rgba(255, 167, 38, 0.3);
}

/* H5 Footer */
body.h5-theme footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  color: #8b7355;
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #8b7355 0%, #d4af37 50%, #8b7355 100%) 1;
  box-shadow:
    0 -2px 8px rgba(0, 0, 0, 0.5),
    inset 0 0 15px rgba(212, 175, 55, 0.1);
  position: relative;
}

body.h5-theme footer::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

/* H5 Item icons */
body.h5-theme .item-icon {
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, #8b7355 0%, #d4af37 50%, #8b7355 100%) 1;
  box-shadow:
    0 0 8px rgba(255, 167, 38, 0.3),
    inset 0 0 5px rgba(212, 175, 55, 0.2);
  transition: all 0.3s ease;
  clip-path: polygon(
    4px 0, calc(100% - 4px) 0,
    100% 4px, 100% calc(100% - 4px),
    calc(100% - 4px) 100%, 4px 100%,
    0 calc(100% - 4px), 0 4px
  );
}

body.h5-theme .item-icon:hover {
  border-image: linear-gradient(135deg, #ffa726 0%, #d4af37 50%, #ffa726 100%) 1;
  box-shadow:
    0 0 12px rgba(255, 167, 38, 0.6),
    inset 0 0 8px rgba(212, 175, 55, 0.4),
    0 0 20px rgba(255, 167, 38, 0.4);
  transform: scale(1.05);
}

body.h5-theme .grade-pill {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 8px rgba(212, 175, 55, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

body.h5-theme .empty-state {
  color: #8b7355 !important;
  font-style: italic;
}

body.h5-theme .pagination a {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  color: #d4af37;
  border: 1px solid #6e5a40;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.h5-theme .pagination a:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
  color: #ffffff;
  border-color: #b64040;
  box-shadow: 0 0 8px rgba(211, 47, 47, 0.5);
}

/* H5 Custom Scrollbar */
body.h5-theme ::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

body.h5-theme ::-webkit-scrollbar-track {
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 1px solid #3a3a3a;
}

body.h5-theme ::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8b7355 0%, #d4af37 100%);
  border: 1px solid #d4af37;
  box-shadow: inset 0 0 6px rgba(255, 167, 38, 0.3);
}

body.h5-theme ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #d4af37 0%, #ffa726 100%);
  box-shadow: 0 0 8px rgba(255, 167, 38, 0.5);
}

body.h5-theme ::-webkit-scrollbar-corner {
  background: #1a1a1a;
}

/* Android app WebView: keep page content, hide duplicated site-level navigation chrome */
body.h5-theme .elyra-fab__trigger {
  border-color: #6e5a40;
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
}

body.h5-theme .elyra-fab__panel {
  border-color: #6e5a40;
}

body.h5-theme.app-webview header.site-header {
  padding: 10px 12px;
}

body.h5-theme.app-webview .elyra-fab {
  display: none !important;
}

body.h5-theme.app-webview .header-brand,
body.h5-theme.app-webview .main-nav,
body.h5-theme.app-webview .user-info {
  display: none !important;
}

body.h5-theme.app-webview .header-top-row {
  min-height: 0;
  gap: 0;
}

body.h5-theme.app-webview main {
  padding-top: 14px;
}

/* Naptár: a globális piros H5 gombok helyett arany/bronz, különösen a mini napcellák */
body.h5-theme.calendar-hub button:not(.dark-mode-toggle) {
  clip-path: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #2c2820 0%, #1a1814 100%);
  border: 1px solid rgba(110, 94, 64, 0.65);
  color: #d4af37;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.h5-theme.calendar-hub button:not(.dark-mode-toggle)::after {
  display: none;
}

body.h5-theme.calendar-hub button:not(.dark-mode-toggle):hover {
  background: linear-gradient(180deg, #3a3428 0%, #242018 100%);
  border-color: rgba(212, 175, 55, 0.55);
  color: #f0e6c8;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.h5-theme.calendar-hub .mini-days button {
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(26, 24, 20, 0.92);
  border: 1px solid rgba(90, 78, 56, 0.5);
  color: #c4b896;
  box-shadow: none;
  text-shadow: none;
}

body.h5-theme.calendar-hub .mini-days button:hover {
  border-color: rgba(212, 175, 55, 0.45);
  color: #eee2c4;
  background: rgba(38, 34, 28, 0.98);
  box-shadow: none;
}

body.h5-theme.calendar-hub .mini-days button.selected {
  background: linear-gradient(180deg, #5a4a2a 0%, #3d3318 100%);
  border-color: #c9a44a;
  color: #fffdf5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(212, 175, 55, 0.22);
}

body.h5-theme.calendar-hub .mini-days button.selected:hover {
  border-color: #d4af37;
  color: #fff;
}

body.h5-theme.calendar-hub .btn-ok {
  background: linear-gradient(180deg, #6a5830 0%, #453a1c 100%);
  border-color: #b8963a;
  color: #fffef6;
}

body.h5-theme.calendar-hub .btn-ok:hover {
  background: linear-gradient(180deg, #7d6a38 0%, #524622 100%);
  border-color: #d4af37;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.28);
  filter: none;
}

body.h5-theme.calendar-hub .btn-no {
  background: linear-gradient(180deg, #222 0%, #141414 100%);
  border-color: #3d3d3d;
  color: #a8a08a;
}

body.h5-theme.calendar-hub .btn-no:hover {
  border-color: #6e5a40;
  color: #d4c4a8;
  box-shadow: none;
}

/* Profil: ne legyen minden gomb a globális piros H5 stílus */
body.h5-theme.profile-hub button:not(.dark-mode-toggle) {
  clip-path: none;
}

body.h5-theme.profile-hub button:not(.dark-mode-toggle)::after {
  display: none;
}

body.h5-theme.profile-hub .profile-hero .profile-quicklinks a {
  clip-path: none;
}

body.h5-theme.profile-hub .profile-hero .profile-quicklinks a::after {
  display: none;
}

body.h5-theme.profile-hub .profile-page .btn {
  background: linear-gradient(180deg, #6a5830 0%, #453a1c 100%);
  border: 1px solid #b8963a;
  color: #fffef6;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

body.h5-theme.profile-hub .profile-page .btn:hover {
  background: linear-gradient(180deg, #7d6a38 0%, #524622 100%);
  border-color: #d4af37;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.22);
  filter: none;
}

body.h5-theme.profile-hub .profile-page .btn--success {
  background: linear-gradient(180deg, #1d4d2e 0%, #0f2d1a 100%);
  border-color: #34d399;
  color: #ecfdf5;
}

body.h5-theme.profile-hub .profile-page .btn--success:hover {
  border-color: #6ee7b7;
}

body.h5-theme.profile-hub .profile-page .btn--danger {
  background: linear-gradient(180deg, #5c1f1f 0%, #3d1515 100%);
  border-color: #b91c1c;
  color: #fee2e2;
}

body.h5-theme.profile-hub .profile-page .btn--danger:hover {
  border-color: #f87171;
}

body.h5-theme.profile-hub .profile-page .password-toggle {
  background: linear-gradient(180deg, #2a2824 0%, #1a1916 100%);
  border: 1px solid #4a453c;
  color: #d6d0c4;
  text-shadow: none;
  box-shadow: none;
}

body.h5-theme.profile-hub .profile-page .password-toggle:hover {
  border-color: rgba(212, 175, 55, 0.45);
  color: #f0e6c8;
}
