/* ===== Dark theme — soft gold, приглушённо ===== */

body.theme-dark {
  --bg-base: #0f0e0c;
  --bg-deep: #0a0908;
  --bg-elevated: #181612;
  --bg-card: #1c1914;
  --bg-card-hover: #222018;
  --bg-inset: rgba(255, 255, 255, 0.035);

  --gradient-main: linear-gradient(135deg, rgba(201, 162, 39, 0.22) 0%, rgba(168, 132, 28, 0.14) 100%);
  --gradient-hover: linear-gradient(135deg, rgba(212, 175, 55, 0.32) 0%, rgba(184, 148, 46, 0.22) 100%);
  --gradient-shimmer: linear-gradient(90deg, #8B6914, #B8942E, #C9A227, #B8942E, #8B6914);

  --color-primary: #C9A227;
  --color-secondary: #B8942E;
  --accent-text: #D4AF37;
  --accent-soft: rgba(212, 175, 55, 0.1);
  --accent-glow: rgba(201, 162, 39, 0.05);

  --surface: rgba(18, 15, 10, 0.96);
  --surface-border: rgba(212, 175, 55, 0.1);
  --text: rgba(255, 248, 230, 0.92);
  --text-muted: rgba(255, 236, 200, 0.58);

  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
  --shadow-glow: none;

  background: #0a0907;
  color: var(--text);
}

body.theme-dark::before {
  background:
    radial-gradient(ellipse 70% 45% at 15% -5%, rgba(201, 162, 39, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 35% at 85% 5%, rgba(184, 148, 46, 0.03) 0%, transparent 45%);
}

body.theme-dark ::selection {
  background: rgba(201, 162, 39, 0.25);
  color: #fff;
}

body.theme-dark ::-webkit-scrollbar {
  background: var(--bg-deep);
}

body.theme-dark ::-webkit-scrollbar-thumb {
  background: #2a2620;
  border-radius: 5px;
  border: 2px solid var(--bg-deep);
}

body.theme-dark ::-webkit-scrollbar-thumb:hover {
  background: #353028;
}

body.theme-dark .textstyle__title,
body.theme-dark .donate__title-main,
body.theme-dark .hero-card__title .textstyle__title,
body.theme-dark .player-count,
body.theme-dark .donate__products-name,
body.theme-dark .donate__products-price,
body.theme-dark .modals__product-name,
body.theme-dark .modals__product-price,
body.theme-dark .product-modal__name,
body.theme-dark .product-detail__name {
  animation: shimmer 8s ease-in-out infinite;
}

body.theme-dark .hero-card__cta {
  animation: none;
}

/* Navigation */
body.theme-dark .nav {
  background: rgba(10, 9, 7, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.theme-dark .nav::before {
  background: linear-gradient(180deg, rgba(24, 22, 18, 0.4) 0%, transparent 100%);
}

body.theme-dark .nav__list-item {
  color: var(--text-muted);
}

body.theme-dark .nav__list-item:hover {
  color: var(--accent-text);
  background: var(--accent-soft);
}

body.theme-dark .nav__list-itemACT {
  background: rgba(201, 162, 39, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.22);
  color: #E8C547;
}

body.theme-dark .nav__list-itemACT:hover {
  background: rgba(201, 162, 39, 0.2);
  border-color: rgba(212, 175, 55, 0.3);
}

body.theme-dark .nav .nav__control-item,
body.theme-dark .nav__control-item,
html.theme-dark-pre .nav .nav__control-item {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 248, 230, 0.55);
  box-shadow: none;
}

body.theme-dark .nav .nav__control-item:hover,
body.theme-dark .nav__control-item:hover,
html.theme-dark-pre .nav .nav__control-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(212, 175, 55, 0.18);
  color: rgba(232, 197, 71, 0.85);
  transform: none;
}

body.theme-dark .nav__control-online,
body.theme-dark .nav__control-online__ip,
body.theme-dark .nav__control-online__status,
body.theme-dark #server-status,
html.theme-dark-pre .nav__control-online,
html.theme-dark-pre .nav__control-online__ip,
html.theme-dark-pre #server-status {
  color: rgba(255, 248, 230, 0.72);
}

body.theme-dark .nav__control-online__icon {
  filter: brightness(0) invert(1);
  opacity: 0.45;
}

body.theme-dark .nav__control-online__avatar {
  border-color: rgba(255, 224, 130, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

body.theme-dark .hero-server-widget {
  background: rgba(20, 16, 10, 0.72);
  border-color: rgba(255, 224, 130, 0.14);
}

body.theme-dark .hero-server-widget__avatar {
  border-color: rgba(255, 193, 7, 0.45);
  background: rgba(255, 255, 255, 0.06);
}

body.theme-dark .hero-server-widget__label {
  color: rgba(255, 248, 230, 0.55);
}

body.theme-dark .hero-server-widget__ip,
body.theme-dark .hero-server-widget__status,
body.theme-dark #server-status-mobile {
  color: rgba(255, 248, 230, 0.92);
}

body.theme-dark .nav__control-icon svg {
  opacity: 0.55;
}

body.theme-dark .nav__control-item:hover .nav__control-icon svg {
  opacity: 0.85;
}

body.theme-dark .nav__control-burger__line {
  background-color: #C9A227;
}

body.theme-dark .nav__control-theme__icon {
  filter: brightness(0) saturate(100%) invert(78%) sepia(20%) saturate(400%) hue-rotate(5deg);
  opacity: 0.75;
}

body.theme-dark .nav__control-online__tooltip {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
  color: var(--text);
}

body.theme-dark .nav__control-online__tooltip::before {
  border-bottom-color: var(--bg-card);
}

/* Footer */
body.theme-dark .footer__nav {
  background: rgba(10, 9, 7, 0.92);
  border-top: 1px solid rgba(212, 175, 55, 0.08);
}

body.theme-dark .footer__list-item {
  color: var(--text-muted);
}

body.theme-dark .footer__list-item:hover {
  color: var(--accent-text);
}

body.theme-dark .footer__copyright {
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(212, 175, 55, 0.06);
}

body.theme-dark .footer__copyright-text {
  color: rgba(255, 236, 200, 0.4);
}

body.theme-dark .footer__up {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(212, 175, 55, 0.1);
}

body.theme-dark .footer__up:hover {
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(212, 175, 55, 0.22);
}

body.theme-dark .footer__up img {
  filter: brightness(0) saturate(100%) invert(78%) sepia(20%) saturate(400%) hue-rotate(5deg);
  opacity: 0.8;
}

/* Cards */
body.theme-dark .hero-card,
body.theme-dark .donate__box,
body.theme-dark .page-card,
body.theme-dark .product-detail,
body.theme-dark .last__box-item {
  background: rgba(18, 15, 10, 0.85);
  border-color: rgba(212, 175, 55, 0.08);
  box-shadow: var(--shadow-md);
}

body.theme-dark .hero-card::before,
body.theme-dark .page-card::before {
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.35), transparent);
  background-size: 200% auto;
  animation: shimmer 6s ease-in-out infinite;
  height: 2px;
}

