/* Minimal styles for Menu only - no conflicts with game styles */
/* Header игры остается оригинальным, только добавляем стили для меню */

/* Menu Styles - адаптивные под тему устройства */
.menu-hider {
  position: fixed;
  top: -100px;
  bottom: -100px;
  left: 0px;
  right: 0px;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10009 !important;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-hider.menu-active {
  opacity: 1;
  pointer-events: all;
}

.menu {
  position: fixed;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  background: var(--tg-bg-color, rgba(255, 255, 255, 0.95));
  z-index: 10010 !important;
  overflow: scroll;
  transition: all 300ms ease;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Адаптивность под темную тему */
body[data-theme="dark"] .menu {
  background: var(--tg-bg-color, #17212b);
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme]) .menu {
    background: var(--tg-bg-color, #17212b);
  }
}

.menu-box-left {
  left: 0px;
  top: 0px !important;
  width: 250px;
  height: 100%;
  bottom: 0px;
  transform: translate3d(-100%, 0, 0);
  -webkit-transform: translate3d(-100%, 0, 0);
}

.menu-box-left.menu-active {
  transform: translate3d(0%, 0, 0) !important;
  -webkit-transform: translate3d(0%, 0, 0) !important;
}

.menu-active.menu {
  opacity: 1 !important;
  transition: all 300ms ease;
  pointer-events: all !important;
}

/* Menu Content Styles */
.menu-divider {
  padding-left: 16px;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--tg-hint-color, #7e8793);
  margin-top: 20px;
  margin-bottom: 10px;
  font-family: "Montserrat", sans-serif;
}

.list-group {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-menu {
  font-family: "Montserrat", sans-serif;
  margin: 0px 25px 0px 10px;
}

.list-menu a {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  color: var(--tg-text-color, #7e8793);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--tg-separator-color, rgba(0, 0, 0, 0.05));
  transition: all 200ms ease;
  font-family: "Montserrat", sans-serif;
}

.list-menu a:hover {
  background-color: var(--tg-section-bg-color, rgba(0, 0, 0, 0.02));
}

body[data-theme="dark"] .list-menu a:hover {
  background-color: var(--tg-section-bg-color, rgba(255, 255, 255, 0.05));
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme]) .list-menu a:hover {
    background-color: var(--tg-section-bg-color, rgba(255, 255, 255, 0.05));
  }
}

.list-menu a i:first-child {
  border-radius: 12px;
  height: 32px !important;
  line-height: 33px !important;
  width: 32px !important;
  text-align: center;
  margin-right: 12px;
  box-shadow: 0 5px 30px 0 rgba(0, 0, 0, 0.11), 0 5px 15px 0 rgba(0, 0, 0, 0.02);
}

.list-menu a span {
  flex: 1;
}

.list-menu a .fa-angle-right {
  margin-left: auto;
  opacity: 0.5;
  font-size: 10px;
}

.list-menu a.border-0 {
  border-bottom: none !important;
}

.list-menu a.active-nav {
  font-weight: 700;
  color: var(--tg-text-color, #000) !important;
}

/* Card Styles for Menu Header */
.card {
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  background-size: cover;
  border: 0px !important;
  margin-bottom: 0;
  background-position: center center !important;
}

.card[data-card-height="150"] {
  height: 150px;
}

.card-top {
  z-index: 2;
  position: absolute;
  left: 0px;
  right: 0px;
  top: 0px;
}

.card-bottom {
  z-index: 2;
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 0px;
}

.card-bottom h1,
.card-bottom p {
  color: var(--tg-text-color, #fff);
}

.card-overlay {
  left: 0px;
  right: 0px;
  top: 0px;
  bottom: 0px;
  position: absolute;
  z-index: 1;
}

.bg-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rounded-0 {
  border-radius: 0 !important;
}

.bg-6 {
  background-color: #667eea;
}

.close-menu {
  text-decoration: none;
  color: var(--tg-text-color, #fff);
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background: var(--tg-section-bg-color, rgba(0, 0, 0, 0.2));
  cursor: pointer;
  border: none;
  transition: all 200ms ease;
}

.close-menu:hover {
  background: var(--tg-button-color, rgba(0, 0, 0, 0.3));
  transform: scale(1.1);
}

body[data-theme="dark"] .close-menu {
  background: var(--tg-section-bg-color, rgba(255, 255, 255, 0.1));
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme]) .close-menu {
    background: var(--tg-section-bg-color, rgba(255, 255, 255, 0.1));
  }
}

/* Utility Classes */
.float-end {
  float: right;
}

.me-2 {
  margin-right: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-n1 {
  margin-bottom: -0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.ps-3 {
  padding-left: 1rem;
}

.font-28 {
  font-size: 28px;
}

.font-12 {
  font-size: 12px;
}

.font-10 {
  font-size: 10px;
}

.color-white {
  color: #FFF !important;
}

.opacity-50 {
  opacity: 0.5;
}

/* Gradient Colors for Icons */
.gradient-red {
  background-image: linear-gradient(to bottom, #ED5565, #DA4453) !important;
  color: #FFF;
}

.gradient-green {
  background-image: linear-gradient(to bottom, #A0D468, #8CC152) !important;
  color: #FFF;
}

.gradient-blue {
  background-image: linear-gradient(to bottom, #5D9CEC, #4A89DC) !important;
  color: #FFF;
}

.gradient-brown {
  background-image: linear-gradient(to bottom, #BAA286, #AA8E69) !important;
  color: #FFF;
}

.gradient-magenta {
  background-image: linear-gradient(to bottom, #AC92EC, #967ADC) !important;
  color: #FFF;
}

.gradient-teal {
  background-image: linear-gradient(to bottom, #A0CECB, #7DB1B1) !important;
  color: #FFF;
}

.gradient-highlight {
  background-image: linear-gradient(to bottom, #5D9CEC, #4A89DC) !important;
  color: #FFF;
}

.gradient-dark {
  background-image: linear-gradient(to bottom, #656D78, #434A54) !important;
  color: #FFF;
}

/* Стили для кнопки меню в header игры - адаптивные под тему */
.header-button#btn-menu {
  font-size: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-button#btn-menu i {
  display: block;
  color: var(--tg-text-color, #1f1f1f);
}

/* Светлая тема */
body:not([data-theme]) .header-button#btn-menu,
body[data-theme="light"] .header-button#btn-menu {
  background: rgba(255, 255, 255, 0.5);
}

/* Тёмная тема */
body[data-theme="dark"] .header-button#btn-menu {
  background: rgba(35, 46, 60, 0.5);
}

@media (prefers-color-scheme: dark) {
  body:not([data-theme]) .header-button#btn-menu {
    background: rgba(35, 46, 60, 0.5);
  }
}
