@font-face {
  font-family: '8bitoperator_jve';
  src: local('8bitoperator_jve'),
       url('../fonts/8bitoperator_jve.woff2') format('woff2'),
       url('../fonts/8bitoperator_jve.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'GravitasOne-Regular';
  src: local('GravitasOne-Regular'),
       url('../fonts/GravitasOne-Regular.ttf') format('ttf');
  font-weight: 400;
  font-style: normal;
  font-display:swap;
}
/* === СБОР СТИЛЕЙ: Сброс и базовые настройки === */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* === ОБЩИЕ СТИЛИ === */
body {
  background-color: #252525;
  color: #F8FAFC;
  font-family: verdana, arial, sans-serif;
  font-size: large;
}
video{
  width: 100%;
  height: auto;
  
}

 .images{
  width: 100%;
  height: auto;
 }
.windows-visible {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 15px;
}

h2 {
  text-align: center;
}

/* Стили ссылок */
a {
  text-decoration: none;
  color: #c8aeff;
}

a:hover {
  background-color: #5100ff;
  color: white;
}

a:active {
  background-color: #5100ff;
  color: #8fc606;
}

/* === ГЛАВНЫЙ КОНТЕЙНЕР: две колонки на ПК === */
/* Важно: .left-menu и article должны быть прямыми детьми этого тега */
main {
  display: flex;
  flex-direction: row;       /* Горизонтальное расположение */
  gap: 10px;                /* Отступ между меню и контентом */
  background-color: transparent;
  margin-bottom: 5px;
}

/* === ЛЕВОЕ МЕНЮ (КОЛОНКА 1) === */
.left-menu {
  /* На ПК: фиксированная ширина, не сжимается, не растет */
  width: auto;
  max-width: 20%;           /* Не шире 20% экрана */
  flex: 0 0 auto;           /* flex-shrink: 0, flex-grow: 0 */
  
  background-color: #121212;
  border: 1px solid #D4AF37;
  border-radius: 5px;
  margin: 0;
  
  /* Позиционирование для гамбургера */
  position: relative; 
}

/* === КОНТЕНТ (КОЛОНКА 2) === */
article {
  /* На ПК: занимает всё свободное место */
  flex: 1 1 auto;           /* Растягивается, может сжиматься */
  max-width: none;          /* Не ограничиваем ширину */
  
  padding: 20px;
  background-color: #121212;
  border: 1px solid #D4AF37;
  border-radius: 5px;
}

/* === СТИЛИ ШАПКИ САЙТА === */
header {
  display: flex;
  align-items: center;
  flex-direction: column;
  border: 1px solid #d4af37;
  border-radius: 5px;
  padding: 1em;
  margin-bottom: 5px;
  background-color: #121212;
  width: 100%;
}

.logoname {
  text-align: center;
  font-size: 5em;
  margin: 0.1em 0 0.2em;
  color: rgb(239, 229, 222);
  text-shadow:
    -1px -1px 0 #d4af37,
    1px -1px 0 #d4af37,
    -1px 1px 0 #d4af37,
    1px 1px 0 #d4af37;
    font-family: 'GravitasOne-Regular',arial, sans-serif;
}

.site-signature {
  font-size: 2rem;
  color: white;
  text-shadow:
    -1px -1px 0 goldenrod,
    1px -1px 0 goldenrod,
    -1px 1px 0 goldenrod,
    1px 1px 0 goldenrod;
    font-family: '8bitoperator_jve',arial, sans-serif;
}

.header-auth { display: flex;
  align-items: center; gap: 12px;
}
.user-name { font-size: 0.9em;
   color: #f5f0f0; 
}
.btn-auth {
  padding: 8px 16px;
  background: #D4AF37;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95em;
}
.btn-auth:hover { 
  background: #005EE6;
}
.btn-logout { 
  background: #ffffff;
  color: #000000;
}
.btn-logout:hover { 
  background: #272626;
}



/* === ВИДЖЕТЫ === */
.vidjets {
  display:none; /* Показываем по умолчанию */
  border: 1px solid #D4AF37;
  border-radius: 5px;
  width: 100%;
  margin-bottom: 5px;
  background-color: #121212;
  padding: 15px;
  box-sizing: border-box;
}

/* === СТИЛИ МЕНЮ === */
.item-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column; /* Вертикально всегда, чтобы было удобно кликать */
}

.item-nav li {
  margin-bottom: 10px;
}

.item-nav a {
  text-decoration: none;
  color: white;
  display: block;
  padding: 8px 15px;
}

/* Кнопка гамбургера — скрыта на ПК, видна на мобильных */
.hamburger-btn {
  display: none;           /* Скрыта на ПК */
  background: none;
  border: 1px solid #ccc;
  padding: 10px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-bottom: 0px;
  color: white;
  font-size: 1.2em;
}

/* Мобильное меню — скрыто по умолчанию */
.mobile-menu {
  display: flex;            /* По умолчанию открыто на ПК */
  flex-direction: column;
}

