:root {
  --pvz-green: #54b948;
  --pvz-green-dark: #2d6b27;
  --pvz-brown: #5c4033;
  --pvz-brown-dark: #3d2b22;
  --pvz-wood: #8b4513;
  --pvz-wood-light: #a0522d;
  --pvz-stone: #7a7a7a;
  --pvz-stone-dark: #4a4a4a;
  --pvz-yellow: #ffde00;
  --pvz-red: #8b0000;
  --pvz-blood: #af0000;
  --pvz-blood-bright: #ff0000;
  --pvz-text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
  --wood-texture: url('https://www.transparenttextures.com/patterns/wood-pattern.png');
  --stone-texture: url('https://www.transparenttextures.com/patterns/rock.png');
  --paper-texture: url('https://www.transparenttextures.com/patterns/papyros.png');
}

.LuckiestGuy {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #000;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  user-select: none;
}

body.in-game {
  overflow: hidden;
  height: 100vh;
}

[hidden] {
  display: none !important;
}

/* Общие эффекты */
.dark-horror {
  background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%) !important;
  position: relative;
}

.dark-horror::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 200px rgba(0,0,0,1);
  pointer-events: none;
  z-index: 100;
}

.blood-overlay {
  position: absolute;
  inset: 0;
  background-image: url('https://www.transparenttextures.com/patterns/blood-splatter.png');
  opacity: 0.25;
  pointer-events: none;
  z-index: 5;
  filter: sepia(1) saturate(10) hue-rotate(-50deg);
  mix-blend-mode: multiply;
}

.fog-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.4) 70%, rgba(0,0,0,0.8) 100%);
  pointer-events: none;
  z-index: 6;
}

.dirt-overlay {
  position: absolute;
  inset: 0;
  background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
  opacity: 0.2;
  pointer-events: none;
}

/* Landing Page */
.landing {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 5vh;
  gap: 40px;
  z-index: 110;
  position: relative;
  background: #000 url('../CONTENT/Menu buttons/MainArt.jpg') no-repeat center center;
  background-size: auto 100%;
  overflow: hidden;
}

/* Новая структура меню */
.menu-page {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background: 
    radial-gradient(circle at center, rgba(26, 43, 20, 0.7) 0%, rgba(5, 8, 4, 0.9) 100%),
    url('../CONTENT/Menu buttons/menu_bg.jpg') repeat;
  background-size: auto, 600px; /* Размер паттерна можно подстроить */
  position: relative;
  overflow-y: auto;
  padding: 40px 20px;
  z-index: 110;
}

/* Стили для новых кнопок-картинок */
.menu-image-btn {
  background: none !important;
  border: none !important;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  box-shadow: none !important;
}

.menu-image-btn img {
  width: 240px; /* Уменьшено для компактности */
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

#achievements-button img {
  width: 207px; /* Уменьшено еще на 4% от 216px (итого ~14% от оригинала) */
}

#for-streamers-button img {
  width: 216px; /* Уменьшено еще на 3% от 223px (итого ~10% от оригинала) */
}

.landing .menu-image-btn img {
  width: 320px; /* На лендинге оставляем большие */
}

.menu-image-btn:hover {
  transform: scale(1.05) rotate(1deg);
  filter: brightness(1.1);
}

.menu-image-btn:active {
  transform: scale(0.95) translateY(2px) !important;
  filter: brightness(0.9);
}

.menu-image-btn.mini img {
  width: 180px; /* Размер для маленьких кнопок (почта, донат) */
}

.main-actions-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin-top: -150px; /* Слегка опустили (было -180px) */
}

.menu-logo {
  width: 400px;
  max-width: 100%; /* Добавили ограничение */
  height: auto;
  margin-top: 60px; /* Слегка увеличили отступ сверху (было 40px) */
  margin-bottom: 0px; 
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

.top-right-auth {
  position: absolute;
  top: 40px; /* Сместили ниже (было 20px) */
  right: 40px; /* Сместили левее (было 20px) */
  text-align: center; /* Центрируем текст внутри блока */
  z-index: 150;
  font-family: 'Roboto Condensed', sans-serif;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center; /* Центрируем элементы flex-контейнера */
}

.auth-info-pvz {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center; /* Центрируем содержимое внутри строки */
  gap: 10px;
}

.login-link-pvz {
  background: none;
  border: none;
  color: #fff; /* Изменили с желтого на белый */
  text-decoration: none; 
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, color 0.1s;
  margin-top: 5px;
}

.login-link-pvz:hover {
  color: var(--pvz-yellow); /* Возвращаем желтый при наведении для фидбека */
  transform: scale(1.05);
}

.top-right-auth small {
  display: block;
  font-size: 12px;
  opacity: 0.8;
  color: #ccc;
  margin-top: 4px;
}

.top-right-auth .login-link-pvz {
  display: block;
  margin-top: 5px;
}

.mini-btns-row-image {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 0px;
}

.menu-image-btn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.menu-image-btn:active {
  transform: scale(0.95) translateY(2px) !important;
}


.landing-status {
  position: absolute;
  bottom: 20px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 24px;
  color: var(--pvz-yellow);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

/* Стили полосы загрузки */
.landing-loader {
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.loader-bar {
  width: 100%;
  height: 30px;
  background: #2d1b13 var(--wood-texture);
  background-blend-mode: multiply;
  border: 4px solid #1f120c;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 2px 5px rgba(0,0,0,0.5);
  position: relative;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to bottom, #54b948, #2d6b27);
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.3);
  transition: width 0.3s ease;
  position: relative;
}

.loader-fill::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 75%, transparent 75%, transparent);
  background-size: 40px 40px;
  animation: loader-stripes 1s linear infinite;
}

@keyframes loader-stripes {
  from { background-position: 0 0; }
  to { background-position: 40px 0; }
}

.loader-text {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 20px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 2px;
}


