:root {
  --lemon-50: #fffdf3;
  --lemon-100: #fff7d6;
  --lemon-200: #ffefad;
  --lemon-300: #ffe380;
  --lemon-600: #d4a60a;
  --lemon-700: #b78508;
  --ink: #222;
  --header-h: 72px;
  --menu-w: 300px;
  --blog-image-surface:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 1px 1px, rgba(212, 166, 10, 0.12) 1.1px, transparent 0),
    linear-gradient(135deg, rgba(255, 250, 234, 0.98), rgba(255, 241, 191, 0.94));
  --blog-image-surface-size: auto, 18px 18px, auto;
  --blog-image-border: rgba(212, 166, 10, 0.22);
}

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

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 34, 34, 0.28) rgba(0, 0, 0, 0.04);
}

body {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

hr {
  border: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.container-xxl {
  width: min(100%, 1320px);
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}

.d-flex {
  display: flex !important;
}

.d-none {
  display: none !important;
}

.flex-column {
  flex-direction: column !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.justify-content-center {
  justify-content: center !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

.gap-3 {
  gap: 1rem !important;
}

.small {
  font-size: 0.875rem !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-muted {
  color: rgba(34, 34, 34, 0.55) !important;
}

.text-start {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.text-decoration-none {
  text-decoration: none !important;
}

.link-dark {
  color: var(--ink, #222) !important;
}

.pt-4 {
  padding-top: 1.5rem !important;
}

.pb-4 {
  padding-bottom: 1.5rem !important;
}

.px-2 {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.px-3 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.py-1 {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}

.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.m-0 {
  margin: 0 !important;
}

.me-1 {
  margin-right: 0.25rem !important;
}

.ms-2 {
  margin-left: 0.5rem !important;
}

.rounded-pill {
  border-radius: 999px !important;
}

.border-top {
  border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.border-warning-subtle {
  border-color: rgba(212, 166, 10, 0.22) !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  min-height: 2.25rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.btn-outline-warning {
  border-color: rgba(212, 166, 10, 0.38);
  background: rgba(255, 247, 214, 0.72);
  color: #7c5b00;
}

.btn-outline-warning:hover {
  background: rgba(255, 231, 153, 0.92);
  border-color: rgba(212, 166, 10, 0.65);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.text-bg-warning {
  background: #facc15;
  color: #1f2937;
}

.dropdown-divider {
  border-top-color: rgba(0, 0, 0, 0.08);
}

#menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--menu-w);
  height: calc(100vh - var(--header-h));
  overflow: auto;
  background: linear-gradient(180deg, var(--lemon-100), var(--lemon-50));
  box-shadow: 2px 0 12px rgba(212, 166, 10, 0.08);
  z-index: 1300;
}

#menu nav {
  min-height: 100%;
}

#menu ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

#menu li {
  padding: 0;
}

#menu li > a,
#menu .submenu-toggle {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}

#menu li > a:hover,
#menu .submenu-toggle:hover {
  background: var(--lemon-200);
}

#menu li.has-children > .submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#menu li .submenu {
  display: none;
  padding: 4px 0 4px 12px;
}

#menu li.open > .submenu {
  display: block;
}

#menu li .submenu .menu-link {
  padding-left: 20px;
}

#menu li.has-children > .submenu-toggle .caret {
  transition: transform 0.2s ease;
}

#menu li.open > .submenu-toggle .caret {
  transform: rotate(90deg);
}

#menu .menu-streamer {
  margin: 6px 0 16px;
  padding: 0 12px 14px;
  position: relative;
}

#menu .menu-link-streamer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--streamer-menu-default-color);
  background: var(--streamer-menu-default-bg);
  box-shadow: 0 8px 18px var(--streamer-menu-shadow);
  text-decoration: none;
  animation: streamerModeCycle 18s ease-in-out infinite;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

#menu .menu-link-streamer:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
}

#menu .menu-link-streamer:focus-visible {
  transform: translateX(4px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.18);
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

#menu .menu-link-streamer i {
  font-size: 1.25rem;
  flex: 0 0 auto;
}

#menu .menu-streamer-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#menu .menu-streamer-text .label {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

#menu .menu-streamer-subtitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
}

#user-menu {
  position: relative;
  display: inline-block;
}

#user-menu .user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--lemon-200);
  border-radius: 14px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  display: none;
  z-index: 1700;
}

#user-menu.open .user-menu {
  display: block;
}

#user-menu .user-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#user-menu .user-menu li,
#user-menu .user-menu a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

#user-menu .user-menu li:hover,
#user-menu .user-menu a:hover {
  background: var(--lemon-100);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--lemon-200);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
  padding: 0.45rem;
  overflow: hidden;
  z-index: 1700;
}

.search-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(34, 34, 34, 0.52);
  padding: 0.5rem 0.7rem 0.35rem;
}