body.theme-dark .donate__sidebar-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--text-muted);
  box-shadow: none;
}

body.theme-dark .donate__sidebar-item:hover {
  background: rgba(201, 162, 39, 0.08);
  border-color: rgba(212, 175, 55, 0.2);
  color: var(--accent-text);
  box-shadow: none;
}

body.theme-dark .donate__sidebar-item.active {
  background: rgba(201, 162, 39, 0.16);
  border-color: rgba(212, 175, 55, 0.28);
  color: #E8C547;
  box-shadow: none;
}

body.theme-dark .donate__sidebar-item.active:hover {
  transform: none;
}

body.theme-dark .home-tabs__nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--text-muted);
}

body.theme-dark .home-tabs__nav-btn:hover {
  background: rgba(201, 162, 39, 0.08);
  border-color: rgba(212, 175, 55, 0.2);
  color: var(--accent-text);
}

body.theme-dark .home-tabs__nav-btn.active {
  background: rgba(201, 162, 39, 0.16);
  border-color: rgba(212, 175, 55, 0.28);
  color: #E8C547;
  box-shadow: none;
}

body.theme-dark .donate__products-item {
  background: rgba(22, 18, 12, 0.9);
  border-color: rgba(212, 175, 55, 0.08);
}

body.theme-dark .donate__products-item:hover {
  border-color: rgba(212, 175, 55, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

body.theme-dark .donate__products-image {
  background: rgba(255, 255, 255, 0.03);
}

body.theme-dark .donate__products-info {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(212, 175, 55, 0.1);
}

body.theme-dark .donate__products-info:hover {
  background: rgba(201, 162, 39, 0.08);
  border-color: rgba(212, 175, 55, 0.2);
  color: var(--accent-text);
}

body.theme-dark .donate__products-buy {
  background: rgba(201, 162, 39, 0.45);
  color: rgba(255, 248, 230, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.22);
}

body.theme-dark .donate__products-buy:hover {
  background: rgba(201, 162, 39, 0.58);
  border-color: rgba(212, 175, 55, 0.32);
}

/* Кнопки — приглушённые, без неонового градиента */
body.theme-dark .btn--primary,
body.theme-dark .modals__button,
body.theme-dark .hero-card__cta,
body.theme-dark .product-detail__button,
body.theme-dark .product-modal__buy {
  background: rgba(201, 162, 39, 0.48) !important;
  color: rgba(255, 248, 230, 0.95) !important;
  -webkit-text-fill-color: rgba(255, 248, 230, 0.95) !important;
  background-clip: border-box !important;
  -webkit-background-clip: border-box !important;
  border: 1px solid rgba(212, 175, 55, 0.22) !important;
  box-shadow: none !important;
  animation: none !important;
}

body.theme-dark .btn--primary:hover,
body.theme-dark .modals__button:hover,
body.theme-dark .hero-card__cta:hover,
body.theme-dark .product-detail__button:hover,
body.theme-dark .product-modal__buy:hover {
  background: rgba(201, 162, 39, 0.62) !important;
  border-color: rgba(212, 175, 55, 0.32) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

body.theme-dark .btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(212, 175, 55, 0.1);
}

body.theme-dark .btn--ghost:hover {
  background: rgba(201, 162, 39, 0.08);
  color: var(--text);
  border-color: rgba(212, 175, 55, 0.2);
}

body.theme-dark .collapsible {
  background: rgba(22, 18, 12, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--text);
}

body.theme-dark .collapsible:hover,
body.theme-dark .collapsible.active {
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(212, 175, 55, 0.2);
  color: #E8C547;
}

body.theme-dark .content {
  background: rgba(22, 18, 12, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.08);
  color: var(--text-muted);
}

body.theme-dark .guide-step {
  background: rgba(22, 18, 12, 0.6);
  border-color: rgba(212, 175, 55, 0.08);
}

body.theme-dark .guide-step__num {
  background: rgba(201, 162, 39, 0.2);
  color: #E8C547;
  border: 1px solid rgba(212, 175, 55, 0.2);
  -webkit-text-fill-color: #E8C547;
  background-clip: border-box;
  -webkit-background-clip: border-box;
  box-shadow: none;
}

body.theme-dark .guide-cta {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.08);
}

body.theme-dark .hero-card__badge {
  background: rgba(201, 162, 39, 0.1);
  color: #B8942E;
}

body.theme-dark .hero-card__text,
body.theme-dark .page-header__subtitle,
body.theme-dark .donate__notice-main {
  color: var(--text-muted);
}

body.theme-dark .page-content strong {
  color: var(--accent-text);
}

body.theme-dark .textstyle__link {
  background: linear-gradient(90deg, #B8942E, #D4AF37);
  -webkit-background-clip: text;
  background-clip: text;
}

body.theme-dark .section-label {
  color: #B8942E;
}

/* Product modal */
body.theme-dark .modals__item--product {
  background: var(--bg-card);
  border: 1px solid var(--surface-border);
}

body.theme-dark .product-modal__description {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(212, 175, 55, 0.1);
  color: var(--text-muted);
}

body.theme-dark .product-modal__label {
  color: #B8942E;
}

body.theme-dark .product-modal__price {
  color: var(--accent-text);
}

body.theme-dark .product-modal__image {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(212, 175, 55, 0.1);
}

body.theme-dark .product-detail__image,
body.theme-dark .product-detail__description {
  background: rgba(22, 18, 12, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--text-muted);
}

body.theme-dark .product-detail__price {
  color: var(--accent-text);
}

/* Modals */
body.theme-dark .modals.active {
  background-color: rgba(0, 0, 0, 0.75);
}

body.theme-dark .modals__item,
body.theme-dark .modals__cart {
  background: rgba(18, 15, 10, 0.96);
  border: 1px solid rgba(212, 175, 55, 0.12);
  color: var(--text);
}

body.theme-dark .modals__title {
  color: #B8942E;
}

body.theme-dark .modals__product {
  background: rgba(22, 18, 12, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.1);
}

body.theme-dark .modals__input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.1);
  color: var(--text);
}

