@font-face {#news-wi
  font-family: 'DSEG7';
  src: url('fonts/DSEG7Classic-Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

/* ===== ФОН САЙТА ===== */
body {
  margin: 0;
  padding: 30px 15px;
  font-family: 'Trebuchet MS', 'Comic Sans MS', cursive;
  color: #0d4a2b;
  min-height: 100vh;

  background-image: url('img/bg-pattern.jpg');
  background-repeat: repeat;
  background-size: auto;

  background-attachment: fixed;   /* ← ВОТ ЭТО: фон не двигается */
  background-position: center;

  background-color: #808000;
}

/* ===== ШАПКА ===== */
.header {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 0 auto;
  padding: 15px 20px 25px 20px;
  min-height: 220px;

  background: #1a1a1a;
  border: 3px solid #4a4a4a;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  overflow: visible;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.banner-img {
  width: 100%;
  height: 540px;
  object-fit: fill;
  display: block;
  border-radius: 6px;
}

.logo-gif {
  position: absolute;
  top: -8px;
  left: 430px;
  z-index: 2;
  display: inline-block;
  filter: drop-shadow(2px 2px 0 #000);
}

.logo-gif img {
  vertical-align: middle;
  margin: 0;
  padding: 0;
  border: none;
  height: 50px;
}

.logo-gif a {
  text-decoration: none;
  display: inline-block;
}

.hello-gif {
  position: absolute;
  top: 508px;
  left: 1740px;
  z-index: 100;
  height: 120px;
  width: auto;
  pointer-events: none;
  filter: drop-shadow(2px 2px 0 #000);
}

/* ===== ТРИ КОЛОНКИ ===== */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.sidebar {
  flex: 0 0 180px;
  min-width: 160px;
  padding: 20px 15px;

  background: rgba(240, 245, 240, 0.95);
  border: 3px solid #808000;
  border-top: none;
  border-right: none;
  border-radius: 0 0 0 12px;
}

.sidebar nav a {
  display: block;
  color: #808000;
  text-decoration: none;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  font-weight: bold;
  border: 2px solid transparent;
}

.sidebar nav a:hover {
  color: #fff;
  background: #808000;
}

.main-content {
  flex: 1 1 400px;
  min-width: 280px;
  padding: 25px 30px;

  background: rgba(240, 245, 240, 0.95);
  border: 3px solid #808000;
  border-top: none;
  border-right: none;
  border-radius: 0;
}

.right-column {
  flex: 0 0 340px;
  min-width: 300px;
  padding: 15px;

  background: rgba(240, 245, 240, 0.95);
  border: 3px solid #808000;
  border-top: none;
  border-radius: 0 0 12px 0;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== КАЛЕНДАРЬ ===== */
.calendar {
  width: 100%;
  background: rgba(240, 245, 240, 0.98);
  border: 3px solid #808000;
  border-radius: 12px;
  padding: 12px;
  font-family: 'Trebuchet MS', sans-serif;
  color: #808000;
  font-size: 13px;
}

.cal-title {
  text-align: center;
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 10px;
  color: #808000;
  letter-spacing: 1px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  justify-items: center;
}

.cal-cell {
  text-align: center;
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  cursor: pointer;
  font-size: 13px;
}

.cal-head {
  font-weight: bold;
  background: transparent;
  color: #808000;
  cursor: default;
}

.cal-cell.empty {
  background: transparent;
  cursor: default;
}

.cal-cell.empty:hover {
  background: transparent;
  transform: none;
}

.cal-cell.today {
  background: #808000;
  color: #fff;
  font-weight: bold;
}

.cal-cell:hover {
  background: rgba(128, 128, 0, 0.45);
  color: #fff;
  transform: scale(1.12);
}

.cal-cell[data-date] {
  cursor: pointer;
}

.cal-cell.future {
  opacity: 0.35;
  cursor: default;
}

/* ===== ЧАСЫ ===== */
.clock {
  width: 150px;
  padding: 6px 10px;
  box-sizing: border-box;

  font-family: 'DSEG7', 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;

  color: #F0FFF0;
  background: #0d0d0d;
  border: 3px solid #4a4a4a;
  border-radius: 6px;

  text-shadow:
    0 0 4px #FFFF00,
    0 0 8px rgba(255, 255, 0, 0.6);

  box-shadow:
    inset 0 0 8px rgba(255, 255, 0, 0.2);

  margin: 0 auto 0 0;
}

.clock .colon {
  display: inline-block;
  font-size: 16px;
  color: #F0FFF0;
  vertical-align: middle;
  margin: 0 4px;
  text-shadow: 0 0 4px #F0FFF0;
}

/* ===== ЧАТ ===== */
.chat-box {
  flex: 1 1 auto;
  padding: 15px;

  background: rgba(240, 245, 240, 0.95);
  border: 3px solid #808000;
  border-radius: 12px;
}

h1, h2 {
  color: #808000;
  margin-top: 0;
}

p, li {
  font-size: 17px;
  line-height: 1.6;
  color: #808000;
}

ul {
  padding-left: 22px;
}

/* ===== КНОПКА "НАЗАД" ===== */
.back-btn {
  margin-top: 20px;
  padding: 8px 16px;
  background: rgba(128, 128, 0, 0.15);
  border: 2px solid #808000;
  border-radius: 8px;
  color: #808000;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.back-btn:hover {
  background: #808000;
  color: #fff;
}

/* ===== ХОЛСТ ДЛЯ КУРСОРА ===== */
#cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ===== СЧЁТЧИК ===== */
.counter {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 2px dashed #808000;
  font-size: 15px;
  color: #808000;
}

.counter p {
  margin: 0 0 5px 0;
  font-weight: bold;
}

#visitorCounter {
  font-size: 22px;
  font-weight: bold;
  color: #808000;
  letter-spacing: 1px;
}

/* ===== БЕГУЩАЯ СТРОКА ===== */
.ticker-wrap {
  position: relative;
  z-index: 50;

  max-width: 1200px;
  margin: 0 auto;

  background: #1a1a1a;
  border: 3px solid #4a4a4a;
  border-top: none;
  border-radius: 0;

  overflow: hidden;
  height: 26px;
  padding: 0;
}

.ticker-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  padding-top: 2px;
}

.ticker {
  color: #FFFF00;
  font-family: 'Trebuchet MS', Arial, sans-serif;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: 1;

  text-shadow: 0 0 3px #FFFF00;
  margin: 0;
  padding: 0;
}

.welcome-gif {
  position: absolute;
  top: 90px;
  left: 790px;
  z-index: 200;
  height: 140px;
  width: auto;
  pointer-events: none;
  filter: drop-shadow(2px 2px 0 #000);
}

.haha-gif {
  position: absolute;
  top: 470px;
  left: 1160px;
  z-index: 200;
  height: 75px;
  width: auto;
  pointer-events: none;
  filter: drop-shadow(2px 2px 0 #000);
}

/* ===== ОКНО НОВОСТЕЙ НА ГЛАВНОЙ ===== */
#news-win {
  position: fixed;
  z-index: 1000;
  width: 320px;
  max-height: 230px;            /* ← ограничивает высоту окна (видно ~3 новости) */
  overflow: hidden;              /* ← прячем всё, что вылезет */
  box-sizing: border-box;
  display: flex;                 /* ← чтобы заголовок и тело правильно распределялись */
  flex-direction: column;
}

#news-win .win-titlebar {
  cursor: move;                  /* ← подсказка, что окно таскается */
  flex-shrink: 0;                /* ← заголовок не сжимается */
}

/* ВНУТРЕННЯЯ ОБЛАСТЬ С ПРОКРУТКОЙ */
#news-win .win-body {
  flex: 1;                       /* ← занимает всё свободное место */
  min-height: 0;                 /* ← важно для flex-скролла */
  overflow-y: auto;              /* ← ПРОКРУТКА внутри окна */
  padding: 8px;
}

#news-win .win-text {
  min-height: 0;
  padding: 12px 15px;
  font-size: 13px;
  line-height: 1.5;
}

#news-win .win-text h3 {
  color: #000080;
  font-size: 14px;
  margin: 12px 0 5px 0;
}