.menu-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 10% 10%, #fff 100%, transparent),
    radial-gradient(1px 1px at 20% 30%, #fff 100%, transparent),
    radial-gradient(2px 2px at 40% 70%, #fff 100%, transparent),
    radial-gradient(1px 1px at 60% 20%, #fff 100%, transparent),
    radial-gradient(2px 2px at 80% 50%, #fff 100%, transparent);
  background-size: 200px 200px;
  opacity: 0.1;
  animation: dust-drift 60s linear infinite;
  pointer-events: none;
}

@keyframes dust-drift {
  from { background-position: 0 0; }
  to { background-position: 200px 400px; }
}

.menu-wrapper {
  width: 100%;
  max-width: 1400px; /* Увеличили с 1200px */
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 10;
}

.menu-columns {
  display: grid;
  grid-template-columns: 1.6fr 1.2fr 1.6fr; /* Сделали боковые колонки шире (было 1fr 1.2fr 1fr) */
  gap: 40px; /* Увеличили зазор (было 30px) */
  align-items: start;
}

.menu-side-column {
  padding-top: 40px; /* Еще больше приподняли надгробия */
}

@media (max-width: 900px) {
  .menu-page {
    align-items: flex-start;
    padding-top: 0px; 
    padding-bottom: 20px;
    overflow-y: scroll; /* Force scroll visibility */
  }
  .top-right-auth {
    position: static;
    margin-top: -10px; /* Подняли еще выше */
    margin-bottom: 5px;
    top: auto;
    right: auto;
    width: 100%;
  }
  .main-actions-container {
    margin-top: -10px; /* Подняли весь блок выше */
    gap: 0px; 
  }
  .menu-logo {
    margin-top: -10px !important;
    margin-bottom: -15px !important; 
    width: 300px; 
  }
  .wood-menu-panel {
    padding: 20px 15px;
  }
  .wood-plank.primary {
    font-size: 32px;
    padding: 20px;
  }
  .menu-columns {
    grid-template-columns: 1fr;
    max-width: 550px;
    margin: 0 auto;
    gap: 20px;
  }
  .menu-center-column { order: -1; }
  .char-float, .char-float-delayed { display: none; }
  .menu-image-btn img {
    width: 240px;
  }
  .menu-image-btn.mini img {
    width: 140px;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .menu-columns {
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 15px;
  }
  .menu-wrapper {
    max-width: 95%;
  }
}

/* Панели */
.wood-menu-panel {
  background: #3d2b22 var(--wood-texture);
  border: 10px solid #1f120c;
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: 
    0 20px 0 #1f120c, 
    0 35px 70px rgba(0,0,0,0.8),
    inset 0 0 60px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

/* Заклепки на дереве */
.wood-menu-panel::before {
  content: "";
  position: absolute;
  top: 15px; left: 15px; bottom: 15px; right: 15px;
  border: 2px solid rgba(0,0,0,0.3);
  border-radius: 10px;
  pointer-events: none;
  z-index: 1;
}

.wood-menu-panel::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(circle at 20px 20px, #111 2px, #333 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 20px) 20px, #111 2px, #333 4px, transparent 5px),
    radial-gradient(circle at 20px calc(100% - 20px), #111 2px, #333 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 20px) calc(100% - 20px), #111 2px, #333 4px, transparent 5px);
  opacity: 0.8;
  pointer-events: none;
}

.wood-plank {
  background: #a0522d var(--wood-texture);
  border: 4px solid #3d2b22;
  padding: 18px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 26px;
  color: #fff;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.3);
  box-shadow: 
    inset 0 4px 0 rgba(255,255,255,0.2), 
    inset 0 -4px 10px rgba(0,0,0,0.3),
    0 8px 0 #1f120c,
    0 15px 25px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: center;
  position: relative;
  overflow: hidden;
  background-blend-mode: multiply;
}

.wood-plank::before {
  content: "";
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
  transform: skewX(-25deg);
  transition: 0.5s;
}

.wood-plank:hover::before {
  left: 150%;
}

.wood-plank:hover {
  transform: scale(1.04) translateY(-3px);
  filter: brightness(1.15);
  box-shadow: 
    inset 0 4px 0 rgba(255,255,255,0.3), 
    0 12px 0 #1f120c,
    0 20px 35px rgba(0,0,0,0.6);
}

.wood-plank:active {
  transform: translateY(6px);
  box-shadow: 0 2px 0 #1f120c;
  filter: brightness(0.9);
}

.wood-plank.primary {
  background: linear-gradient(#54b948, #2d6b27);
  border: 6px solid #1a3d16;
  font-size: 48px;
  padding: 0; /* Убрали паддинг для точного центрирования через flex */
  text-shadow: 3px 3px 0 #1a3d16, 0 0 15px rgba(0,0,0,0.5);
  box-shadow: 
    inset 0 6px 0 rgba(255,255,255,0.3), 
    0 12px 0 #142b10,
    0 25px 50px rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Кнопка "МЕНЮ" во время игры */
.game-menu-btn {
  width: 160px;
  height: 70px;
  font-size: 28px;
}

.muted-btn {
  opacity: 0.5;
  filter: grayscale(0.6) brightness(0.7);
  pointer-events: none !important;
  cursor: default !important;
  box-shadow: none !important;
  transform: none !important;
}

.bloody-text {
  color: var(--pvz-yellow);
  animation: bloody-glow 2s infinite;
}

@keyframes bloody-glow {
  0%, 100% { text-shadow: 3px 3px 0 #1a3d16, 0 0 10px rgba(255,0,0,0); }
  50% { text-shadow: 3px 3px 0 #1a3d16, 0 0 20px rgba(255,0,0,0.8); color: #ffeb3b; }
}

/* Могилы */
.grave-stone {
  background: #7a7a7a var(--stone-texture);
  border: 7px solid #4a4a4a;
  border-radius: 50% 50% 15px 15px / 25% 25% 15px 15px;
  padding: 50px 25px 30px;
  box-shadow: 
    0 15px 0 #333, 
    0 25px 50px rgba(0,0,0,0.7),
    inset 0 10px 30px rgba(0,0,0,0.3);
  text-align: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

/* Трещины на камне */
.grave-stone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
}

/* .grave-stone::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: rgba(0,0,0,0.3);
  mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 10 L60 40 L90 50 L60 60 L50 90 L40 60 L10 50 L40 40 Z" fill="black"/></svg>');
  mask-size: contain;
  mask-repeat: no-repeat;
  opacity: 0.4;
  filter: drop-shadow(0 0 5px rgba(255,255,255,0.1));
} */

.grave-stone:hover { 
  filter: brightness(1.05);
}

.grave-header {
  font-family: 'Creepster', cursive;
  font-size: 32px; /* Вернули 32px */
  color: #2a2a2a;
  margin-bottom: 15px;
  border-bottom: 2px solid rgba(0,0,0,0.2);
  padding-bottom: 5px;
  text-shadow: 
    -1px -1px 1px rgba(0,0,0,0.5), 
    1px 1px 1px rgba(255,255,255,0.2);
  letter-spacing: 2px;
  width: 100%;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.news-block, .social-block {
  border: none !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  box-shadow: none !important;
  min-height: 550px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.news-block {
  background: url('../CONTENT/Menu buttons/plate_left.webp?v=1') no-repeat center !important;
  background-size: 100% 100% !important;
  padding: 80px 87px 40px 40px !important;
}

.social-block {
  background: url('../CONTENT/Menu buttons/plate_right.webp?v=1') no-repeat center !important;
  background-size: 100% 100% !important;
  padding: 80px 105px 40px 80px !important;
}

.news-block .donations-list-pvz,
.social-block .social-links-pvz {
  width: 100%;
  max-width: 300px;
  transform: none !important;
  margin: 0 auto;
}

.pvz-input {
  background: rgba(0,0,0,0.2);
  border: 3px solid #4a4a4a;
  border-radius: 10px;
  padding: 15px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 24px;
  color: var(--pvz-yellow);
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
  outline: none;
}

.pvz-input:focus {
  border-color: var(--pvz-yellow);
  box-shadow: 0 0 15px rgba(255, 222, 0, 0.3);
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.payment-subtitle {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 16px;
  color: #3d2b22;
  margin: 10px 0 5px 0;
  text-align: left;
  border-bottom: 2px solid #3d2b22;
  padding-bottom: 3px;
}

.payment-btn {
  font-size: 18px !important;
  padding: 12px !important;
}

.almanac-payment-btn {
  background: #2d1b13;
  color: var(--pvz-yellow);
  border: 2px solid #1f120c;
  width: 100%;
  padding: 15px !important;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 18px;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 0 #1f120c;
  transition: all 0.1s;
  text-shadow: 1px 1px 0 #000;
  text-transform: uppercase;
  display: block;
}

.almanac-payment-btn:hover {
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1f120c;
}

.almanac-payment-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.social-links-pvz {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.highlight-yellow { color: #ffeb3b; text-shadow: 1px 1px 0 #000; }

.pvz-small-btn {
  background: #3d2b22 var(--wood-texture);
  color: #fff;
  border: 3px solid #1f120c;
  padding: 10px 20px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 0 #1f120c;
  transition: all 0.1s;
}

.pvz-small-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
  box-shadow: 0 6px 0 #1f120c;
}

.pvz-small-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #1f120c;
}

.news-list-pvz, .donations-list-pvz {
  background: #f4e4bc var(--paper-texture);
  padding: 15px;
  border-radius: 5px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
  border: 1px solid #d4c49c;
  min-height: 100px;
}

.donations-list-pvz {
  max-height: 270px;
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: #8b7355 transparent;
}

.donations-list-pvz::-webkit-scrollbar {
  width: 6px;
}

.donations-list-pvz::-webkit-scrollbar-thumb {
  background-color: #8b7355;
  border-radius: 10px;
}

.donation-item-pvz {
  color: #3d2b22;
  text-align: left;
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  padding-bottom: 8px;
}

.donation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  font-weight: bold;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 16px;
  margin-bottom: 4px;
}

.donation-name {
  color: #c62828;
  word-break: break-word;
}

.donation-amount {
  color: #2e7d32;
  white-space: nowrap;
  flex-shrink: 0;
}

.donation-message {
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  font-size: 13px;
  line-height: 1.3;
  font-style: italic;
  word-wrap: break-word;
}

.donate-info-text {
  font-size: 14px;
  color: #4caf50;
  margin: 10px 0;
  font-weight: bold;
  text-align: center;
}

.donate-inputs-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.donate-input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.donate-input-group label {
  font-size: 14px;
  color: #3d2b22;
  font-weight: bold;
}

.news-item {
  color: #3d2b22;
  text-align: left;
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  font-size: 14px;
}

.news-item:last-child {
  border-bottom: none;
}

.stone-btn-small {
  background: #4a4a4a var(--stone-texture);
  border: 3px solid #333;
  color: var(--pvz-yellow);
  padding: 10px 20px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 16px;
  cursor: pointer;
  border-radius: 10px;
  box-shadow: 
    0 5px 0 #222, 
    0 10px 20px rgba(0,0,0,0.6),
    inset 0 2px 5px rgba(255,255,255,0.1);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-shadow: 1px 1px 0 #000;
}

.stone-btn-small:hover {
  transform: translateY(-3px) scale(1.02);
  background-color: #555;
  box-shadow: 
    0 7px 0 #222, 
    0 12px 25px rgba(0,0,0,0.7);
}

.stone-btn-small:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #222;
}

.almanac-btn-small {
  background: #2d1b13; /* Темное дерево как рамка */
  color: var(--pvz-yellow);
  border: 2px solid #1f120c;
  padding: 8px 16px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 3px 0 #1f120c;
  transition: all 0.1s;
  font-size: 14px;
}

.wide-almanac {
  width: 100%;
  margin-bottom: 8px;
  font-size: 16px;
  padding: 12px;
}

.pulse-red-almanac {
  background: #4a1c1c;
  border-color: #2d1111;
  box-shadow: 0 3px 0 #2d1111;
  animation: pulse-red-almanac 1.5s infinite;
}

@keyframes pulse-red-almanac {
  0% { box-shadow: 0 3px 0 #2d1111, 0 0 0 rgba(255, 0, 0, 0); }
  50% { box-shadow: 0 3px 0 #2d1111, 0 0 15px rgba(255, 0, 0, 0.5); filter: brightness(1.3); }
  100% { box-shadow: 0 3px 0 #2d1111, 0 0 0 rgba(255, 0, 0, 0); }
}

.almanac-btn-small:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.almanac-btn-small:active {
  transform: translateY(2px);
  box-shadow: none;
}

.stone-link-btn {
  background: #2d1b13;
  border: 3px solid #1f120c;
  color: var(--pvz-yellow);
  width: 100%;
  padding: 15px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 20px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: 0 4px 0 #1f120c;
  transition: all 0.1s;
  text-shadow: 1px 1px 0 #000;
  border-radius: 10px;
}

.stone-link-btn:hover { 
  filter: brightness(1.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #1f120c;
}

.stone-link-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #1f120c;
}

.stone-link-mini {
  background: #2d1b13;
  border: 2px solid #1f120c;
  color: #fff;
  padding: 8px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  cursor: pointer;
  box-shadow: 0 3px 0 #1f120c;
  transition: all 0.1s;
  border-radius: 6px;
}

.stone-link-mini:hover {
  color: var(--pvz-yellow);
  filter: brightness(1.2);
  transform: scale(1.05);
}

.stone-link-mini:active {
  transform: translateY(2px);
  box-shadow: none;
}

.start-game-btn {
  font-size: 48px !important;
  padding: 30px 60px !important;
  background: linear-gradient(#ffde00, #ff9900) !important;
  color: #3d2b22 !important;
  text-shadow: 2px 2px 0 rgba(255,255,255,0.4) !important;
  border: 8px solid #3d2b22 !important;
  box-shadow: 0 15px 0 #1f120c, 0 25px 50px rgba(0,0,0,0.6) !important;
}

.start-game-btn:hover {
  transform: scale(1.05) rotate(1deg) !important;
  filter: brightness(1.2);
}

.start-game-btn:active {
  transform: translateY(10px) !important;
  box-shadow: 0 5px 0 #1f120c !important;
}

.pulse-pvz {
  animation: pulse-pvz 1.5s infinite;
}

/* Фоновое свечение для кнопки на лендинге */
.btn-landing-glow {
  position: relative;
  z-index: 1;
}

.btn-landing-glow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180%;
  height: 180%;
  background: radial-gradient(circle, rgba(255, 222, 0, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: landing-button-glow 2.5s infinite ease-in-out;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(10px);
}

@keyframes landing-button-glow {
  0%, 100% { 
    opacity: 0.4; 
    transform: translate(-50%, -50%) scale(0.8); 
  }
  50% { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1.2); 
  }
}

@keyframes pulse-pvz {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 222, 0, 0.6); }
  100% { transform: scale(1); }
}

/* Стримерам и прочее */
.mini-btns-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.mini-btn { 
  font-size: 20px !important; 
  padding: 10px !important;
}

/* Видео кнопка */
.menu-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  perspective: 1000px;
  position: relative;
}

.footer-panel-unified {
  display: flex;
  align-items: center;
  background: #2d1e16 var(--wood-texture);
  background-blend-mode: multiply;
  border: 5px solid #1a100a;
  border-radius: 20px;
  padding: 20px 40px;
  gap: 50px;
  box-shadow: 
    inset 0 4px 15px rgba(0,0,0,0.6),
    0 15px 35px rgba(0,0,0,0.8);
  position: relative;
}

.online-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 200px;
}

.stat-label {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 16px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  opacity: 0.8;
  margin-bottom: 5px;
}

#online-count {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 42px;
  color: #ffff00;
  text-shadow: 4px 4px 0 #000;
  line-height: 1;
}

.footer-divider {
  width: 4px;
  height: 80px;
  background: #1a100a;
  border-radius: 2px;
  box-shadow: 1px 1px 0 rgba(255,255,255,0.05);
}

.video-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.promo-title {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 22px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

#how-made-button {
  padding: 8px 20px;
  font-size: 15px;
  border-width: 3px;
  min-width: 150px;
}

.menu-footer::before {
  content: "";
  position: absolute;
  top: -20px; left: 50%; transform: translateX(-50%);
  width: 80%; height: 2px;
  background: radial-gradient(circle, rgba(255,0,0,0.3), transparent);
}

.wide-stone {
  width: 100%;
  max-width: 450px;
}

.stone-btn {
  background: #a0522d var(--wood-texture);
  border: 5px solid #3d2b22;
  color: #fff;
  padding: 20px 40px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 28px;
  cursor: pointer;
  border-radius: 15px;
  box-shadow: 
    inset 0 4px 0 rgba(255,255,255,0.2), 
    inset 0 -4px 10px rgba(0,0,0,0.3),
    0 10px 0 #1f120c,
    0 20px 40px rgba(0,0,0,0.8);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s;
  text-shadow: 2px 2px 0 #000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-blend-mode: multiply;
}

.stone-btn:hover {
  transform: scale(1.05) rotate(1deg);
  filter: brightness(1.15);
  box-shadow: 
    inset 0 4px 0 rgba(255,255,255,0.3), 
    0 15px 0 #1f120c, 
    0 25px 50px rgba(0,0,0,0.9);
}

.stone-btn:active {
  transform: scale(0.95) translateY(8px) !important;
  box-shadow: 0 2px 0 #1f120c;
  filter: brightness(0.9);
}

.pulse-red { 
  background: #c0392b var(--wood-texture);
  border-color: #7f1d1d;
  animation: pulse-red 2s infinite; 
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 10px 0 #7f1d1d, 0 0 0 rgba(255,0,0,0); }
  50% { box-shadow: 0 10px 0 #7f1d1d, 0 0 30px rgba(255,0,0,0.5); filter: brightness(1.2); }
}

/* Альманах и Достижения (из старого стиля, почищено) */
.panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  height: 90vh;
  max-width: 1200px;
  max-height: 800px;
  background: #4a3429 url('https://www.transparenttextures.com/patterns/leather.png');
  border: 12px solid #2d1b13;
  border-radius: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 100px rgba(0,0,0,0.9);
}

.panel-header {
  padding: 10px 20px;
  background: #2d1b13;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 4px solid #1f120c;
  flex-shrink: 0;
}

.panel-header h2 {
  margin: 0;
  color: var(--pvz-yellow);
  font-size: 28px;
  text-shadow: 2px 2px 0 #000;
}

.panel-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #3d2b22;
  display: flex;
  flex-direction: column;
}

.panel-content.full-height {
  height: 100%;
}

.panel-content.scrollable {
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: #8b7355 transparent;
}

/* Достижения */
.achievement-entry {
  background: #5d4037;
  border: 4px solid #2d1b13;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform 0.2s;
}

.achievement-entry:hover {
  transform: scale(1.02);
  background: #6d4c41;
}

.achievement-icon {
  width: 60px;
  height: 60px;
  background: #2d1b13;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.achievement-info {
  flex: 1;
}

.achievement-info h3 {
  margin: 0 0 5px 0;
  color: #ffeb3b;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 24px;
}

.achievement-info p {
  margin: 0;
  color: #d7ccc8;
  font-size: 16px;
}

.achievement-status {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
}

.achievement-status.unlocked {
  background: #4caf50;
  color: white;
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.achievement-status.locked {
  background: #757575;
  color: #bdbdbd;
}

/* Адаптив для панелей */
@media (max-width: 900px) {
  .panel {
    top: 0;
    left: 0;
    transform: none;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-width: 6px;
    border-radius: 0;
  }
}

/* Альманах */
.almanac-layout {
  display: flex;
  flex: 1;
  background: #3d2b22;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMyYjFiMTUiIGZpbGwtb3BhY2l0eT0iMC40Ij48cGF0aCBkPSJNMCAwaDIwdjIwSDB6bTIwIDIwaDIwdjIwSDIweiIvPjwvZz48L2c+PC9zdmc+');
  overflow: hidden;
  position: relative;
}

.almanac-tabs-side {
  width: 90px;
  background: #1a0f0a;
  background-image: linear-gradient(to right, rgba(0,0,0,0.5) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.5) 100%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 40px 0;
  border-right: 5px solid #000;
  z-index: 100;
  flex-shrink: 0;
  box-shadow: inset -5px 0 15px rgba(0,0,0,0.5);
}

.almanac-tab-side {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 20px 12px;
  background: linear-gradient(to left, #3d2b22, #5d4037);
  color: #a1887f;
  border: 2px solid #000;
  border-right: none;
  border-radius: 15px 0 0 15px;
  cursor: pointer;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 16px;
  transition: all 0.2s ease;
  text-align: center;
  box-shadow: -4px 4px 8px rgba(0,0,0,0.4);
  margin-left: 10px;
  user-select: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.almanac-tab-side span {
  transform: rotate(180deg);
}

.almanac-tab-side.active {
  background: linear-gradient(to right, #fbc02d, #ffeb3b);
  color: #3e2723;
  width: 100px;
  margin-left: -10px;
  font-size: 18px;
  box-shadow: 10px 10px 20px rgba(0,0,0,0.5);
  border-right: 5px solid #f57f17;
  border-left: none;
  text-shadow: 0 1px 2px rgba(255,255,255,0.5);
  letter-spacing: 2px;
}

.almanac-tab-side:hover:not(.active) {
  background: #795548;
  color: #fff;
  transform: translateX(-5px);
}

.almanac-book {
  flex: 1;
  display: flex;
  background: #f4e4bc; /* Warm parchment */
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, rgba(0,0,0,0) 100%),
    url('https://www.transparenttextures.com/patterns/papyros.png');
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.1);
}

.almanac-book::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(to right, 
    rgba(0,0,0,0) 0%, 
    rgba(0,0,0,0.1) 40%, 
    rgba(0,0,0,0.2) 50%, 
    rgba(0,0,0,0.1) 60%, 
    rgba(0,0,0,0) 100%);
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.almanac-page {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: #8b7355 transparent;
}

.almanac-page::-webkit-scrollbar {
  width: 6px;
}

.almanac-page::-webkit-scrollbar-thumb {
  background-color: #8b7355;
  background-image: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
  border-radius: 10px;
  border: 1px solid #5d4037;
}

.almanac-page-left {
  border-right: 1px solid rgba(0,0,0,0.1);
  padding-right: 20px;
}

.almanac-page-right {
  padding-left: 50px;
}

.almanac-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 5px;
}

.almanac-search-container {
  padding: 0 10px 20px 10px;
}

#almanac-search {
  width: 100%;
  padding: 12px 15px;
  border: 3px solid #8b7355;
  border-radius: 12px;
  background: rgba(255,255,255,0.7);
  background-image: linear-gradient(rgba(0,0,0,0.05) 0%, transparent 10%, transparent 90%, rgba(0,0,0,0.05) 100%);
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  color: #3d2b22;
  font-size: 16px;
  outline: none;
  transition: all 0.2s;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255,0.5);
}

#almanac-search:focus {
  background: #fff;
  border-color: #ffc107;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

#almanac-search::placeholder {
  color: rgba(139, 115, 85, 0.6);
}

.almanac-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: #d32f2f;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.2s;
  z-index: 1000;
}

.almanac-close-btn:hover {
  background: #b71c1c;
  transform: scale(1.1) rotate(90deg);
}

.almanac-card-mini {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.4);
  border: 2px solid #c9ba9b;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  background-image: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 100%);
}

.almanac-card-mini:hover {
  background: rgba(255,255,255,0.7);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 15px rgba(0,0,0,0.2);
  border-color: #8b7355;
  z-index: 5;
}

.almanac-card-mini.active {
  background: #fff;
  border-color: #ffc107;
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
  transform: scale(1.1);
  z-index: 10;
}

.almanac-card-mini img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
}

.almanac-unit-header {
  margin-bottom: 25px;
  text-align: center;
  border-bottom: 2px dashed rgba(61, 43, 34, 0.2);
  padding-bottom: 15px;
}

.almanac-unit-name {
  font-size: 32px;
  color: #3d2b22;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 rgba(255,255,255,0.8), 1px 1px 10px rgba(0,0,0,0.1);
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
}

.almanac-unit-prototype {
  font-size: 16px;
  color: #795548;
  font-style: italic;
  margin-top: 5px;
  font-weight: 500;
  opacity: 0.8;
}

.almanac-preview-container {
  background: rgba(255,255,255,0.5);
  background-image: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
  border-radius: 25px;
  height: 35vh;
  max-height: 300px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  border: 2px solid rgba(139, 115, 85, 0.2);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.08);
  flex-shrink: 0;
}

.almanac-preview-container .unit-preview {
  height: 90%;
  width: auto;
  filter: drop-shadow(0 15px 15px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

.almanac-preview-container:hover .unit-preview {
  transform: scale(1.1);
}

.almanac-stats-container {
  background: rgba(139, 115, 85, 0.15);
  border-radius: 15px;
  padding: 15px 20px;
  margin-bottom: 25px;
  border: 2px solid rgba(139, 115, 85, 0.3);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.almanac-stat-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(139, 115, 85, 0.2);
}

.almanac-stat-row:last-child {
  border-bottom: none;
}

.almanac-stat-label {
  color: #5d4037;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.almanac-stat-value {
  color: #2e7d32;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 18px;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
  line-height: 1.3;
}

.almanac-unit-desc {
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  line-height: 1.6;
  color: #4e342e;
  font-size: 17px;
  font-style: italic;
  background: rgba(255,255,255,0.4);
  padding: 20px 25px;
  border-radius: 15px;
  border-left: 6px solid #8d6e63;
  position: relative;
  box-shadow: 2px 2px 15px rgba(0,0,0,0.05);
  margin-bottom: 25px;
}

.almanac-unit-desc::before {
  content: '“';
  position: absolute;
  top: -10px;
  left: 10px;
  font-size: 40px;
  color: rgba(141, 110, 99, 0.3);
  font-family: serif;
}

/* Boss Styling */
.almanac-card-mini.boss-card {
  border-color: #f44336;
  background: rgba(244, 67, 54, 0.1);
}

.almanac-card-mini.boss-card.active {
  box-shadow: 0 0 20px rgba(244, 67, 54, 0.6);
  border-color: #f44336;
}

.boss-header .almanac-unit-name {
  color: #b71c1c;
}

.almanac-boss-badge {
  background: #b71c1c;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 14px;
  display: inline-block;
  margin-top: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  animation: pulse-boss 2s infinite;
}

@keyframes pulse-boss {
  0% { transform: scale(1); box-shadow: 0 4px 8px rgba(183, 28, 28, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 4px 15px rgba(183, 28, 28, 0.8); }
  100% { transform: scale(1); box-shadow: 0 4px 8px rgba(183, 28, 28, 0.4); }
}

.boss-preview {
  background: radial-gradient(circle, rgba(244, 67, 54, 0.2) 0%, rgba(244, 67, 54, 0) 70%) !important;
  border-color: rgba(244, 67, 54, 0.3) !important;
}

.boss-preview .unit-preview {
  height: 160% !important; /* Увеличиваем визуально в Альманахе */
  transform: translateY(-35%) !important;
}

.boss-preview .unit-preview.pepefa-preview {
  height: 125% !important;
  transform: translateY(-15%) !important;
}

.boss-preview:hover .unit-preview {
  transform: translateY(-35%) scale(1.05) !important;
}

.boss-preview:hover .unit-preview.pepefa-preview {
  transform: translateY(-15%) scale(1.05) !important;
}

.almanac-back-to-list {
  display: none;
  width: 100%;
  padding: 15px;
  background: #8b7355;
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 18px;
  margin-top: 20px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .almanac-back-to-list {
    display: block;
  }
}

.almanac-threat {
  color: #c62828;
  font-weight: bold;
  letter-spacing: 3px;
  font-size: 20px;
}

@media (max-width: 900px) {
  .almanac-layout {
    flex-direction: column;
    border-width: 4px;
    height: 100%;
  }
  .almanac-tabs-side {
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 10px;
    justify-content: center;
    border-right: none;
    border-bottom: 4px solid #000;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
  }
  .almanac-tab-side {
    writing-mode: horizontal-tb;
    border-radius: 10px 10px 10px 10px;
    flex: 1;
    margin: 0 5px;
    padding: 12px 5px;
    transform: none;
    letter-spacing: normal;
    background: linear-gradient(to bottom, #3d2b22, #5d4037);
  }
  .almanac-tab-side span {
    transform: none;
  }
  .almanac-tab-side.active {
    width: auto;
    margin-left: 0;
    transform: translateY(-5px);
    border-right: 2px solid #000;
    border-bottom: 5px solid #f57f17;
  }
  .almanac-book {
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
  }
  .almanac-book::before {
    display: none;
  }
  .almanac-page {
    overflow-y: visible;
    padding: 20px;
    flex: none;
  }
  .almanac-page-left {
    border-right: none;
    border-bottom: 2px dashed rgba(0,0,0,0.1);
  }
  .almanac-page-right {
    padding-left: 20px;
  }
}

/* Модалки */
.svz-alert-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.svz-alert-content {
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.svz-alert-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.svz-alert-message {
  color: #3d2b22;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  line-height: 1.4;
}

@keyframes modalPop {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-pvz {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content-pvz {
  max-width: 500px;
  width: 95%;
  max-height: 90vh; /* Ограничиваем по высоте */
  background: #7a7a7a var(--stone-texture);
  border: 10px solid #4a4a4a;
  border-radius: 40px 40px 15px 15px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 50px rgba(0,0,0,1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.almanac-style-modal {
  background: #f4e4bc var(--paper-texture) !important;
  border: 12px solid #2d1b13 !important;
  border-radius: 20px !important;
  padding: 0;
  color: #3d2b22 !important;
  display: flex;
  flex-direction: column;
}

.almanac-panel-header {
  padding: 15px;
  background: #2d1b13;
  width: 100%;
  text-align: center;
  position: relative; /* Для позиционирования крестика */
}

.modal-close-cross {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  padding: 5px;
  transition: color 0.2s, transform 0.2s;
  font-family: Arial, sans-serif; /* Для тонкого системного крестика */
  font-weight: 100;
}

.modal-close-cross:hover {
  color: #fff;
  transform: scale(1.1);
}

.modal-close-cross:active {
  transform: scale(0.9);
}

.almanac-panel-header h2 {
  margin: 0;
  color: var(--pvz-yellow);
  font-size: 32px;
  text-shadow: 2px 2px 0 #000;
}

.scrollable-modal-body {
  flex: 1;
  overflow-y: scroll; /* Изменили с auto на scroll, чтобы был виден всегда */
  padding: 25px;
  scrollbar-width: thin;
  scrollbar-color: #8b7355 transparent;
}

.scrollable-modal-body::-webkit-scrollbar {
  width: 8px;
}

.scrollable-modal-body::-webkit-scrollbar-thumb {
  background: #8b7355;
  border-radius: 10px;
}

.modal-footer-pvz {
  padding: 20px;
  background: rgba(0,0,0,0.05);
  border-top: 2px dashed rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
}

.donate-note-pvz {
  background: rgba(255,255,255,0.5);
  padding: 15px;
  border-radius: 8px;
  border: 2px solid #d4c49c;
  color: #3d2b22;
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  font-size: 15px;
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.5;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.pvz-input-small {
  background: rgba(255,255,255,0.8);
  border: 2px solid #8b7355;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 16px;
  color: #3d2b22;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.pvz-input-small::placeholder {
  color: rgba(61, 43, 34, 0.4); /* Делаем плейсхолдер более заметным, но ненавязчивым */
}

.pvz-input-small:focus {
  border-color: #2d1b13;
  background: #fff;
}

.pvz-input-custom {
  background: rgba(255,255,255,0.8);
  border: 2px solid #8b7355;
  padding: 12px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 24px;
  color: #3d2b22;
  width: 120px;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.pvz-input-custom.wide {
  width: 100%;
  text-align: left;
  padding-right: 60px;
  border-radius: 8px;
}

.pvz-input-custom::-webkit-outer-spin-button,
.pvz-input-custom::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.pvz-number-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
}

.pvz-number-controls {
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  gap: 2px;
}

.pvz-control-btn {
  background: #2d1b13;
  color: var(--pvz-yellow);
  border: 1px solid #1f120c;
  width: 34px;
  height: 22px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.pvz-control-btn:hover {
  filter: brightness(1.3);
}

.pvz-control-btn:active {
  transform: scale(0.9);
}

.pvz-number-btn {
  background: #2d1b13;
  color: var(--pvz-yellow);
  border: 2px solid #1f120c;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #1f120c;
  transition: all 0.1s;
}

.pvz-number-btn:hover {
  filter: brightness(1.2);
}

.pvz-number-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.almanac-text-pvz {
  color: #3d2b22;
  font-weight: bold;
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 20px;
}

.modal-content-pvz::before {
  content: "R.I.P";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Creepster';
  font-size: 20px;
  opacity: 0.1;
}

.modal-body {
  color: #1a1a1a;
  font-weight: bold;
  line-height: 1.6;
}

.email-copy-container {
  background: rgba(0,0,0,0.1);
  padding: 15px;
  border-radius: 10px;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.small-info {
  font-size: 14px;
  font-style: italic;
  opacity: 0.8;
}

/* Game Container */
.game-container {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 3000;
}

.svz-dom-sprite:not(.donation-token) {
  pointer-events: none !important;
}

.donation-token {
  pointer-events: auto !important;
}

.donation-token img {
  pointer-events: none !important;
}

.svz-dom-sprite img {
  pointer-events: none !important;
  transform: translateZ(0);
}

/* Игровой интерфейс (Островная система) */
.svz-ui-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  pointer-events: none;
  width: auto;
}

.svz-ui-panel {
  background: #6b4423 var(--wood-texture);
  border: 4px solid #3d2614;
  border-radius: 12px;
  padding: 6px 10px;
  box-shadow: 0 8px 0 #1f120c, 0 15px 30px rgba(0,0,0,0.5);
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  pointer-events: auto !important;
}

.svz-ui-bank {
  background: #f5f5dc;
  border: 2px solid rgba(0,0,0,0.4);
  border-radius: 8px;
  padding: 0 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  height: 72px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.svz-ui-bank img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}

.svz-ui-bank span {
  font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
  font-size: 22px;
  color: #000;
  min-width: 40px;
}

.svz-ui-cards {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex-shrink: 0;
}

.svz-ui-card {
  width: 54px;
  height: 72px;
  background: #fff;
  border: 2px solid #808080;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s, filter 0.2s;
  flex-shrink: 0;
}

.svz-ui-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.svz-ui-card:active {
  transform: translateY(2px);
}

.svz-ui-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.svz-ui-card .price {
  font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
  font-size: 12px;
  color: #000;
  line-height: 1;
}

.svz-ui-card .recharge-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: rgba(0,0,0,0.6);
  pointer-events: none;
  transition: height 0.1s linear;
}

.svz-ui-card.disabled {
  filter: grayscale(0.8) brightness(0.7);
  cursor: not-allowed;
}

/* Кнопки на отдельном островке */
.svz-ui-controls-island {
  gap: 8px;
}

.svz-ui-controls-island .pvz-small-btn {
  height: 72px;
  min-width: 72px;
  padding: 0 15px;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Прогресс-бар */
.svz-ui-progress-container {
  background: #4d2600 var(--wood-texture);
  border: 3px solid #261300;
  border-radius: 12px;
  padding: 8px 12px;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.6);
}

.svz-ui-progress-bar-bg {
  width: 100%;
  height: 20px;
  background: #1a0a00;
  border: 2px solid #261300;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}

.svz-ui-progress-bar-fill {
  height: 100%;
  background: linear-gradient(to bottom, #72d572 0%, #3a9b3a 50%, #246b24 100%);
  width: 0%;
  transition: width 0.3s ease;
  position: relative;
}

.svz-ui-progress-bar-fill::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 35%;
  background: rgba(255,255,255,0.25);
}

.svz-ui-wave-text {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 18px;
  color: #ffd54f;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  letter-spacing: 1px;
}

.svz-ui-level-name {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 24px;
  color: #ffffff;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  letter-spacing: 1.5px;
  margin-bottom: 0;
  opacity: 1;
  pointer-events: none;
}

/* Меню паузы */
.svz-pause-modal-content {
  width: 400px;
  background: #f4e4bc var(--paper-texture) !important;
  border: 8px solid #2d1b13 !important;
  border-radius: 20px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,0.9);
  color: #3d2b22;
}

.pause-menu-header {
  width: 100%;
  padding: 20px 0;
  background: #2d1b13;
  text-align: center;
  border-bottom: 4px solid #1a100a;
}

.pause-menu-header h2 {
  margin: 0;
  color: var(--pvz-yellow);
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 36px;
  text-shadow: 3px 3px 0 #000;
  letter-spacing: 2px;
}

.pause-menu-body {
  padding: 25px 30px 35px 30px; /* Немного увеличили отступ снизу для компенсации теней кнопок */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px; /* Увеличили зазор между кнопками */
  width: 100%;
}

.volume-controls-pvz {
  width: 260px; /* Теперь ширина совпадает с кнопками */
  background: rgba(45, 27, 19, 0.08);
  padding: 15px 20px;
  border-radius: 12px;
  border: 2px dashed rgba(45, 27, 19, 0.3);
  margin: 5px 0;
}

.volume-row-pvz {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.volume-row-pvz:last-child {
  margin-bottom: 0;
}

.volume-row-pvz label {
  font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif;
  font-size: 13px;
  color: #5c4033;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.volume-slider-pvz {
  width: 100%;
  cursor: pointer;
  accent-color: #4caf50;
  height: 12px;
  border-radius: 6px;
  background: #1a0a00;
  border: 1px solid rgba(255,255,255,0.1);
}

.volume-slider-pvz::-webkit-slider-runnable-track {
  background: #1a0a00;
  border-radius: 6px;
}

.volume-slider-pvz::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #ffd54f;
  cursor: pointer;
  margin-top: -4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Оптимизация производительности (Турбо-DOM) */

/* Вращение снарядов через CSS */
@keyframes projectile-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.projectile-rotate {
  animation: projectile-rotate 0.4s infinite linear;
  will-change: transform;
}

/* Фильтры зомби через классы */
.zombie-filter {
  will-change: filter, transform;
}

.zombie-slowed {
  /* Фильтр применяется динамически в JS для возможности комбинирования */
}

.zombie-enraged {
  /* Фильтр применяется динамически в JS */
}

.zombie-burnt {
  /* Фильтр применяется динамически в JS */
}

.zombie-glow {
  /* Фильтр применяется динамически в JS */
}

.zombie-damaged {
  /* Фильтр применяется динамически в JS */
  transition: filter 0.1s;
}

.tile-red-flash {
  filter: brightness(2) contrast(1.2) !important;
  transition: filter 0.1s ease-out;
}

.tile-explode-flash {
  animation: tile-flash-anim 0.5s ease-out forwards;
}

@keyframes tile-flash-anim {
  0% { filter: brightness(3) contrast(1.5); }
  30% { filter: brightness(0.4) contrast(1.2); }
  100% { filter: brightness(1) contrast(1.1); }
}

/* ACHIEVEMENT NOTIFICATIONS */
.achievement-notification {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  background: #5d4037 url('https://www.transparenttextures.com/patterns/leather.png');
  border: 5px solid #2d1b13;
  border-radius: 15px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 2000000; /* Extremely high to be above everything */
  box-shadow: 0 8px 25px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.3);
  transition: top 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
}

.achievement-notification.show {
  top: 25px;
}

.achievement-notification.special-event {
  border-color: #4caf50;
  background: #1b5e20 url('https://www.transparenttextures.com/patterns/leather.png');
}

.achievement-notification.special-event .achievement-icon-mini {
  background: #1b5e20;
  border-color: #2e7d32;
}

.achievement-notification .achievement-icon-mini {
  width: 50px;
  height: 50px;
  background: #2d1b13;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
  border: 2px solid #3d2b22;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}

.achievement-notification .achievement-info-mini {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.achievement-notification .achievement-info-mini h4 {
  margin: 0;
  color: #ffeb3b;
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 18px;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
  line-height: 1.1;
}

.achievement-notification .achievement-info-mini p {
  margin: 0;
  color: #d7ccc8;
  font-size: 13px;
  line-height: 1.3;
  font-family: 'Roboto Condensed', sans-serif;
}

.achievement-notification.special-event .achievement-label-mini {
  color: #a5d6a7;
}

.achievement-notification .achievement-label-mini {
  font-family: 'Luckiest Guy', cursive, Impact, sans-serif;
  font-size: 10px;
  color: #8d6e63;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Облака через CSS анимацию */
@keyframes clouds-move {
  from { background-position-x: 0; }
  to { background-position-x: -465px; } /* Бесшовный цикл для ширины паттерна 465px */
}

.clouds-animated {
  animation: clouds-move 120s infinite linear;
  will-change: background-position-x;
}

/* Экран загрузки уровня */
.level-loader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out, visibility 0.5s;
}

.level-loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-zombie {
  font-size: 80px;
  animation: loader-zombie-bounce 1s infinite ease-in-out;
  filter: drop-shadow(0 0 20px rgba(84, 185, 72, 0.4));
}

@keyframes loader-zombie-bounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.level-loader .loader-text {
  font-size: 42px;
  color: var(--pvz-yellow);
  text-shadow: 4px 4px 0 #000;
  letter-spacing: 2px;
}

.level-loader .loader-subtext {
  font-size: 20px;
  color: #8b7355;
  font-style: italic;
  font-weight: bold;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .game-menu-btn {
    width: 110px;
    height: 48px;
    font-size: 18px;
  }
}