.search-item,
.search-empty {
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
}

.search-item {
  cursor: pointer;
}

.search-item:hover,
.search-item.active {
  background: var(--lemon-100);
}

.search-empty {
  color: rgba(34, 34, 34, 0.58);
}

html[data-theme="dark"] {
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.06);
  --lemon-50: #0f1115;
  --lemon-100: #141821;
  --lemon-200: #1f2533;
  --lemon-300: #2a3245;
  --lemon-600: #c9aa3c;
  --lemon-700: #e0bd4b;
  --ink: #e9e9ee;
  --blog-image-surface:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 1px 1px, rgba(250, 204, 21, 0.1) 1.1px, transparent 0),
    linear-gradient(135deg, rgba(43, 47, 58, 0.98), rgba(26, 29, 37, 0.96));
  --blog-image-surface-size: auto, 18px 18px, auto;
  --blog-image-border: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .text-muted {
  color: #a8acb8 !important;
}

html[data-theme="dark"] .border-top {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .border-warning-subtle {
  border-color: rgba(201, 170, 60, 0.22) !important;
}

html[data-theme="dark"] .btn-outline-warning {
  border-color: rgba(201, 170, 60, 0.38);
  background: rgba(201, 170, 60, 0.08);
  color: #f6d86e;
}

html[data-theme="dark"] .btn-outline-warning:hover {
  background: rgba(201, 170, 60, 0.16);
  border-color: rgba(201, 170, 60, 0.55);
}

html[data-theme="dark"] .dropdown-divider {
  border-top-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] #menu {
  background: linear-gradient(180deg, #171923, #14161d);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] #menu li > a,
html[data-theme="dark"] #menu .submenu-toggle {
  color: #e9e9ee;
}

html[data-theme="dark"] #menu li > a:hover,
html[data-theme="dark"] #menu .submenu-toggle:hover {
  background: #2a2d34;
}

html[data-theme="dark"] #menu .menu-link-streamer:hover,
html[data-theme="dark"] #menu .menu-link-streamer:focus-visible {
  box-shadow: 0 14px 28px rgba(12, 12, 20, 0.55);
}

html[data-theme="dark"] #menu .menu-streamer-subtitle {
  opacity: 0.9;
}

html[data-theme="dark"] #user-menu .user-menu {
  background: #14161d;
  border-color: #2a2d34;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] #user-menu .user-menu li,
html[data-theme="dark"] #user-menu .user-menu a {
  color: #e9e9ee;
}

html[data-theme="dark"] #user-menu .user-menu li:hover,
html[data-theme="dark"] #user-menu .user-menu a:hover {
  background: #232733;
}

html[data-theme="dark"] .search-dropdown {
  background: #14161d;
  border-color: #2a2d34;
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .search-group-title {
  color: rgba(233, 233, 238, 0.55);
}

html[data-theme="dark"] .search-item:hover,
html[data-theme="dark"] .search-item.active {
  background: #232733;
}

html[data-theme="dark"] .search-empty {
  color: rgba(233, 233, 238, 0.58);
}

@keyframes streamerModeCycle {
  0%,
  12% {
    background: var(--streamer-menu-default-bg);
    color: var(--streamer-menu-default-color);
    box-shadow: 0 10px 24px var(--streamer-menu-shadow);
  }

  16%,
  28% {
    background: #ff0033;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(255, 0, 51, 0.32);
  }

  32%,
  44% {
    background: var(--streamer-menu-default-bg);
    color: var(--streamer-menu-default-color);
    box-shadow: 0 10px 24px var(--streamer-menu-shadow);
  }

  48%,
  60% {
    background: #00e701;
    color: #02330a;
    box-shadow: 0 10px 24px rgba(0, 231, 1, 0.32);
  }

  64%,
  76% {
    background: var(--streamer-menu-default-bg);
    color: var(--streamer-menu-default-color);
    box-shadow: 0 10px 24px var(--streamer-menu-shadow);
  }

  80%,
  88% {
    background: #6441a5;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(100, 65, 165, 0.4);
  }

  92%,
  96% {
    background: #040404;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(4, 4, 4, 0.55);
  }

  100% {
    background: var(--streamer-menu-default-bg);
    color: var(--streamer-menu-default-color);
    box-shadow: 0 10px 24px var(--streamer-menu-shadow);
  }
}

@media (min-width: 576px) {
  .d-sm-inline {
    display: inline !important;
  }
}

@media (max-width: 575.98px) {
  .d-sm-inline {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  :root {
    --header-h: 64px;
  }

  .container-xxl {
    padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
  }

  #menu {
    display: none;
    position: static;
    width: 100%;
    height: auto;
    box-shadow: none;
  }

  #menu.menu-open {
    display: block;
  }
}

@media (prefers-reduced-motion: reduce) {
  #menu .menu-link-streamer {
    animation: none;
  }
}