#news-win .win-text h3:first-child {
  margin-top: 0;
}

#news-win .win-text p {
  color: #000;
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 10px 0;
}

#news-win .win-text b {
  color: #d04070;
}

/* ===== ПОЛОСА ПРОКРУТКИ В ОКНЕ НОВОСТЕЙ (Win95 стиль) ===== */
#news-win .win-body::-webkit-scrollbar {
  width: 16px;
}

#news-win .win-body::-webkit-scrollbar-track {
  background: #dfdfdf;
  border-left: 1px solid #808080;
}

#news-win .win-body::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
}

#news-win .win-body::-webkit-scrollbar-thumb:hover {
  background: #c0c0c0;            /* ← НЕ меняется при наведении — остаётся серой */
}

#news-win .win-body::-webkit-scrollbar-thumb:active {
  background: #a0a0a0;            /* чуть темнее при нажатии */
}

#news-win .win-body::-webkit-scrollbar-corner {
  background: #dfdfdf;
}

/* ===== РЕКЛАМА СБОКУ (плавающая на фоне) ===== */
.ads-float {
  position: fixed;
  top: 650px;                  /* ← отступ сверху */
  right: 360px;                 /* ← прижато к правому краю экрана */
  width: 280px;
  z-index: 500;                /* поверх фона, но под окном новостей */

  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;        /* чтобы не мешала кликам, если что-то под ней */
}

.ads-float img {
  display: block;
  width: 100%;
  height: auto;
  border: none;              /* ← убираем рамку */
  background: transparent;   /* ← убираем белый фон */
  pointer-events: auto;
}