/* ============================
   Общие настройки страницы
============================ */
body {
  margin: 0;
  background: #1b1c1d url('data:image/svg+xml;utf8,<svg width="30" height="30" xmlns="http://www.w3.org/2000/svg"><rect fill="%233c2b12" opacity="0.09" x="0" y="0" width="6" height="6"/><rect fill="%23dbc886" opacity="0.07" x="24" y="24" width="6" height="6"/></svg>');
  color: #e5e5e5;
  font-family: "Segoe UI", Arial, sans-serif;
  min-height: 100vh;
  min-width: 320px;
}
.container {
  max-width: 950px;
  margin: 0 auto;
  padding: 24px;
  margin-top: 45px;
}

.community-block {
  margin: 36px 0 24px 0;
  text-align: center;
}
.community-btns {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 16px 0;
  flex-wrap: wrap;
}
.community-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.08em;
  text-decoration: none;
  color: #fff;
  transition: background 0.15s, transform 0.12s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.09);
  margin-bottom: 8px;
}
.community-btn.discord { background: #5865F2; }
.community-btn.telegram { background: #229ED9; }
.community-btn.youtube { background: #FF0000; }
.community-btn:hover { filter: brightness(1.15); transform: translateY(-2px) scale(1.03);}
.community-btn .icon { display: flex; align-items: center; }
.community-btn svg { display: block; }
.community-desc { color: #bbb; margin-top: 8px; font-size: 0.98em; }
@media (max-width: 600px) {
  .community-btns { flex-direction: column; gap: 12px; }
}
/* ============================
   Хедер и навигация
============================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(27, 28, 29, 0.97);
  z-index: 9999;
  display: flex;
  align-items: center;
  padding: 45px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
/* Меню - позиционируем абсолютно по середине header */
nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 26px;
  align-items: center;
  font-weight: 600;
  font-size: 1.05em;
  color: #dbc886;
}
/* Ссылки меню */
nav a {
  color: inherit;
  text-decoration: none;
  user-select: none;
  cursor: pointer;
  padding: 5px 6px;
  font-weight: 600;
}
nav a.active,
nav a:hover {
  color: #ffd700;
}
.lang-switch {
  background: linear-gradient(112deg, #242623 80%, #dbc88622);
  color: #dbc886;
  border: 0;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: 16px;
  font-weight: 700;
  user-select: none;
  transition: background 0.3s, color 0.3s;
}
.lang-switch:hover:not([disabled]) {
  background: linear-gradient(112deg, #ffe581 80%, #fdca47 100%);
  color: #241a09;
}
.lang-switch[disabled] {
  background: #35301b;
  color: #bba055;
  cursor: default;
}
/* Мобильный адаптив для header */
@media (max-width: 768px) {
  header {
    padding: 20px 0;
  }
}
@media (max-width: 480px) {
  header {
    padding: 14px 0;
  }
}
@media (max-width: 768px) {
  nav {
    position: static;
    transform: none;
    justify-content: center;
    gap: 14px;
    margin-top: 8px;
  }
  .container {
    margin-top: 35px;
  }
}
@media (max-width: 540px) {
  nav {
    flex-wrap: wrap;
    gap: 10px;
  }
  .container {
    margin-top: 35px;
  }
}
/* ============================
   Секция HERO (заголовок, описание, картинка)
============================ */
.hero {
  margin: 42px 0 32px;
  text-align: center;
}
.hero-title {
  max-width: 650px;
  font-size: 2.6em;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffeb9b;
  text-shadow: 0 0 16px #ffe5814c, 0 8px 40px #18100070;
  margin: 0 auto 0.3em;
}
.hero-desc {
  max-width: 650px;
  font-size: 1.17em;
  margin: 0 auto 1em;
  color: #ede5d2cc;
}
.hero-img {
  margin-top: 32px;
  display: flex;
  justify-content: center;
}
.hero-glow-frame {
  display: inline-block;
  border-radius: 16px;
  padding: 7px;
  background: linear-gradient(132deg, #ffeb9b77 10%, #446 #323232 77%, #dbc88624 100%);
  box-shadow: 0 0 34px #ffe18b44, 0 1px 10px #332a13;
  border: 2.5px solid #dbc88655;
}
.hero-glow-frame img {
  border-radius: 13px;
  box-shadow: 0 0 32px #3b2b0888;
  max-width: 430px;
  width: 100%;
  height: auto;
  background: #222;
  display: block;
}
@media (max-width: 768px) {
  .hero-title { font-size: 1.55em; max-width: 90vw;}
  .hero-desc  { max-width: 90vw;}
  .hero-glow-frame img { max-width: 90vw;}
  .hero-img   { margin-top: 24px; }
}
@media (max-width: 540px) {
  .hero-glow-frame img { max-width: 95vw; }
}
/* ============================
   Основные заголовки h2
============================ */
h2 {
  font-size: 1.7em;
  color: #dbc886;
  margin-top: 40px;
  text-shadow: 0 0 8px #dbc88629;
  text-align: center;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}
/* ============================
   Новости и новостной блок
============================ */
#news-h, #news-teaser {
  text-align: center;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1em;
  color: #ddd;
  font-size: 1.05em;
  line-height: 1.5em;
}
.news-block {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
/* ============================
   Галерея и табы
============================ */
.gallery-tabs {
  display: flex;
  gap: 12px;
  margin: 16px 0 18px 0;
  justify-content: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.gallery-tab {
  background: linear-gradient(118deg, #232323 80%, #dbc88622);
  color: #dbc886;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  padding: 10px 26px;
  margin: 0 2px;
  font-size: 1.08em;
  box-shadow: 0 0 8px #2a220b33;
  cursor: pointer;
  transition: background 0.15s, color 0.13s;
}
.gallery-tab.active,
.gallery-tab:hover {
  background: linear-gradient(98deg, #dfc98c 89%, #323232 100%);
  color: #241a09;
}
.gallery-scroll {
  display: none;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  min-height: 90px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.gallery-scroll.shown {
  display: flex;
}
/* --- миниатюры, по умолчанию для desktop --- */
.gallery-scroll img {
  width: 220px;
  height: 124px;
  object-fit: cover;
  background: #222;
  border-radius: 9px;
  box-shadow: 0 0 14px #1a140533;
  margin: 7px 1px;
  cursor: pointer;
  transition: transform 0.13s, box-shadow 0.13s;
  border: 2.2px solid #232323;
}

/* ------------------------
   Мобильная сетка (до 640px)
------------------------- */
@media (max-width: 640px) {
  .gallery-scroll {
    padding-left: 4vw;
    padding-right: 4vw;
    gap: 8px;
    max-width: 100vw;
  }
  .gallery-scroll img {
    width: 35vw;
    height: 25vw;
    min-width: 90px;
    max-width: 100%;
    margin: 4px;
    border-radius: 7px;
  }
}
@media (max-width: 400px) {
  .gallery-scroll img {
    width: 28vw;
    height: 16vw;
    min-width: 60px;
  }
}
/* ============================
   Lightbox для галереи (универсальное решение для всех режимов)
============================ */
#gal-lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(26, 19, 7, 0.93);
  z-index: 222;
  cursor: pointer;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 130px 40px 50px 40px; /* top right bottom left */
  box-sizing: border-box;
}
#gal-lightimg {
  max-width: 70vw;
  max-height: calc(100vh - 130px - 50px);
  border-radius: 11px;
  border: 3px solid #dbc886;
  background: #000;
  box-shadow: 0 0 44px #dfc98c55;
  display: block;
  margin: 0 auto;
  user-select: none;
  pointer-events: none;
}
/* Стрелки: идеально центр с отступом от краев экрана */
.gal-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(49,42,23,0.18);
  border: 3px solid #dfc98c;
  color: #ffe189;
  font-size: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 234;
  box-shadow: 0 0 12px #20210777, 0 2px 20px #ffecaa88;
  transition: background 0.15s, border 0.17s;
  user-select: none;
  padding: 0;
  line-height: 1;
}
.gal-arrow.left { left: 38px; }
.gal-arrow.right { right: 38px; }
.gal-arrow span {
  display: inline-block;
  position: relative;
  top: -3px;
  font-family: inherit;
  line-height: 1;
}
.gal-arrow:hover {
  background: #ffe189cc;
  color: #2b2507;
}
/* Lightbox caption */
#gal-lightcap {
  margin-top: 16px;
  color: #dfc98c;
  font-size: 1.19em;
  text-shadow: 0 2px 8px #1a1100;
  background: rgba(26, 19, 7, 0.3);
  padding: 9px 22px;
  border-radius: 7px;
  pointer-events: none;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  margin-bottom: 10px;
}

/* --------- Медиаблоки для Lightbox/gal-arrow ------------- */
@media (max-width: 768px) and (orientation: portrait) {
  #gal-lightbox {
    padding: 100px 10px 30px 10px;
  }
  #gal-lightimg {
    max-width: 94vw;
    max-height: calc(100vh - 100px - 30px);
  }
  .gal-arrow {
    width: 36px; height: 36px; font-size: 1.4em;
  }
  .gal-arrow.left { left: 12px; }
  .gal-arrow.right { right: 12px; }
}
@media (max-width: 768px) and (orientation: landscape) {
  #gal-lightbox {
    padding: 50px 10px 20px 10px;
  }
  #gal-lightimg {
    max-width: 80vw;
    max-height: 70vh;
  }
  .gal-arrow {
    width: 34px; height: 34px; font-size: 1.2em;
  }
  .gal-arrow.left { left: 8px; }
  .gal-arrow.right { right: 8px; }
}
@media (max-width: 480px) and (orientation: portrait) {
  #gal-lightbox {
    padding: 70px 4vw 18px 4vw;
  }
  #gal-lightimg {
    max-width: 98vw;
    max-height: calc(100vh - 60px - 18px);
    border-radius: 9px;
  }
  .gal-arrow {
    width: 28px; height: 28px; font-size: 1em;
  }
}
@media (max-width: 480px) and (orientation: landscape) {
  #gal-lightbox {
    padding: 15px 4vw 12px 4vw;
  }
  #gal-lightimg {
    max-width: 96vw;
    max-height: 60vh;
    border-radius: 9px;
  }
  .gal-arrow {
    width: 24px; height: 24px; font-size: 0.8em;
  }
}
/* ============================
   FAQ
============================ */
#faq-h { margin-top: 40px; }
.faq-block {
  background: #232323;
  border-radius: 14px;
  padding: 22px 22px 6px 22px;
  margin: 32px 0 22px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: #ead1a0;
}
.faq-q {
  font-weight: 700;
  color: #dcc783;
  margin-top: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.faq-a {
  margin-top: 5px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
/* ============================
   About и Legal Блоки
============================ */
.about-block, .legal-block {
  margin-top: 34px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: #ddd;
  font-size: 1em;
  line-height: 1.5em;
}
/* ============================
   Donate Блок с исправлением ширины кнопок на мобилках
============================ */
.donate-block {
  max-width: 530px;
  margin: 54px auto 34px auto;
  background: linear-gradient(134deg, #232820 92%, #352d15 100%);
  border-radius: 20px;
  box-shadow: 0 0 36px #100a12, 0 1px 16px #23211f;
  padding: 32px 32px 28px 32px;
  text-align: center;
  border: 2px solid #876b29;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.donate-block::before {
  content: '';
  display: block;
  position: absolute;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
  left: 13%;
  top: -30px;
  width: 74%;
  height: 80px;
  background: linear-gradient(105deg, #ffe580 0%, #fffbe6 100%);
  filter: blur(23px);
  border-radius: 15px;
}
.donate-header {
  font-size: 1.42em;
  color: #fff4be;
  font-weight: 900;
  letter-spacing: 1px;
  text-shadow: 0 0 14px #ffd02f88, 0 2px 16px #c8a23352;
  margin-bottom: 3px;
}
.donate-desc {
  color: #bbb;
  font-size: 0.98em;
  margin: 7px 0 18px;
}
.donate-btns {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  z-index: 2;
  position: relative;
}
.donate-btn {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 1.14em;
  font-weight: 800;
  border: none;
  border-radius: 9px;
  padding: 13px 26px;
  text-decoration: none;
  color: #1a1a1a;
  box-shadow: 0 0 18px 0 #ffe77744, 0 2px 8px #130f08;
  background: linear-gradient(97deg, #ffecaa 86%, #fff1af 100%);
  transition: background 0.23s, color 0.17s, box-shadow 0.23s;
  outline: 2px solid #ffdd6c38;
  margin: 0 5px 5px 0;
  cursor: pointer;
  filter: drop-shadow(0 0 6px #f7d04b38);
  position: relative;
  z-index: 2;
}
.donate-btn span { font-size: 1.38em; }
.donate-btn:hover {
  background: linear-gradient(93deg, #fffbe6 90%, #fff0ce 100%);
  color: #d0930b;
  box-shadow: 0 0 32px #ffe6a177, 0 2px 12px #968039;
}
.donate-btn.paypal  { outline-color: #0070ba; }
.donate-btn.boosty  { outline-color: #ff5000; }
.donate-btn.kofi    { outline-color: #29abe0; }
.donate-btn.patreon { outline-color: #ff424d; }
/* Моб адаптив для donate */
@media (max-width: 540px) {
  .donate-btns {
    flex-direction: column;
    align-items: center;
  }
  .donate-btn {
    width: 100%;
    max-width: 360px;
    justify-content: center;
    padding: 13px 16px;
    margin: 0 0 12px 0;
  }
  .donate-block {
    padding: 16px 12px;
  }
}
/* ============================
   Footer
============================ */
footer {
  border-top: 1px solid #2a2a2a;
  margin-top: 40px;
  padding: 28px 0 12px;
  text-align: center;
  color: #888;
  background: #171818cc;
}
.tg-link {
  color: #43c4ff;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  margin: 0 auto;
}
.tg-link:hover {
  color: #6dd4ff;
  text-decoration: underline;
}