body.theme-dark .modals__input::placeholder {
  color: rgba(255, 236, 200, 0.35);
}

body.theme-dark .modals__amount-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.12);
  color: var(--accent-text);
}

body.theme-dark .modals__amount-control:hover {
  background: rgba(201, 162, 39, 0.1);
}

body.theme-dark .modals__amount-result {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

body.theme-dark .modals__close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.1);
}

body.theme-dark .modals__close:hover {
  background: rgba(201, 162, 39, 0.1);
}

body.theme-dark .modals__close-line {
  background-color: rgba(255, 248, 230, 0.65);
}

body.theme-dark .modals [modal-item="buy"] {
  border-color: rgba(212, 175, 55, 0.14);
  box-shadow: var(--shadow-md);
}

html.theme-dark-pre body {
  background: #0a0907;
  color: rgba(255, 248, 230, 0.92);
}

html.theme-dark-pre .nav {
  background: rgba(10, 9, 7, 0.88);
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

body.theme-dark a,
body.theme-dark button,
body.theme-dark .nav__control-item,
body.theme-dark .nav__list-item,
body.theme-dark .donate__sidebar-item,
body.theme-dark .donate__products-item,
body.theme-dark .collapsible,
body.theme-dark .footer__up {
  transition-duration: 0.35s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 710px) {
  .footer__nav ._container {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
  }
  .footer__list {
    grid-column: 1 / -1;
    justify-self: center;
    order: 2;
    margin-top: 12px;
  }
  .footer__logo { order: 0; }
  .footer__up { order: 1; }
}