/* === СТИЛИ FOOTER === */
footer {
  text-align: center;
  background-color: #121212;
  border: 1px solid #D4AF37;
  border-radius: 5px;
  padding: 15px;
  width: 100%;
}
 /* Базовые стили для таблицы */
    .mod-table-wrapper table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
      
    }
    .mod-table-wrapper th,
    .mod-table-wrapper td {
      border: 2px solid #ccc;
      padding: 12px;
      text-align: left;
    }
    .mod-table-wrapper th {
      background-color: #252525;
    }


.modpacks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 0 12px 24px 12px;
}

.modpack-card {
  background: #252525;
  border: 1px solid #D4AF37;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modpack-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.modpack-header {
  margin-bottom: 16px;
}

.modpack-title {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
  color: #F8FAFC;
}

.modpack-version {
  font-size: 0.9rem;
  color: #afaaaa;
}

.modpack-description {
  color: #F8FAFC;
  line-height: 1.5;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.modpack-btn {
  display: inline-block;
  background-color: #1e1e1e;       /* почти чёрный, чуть светлее фона карточки */
  color: #D4AF37 !important;        /* золотой текст */
  border: 1px solid #D4AF37;        /* золотая рамка как у карточки */
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
}

.modpack-btn:hover {
  background-color: #2a2a2a;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);  /* мягкое свечение золотого */
}

/* Стили для сетки новостей — можно адаптировать под твой дизайн */
        .news-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 24px;
            padding: 0 12px 24px 12px;
        }
        .news-card {
            background: #252525;
            border: 1px solid #D4AF37;
            color: #e0e0e0;
            padding: 16px;
            border-radius: 6px;
            display: flex;
            flex-direction: column;
        }
        .news-image {
            width: 100%;
            height: 300px;
            object-fit: cover;
            margin-bottom: 12px;
            border-radius: 4px;
        }
        .news-title {
            margin: 0 0 8px 0;
            font-size: 1.2rem;
        }
        .news-date {
            color: #aaa;
            font-size: 0.9rem;
            margin-bottom: 12px;
        }
        .news-excerpt {
            line-height: 1.5;
            margin-bottom: 16px;
            flex-grow: 1;
        }
        .news-link {
            display: inline-block;
            background: #D4AF37;
            color: #000;
            padding: 8px 16px;
            text-decoration: none;
            border-radius: 4px;
            font-weight: bold;
        }
        .news-link:hover {
            background: #b8962f;
        }

#comments {
    margin: 0 !important;
    max-width: 100% !important;
}





/* === АДАПТАЦИЯ ПОД МОБИЛЬНЫЕ УСТРОЙСТВА === */
@media (max-width: 768px) {
  /* Меняем main на колонку */
  main {
    flex-direction: column; /* Блоки друг под другом */
    gap: 0;                  /* Убираем горизонтальный отступ */
  }

  /* Принудительно растягиваем блоки на всю ширину */
  .left-menu, article, header, .vidjets, footer {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Адаптация шрифтов */
  .site-signature {
    font-size: 1.5rem;
  }
  
  .logoname {
    padding: 0;
    font-size: 1.8em; /* Уменьшаем лого на мобильном */
  }

  .windows-visible {
    padding: 0 10px;
    margin: 0;
  }

  /* Показываем кнопку гамбургера */
  .hamburger-btn {
    display: block;
  }

  /* Скрываем обычное меню по умолчанию */
  .mobile-menu {
    display: none; 
    position: static;
    width: 100%;
    background: #121212;
    padding: 15px 0;
  }

  /* Активное состояние меню (добавляется через JS) */
  .mobile-menu.active {
    display: flex;
    flex-direction: column;
  }

  /* Отступы для статьи на мобильном */
  article {
    padding: 15px;
    margin: 0;
  }
  /* Полностью отключаем табличную структуру */
      .mod-table-wrapper table,
      .mod-table-wrapper thead,
      .mod-table-wrapper tbody,
      .mod-table-wrapper tr,
      .mod-table-wrapper th,
      .mod-table-wrapper td {
        display: block;
      }

      /* Скрываем заголовок таблицы (шапку) */
      .mod-table-wrapper thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
      }

      /* Стили для каждой строки-карточки */
      .mod-table-wrapper tbody tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        background: #252525;
      }

      /* Ячейки внутри карточки становятся блочными элементами */
      .mod-table-wrapper td {
        padding: 15px;
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        text-align: left;
      }
      
      /* Убираем границу у последней ячейки в карточке */
      .mod-table-wrapper td:last-child {
        border-bottom: none;
      }

      /* Добавляем подписи к полям через data-label */
      .mod-table-wrapper td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #D4AF37;
        display: block;
        margin-bottom: 5px;
        text-transform: uppercase;
        font-size: 0.85rem;
      }

      /* Особый стиль для ячейки со скачиванием */
      .download-cell {
        background-color: #252525;
        padding-top: 15px;
      }
      .download-cell::before {
        display: none; /* Не нужно писать "Скачать" дважды */
      }
}
