/* ---------- Internet Explorer 4.0 ---------- */

.browser {
  max-width: 1240px;
  padding: 2px;
  background: #c0c0c0;
  box-shadow: 5px 5px 0 #0008;
}

.browser > header > .titlebar {
  min-height: 23px;
  background: #000080;
  font: bold 12px Tahoma, Arial, sans-serif;
}

.browser > header .menu-bar,
.browser > header .toolbar,
.browser > header .address-bar {
  font-family: Tahoma, Arial, sans-serif;
  background: #c0c0c0;
}

.toolbar {
  gap: 3px;
  padding: 5px 4px;
  border-top: 2px groove #eee;
  border-bottom: 2px groove #eee;
}

.tool {
  min-width: 66px;
  font: 11px Tahoma, Arial, sans-serif;
}

.tool b {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 27px;
  text-shadow: none;
}

.tool .win95-icon {
  width: 24px;
  height: 24px;
}

.address-bar {
  min-height: 29px;
}

.address-bar input {
  font: 13px Arial, sans-serif;
}

.retro-tabbar {
  display: none !important;
}

.statusbar {
  min-height: 22px;
  font-family: Tahoma, Arial, sans-serif;
}

/* ---------- Чёткие кнопки ---------- */

.win-button,
a.win-button:link,
a.win-button:visited,
a.win-button:hover,
a.win-button:active,
.page-file,
.retro-page-action,
.win-button span {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  text-shadow: none !important;
}

.admin-tabs button.active {
  background: #dedede !important;
  color: #000 !important;
  font-weight: bold;
}

/* ---------- Убираем радугу ---------- */

.thanks {
  background: #08020e !important;
  min-height: 83px;
}

.thanks strong {
  color: #efcfff;
  animation: badge-pulse-v3 2s steps(3, end) infinite;
  text-shadow: 2px 2px #662b8e;
}

/* ---------- Чёткая шапка ---------- */

.hero {
  height: 245px;
}

.hero-title {
  color: #ffe268;
  margin-top: 40px;
  font-weight: 900;
  letter-spacing: -2px;
  filter: none !important;
  text-shadow:
    2px 0 #ff9300,
    -2px 0 #ff9300,
    0 2px #ff6200,
    3px 4px #8c1800;
  animation: title-heat-v3 600ms steps(1, end) infinite !important;
}

.hero-subtitle {
  color: #f1aaff !important;
  font-weight: 900;
  text-shadow:
    1px 1px #300053,
    -1px 0 #ae30ff,
    0 0 3px #d636ff !important;
  animation: subtitle-v3 1800ms steps(3, end) infinite !important;
}

.title-flame-v3 {
  position: absolute;
  top: 10px;
  left: 13%;
  width: 74%;
  height: 68px;
  z-index: 2;
  pointer-events: none;
  image-rendering: pixelated;
}

.hero-title {
  z-index: 3;
}

@keyframes title-heat-v3 {
  0%, 100% {
    color: #ffe66a;
    text-shadow: 2px 0 #ff9c00, -2px 0 #ff9c00, 0 -3px #ff6400, 3px 4px #811000;
  }
  33% {
    color: #fff18b;
    text-shadow: 2px 0 #ffad00, -2px -2px #ff7900, 0 -5px #e52b00, 3px 4px #811000;
  }
  66% {
    color: #ffdb4d;
    text-shadow: -2px 0 #ff9300, 2px -3px #ff6a00, -2px -5px #c72b00, 3px 4px #811000;
  }
}

@keyframes subtitle-v3 {
  50% { opacity: .85; }
}

@keyframes badge-pulse-v3 {
  50% { text-shadow: -2px 1px #9b3ee6; }
}

/* Убираем общий CRT поверх всей страницы.
   Он больше не портит текст гостевой и кнопки. */
.site::before {
  display: none !important;
}

.main-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .07;
  background: repeating-linear-gradient(
    transparent 0 3px,
    #000 3px 4px
  );
}

/* ---------- Читаемая гостевая ---------- */

.guestbook {
  background: #dededb !important;
  color: #171717;
  font: 12px/1.5 Tahoma, Arial, sans-serif;
  text-shadow: none !important;
  box-shadow: inset 1px 1px #fff;
}

.guestbook h3 {
  font: bold 13px Tahoma, Arial, sans-serif;
}

.guest-entry {
  padding-bottom: 5px;
  margin-bottom: 5px;
  border-bottom: 1px solid #bcbcb8;
}

.guest-picture-v3 {
  display: block;
  max-width: 100%;
  max-height: 230px;
  margin-top: 7px;
  border: 2px inset #ddd;
  object-fit: contain;
}

.guestbook .guest-picture-v3 {
  max-height: 85px;
}

.guest-card-v3 {
  margin-top: 13px;
  padding: 12px;
  color: #111;
  background: #dededb;
  border: 2px solid;
  border-color: #fff #555 #555 #fff;
  font: 13px/1.5 Tahoma, Arial, sans-serif;
  overflow-wrap: anywhere;
}

.guest-card-v3 p {
  margin: 8px 0;
  white-space: pre-wrap;
}

.guest-date-v3 {
  display: block;
  color: #555;
  font-size: 11px;
}

.form-message-v3 {
  white-space: pre-wrap;
  font: 12px/1.5 Arial, sans-serif;
}

.honeypot-v3 {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Админка ---------- */

.editor-code-v3 {
  min-height: 280px !important;
  tab-size: 2;
  font: 13px/1.5 Consolas, monospace !important;
  white-space: pre;
}

.admin-card-v3 {
  padding: 10px;
  margin-bottom: 12px;
  border: 2px groove #eee;
}

.admin-row-v3 {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.admin-preview-v3 {
  max-width: 100%;
  max-height: 110px;
  display: block;
  margin: 8px 0;
  image-rendering: auto;
}

.menu-editor-row-v3 {
  display: grid;
  grid-template-columns: 1fr 1.3fr auto auto auto;
  gap: 5px;
  margin-bottom: 9px;
}

.menu-editor-row-v3 input {
  width: 100%;
  min-width: 0;
  padding: 6px;
}

.custom-art-v3 {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 180px;
  object-fit: contain;
  image-rendering: auto;
}

.windows-ad.has-custom-v3 {
  padding: 0;
  min-height: 0;
}

.paper.has-custom-v3,
.badge.has-custom-v3,
.game-over.has-custom-v3,
.alien-sign.has-custom-v3 {
  background: none;
  border: 0;
  box-shadow: none;
  text-shadow: none;
  padding: 0;
  max-width: 180px;
}

.thanks.has-custom-v3 {
  padding: 0;
  overflow: hidden;
}

/* ---------- Дневник ---------- */

.diary-entry-v3 {
  margin: 18px 0;
  padding: 13px;
  border: 2px ridge #8193ad;
  background: #080811;
}

.diary-entry-v3 h3 {
  margin: 7px 0 10px;
  color: #e7b5ff;
}

.diary-entry-v3 time {
  color: #83d4dc;
  font: 12px Consolas, monospace;
}

.diary-entry-v3 p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 13px/1.6 "Courier New", monospace;
}

/* ---------- Игра ---------- */

.cat-game-v3 {
  margin-top: 18px;
  padding: 5px;
  background: silver;
  border: 3px outset #eee;
  color: #111;
}

.cat-game-v3 canvas {
  width: 100%;
  display: block;
  background: #070912;
  image-rendering: pixelated;
  touch-action: manipulation;
  border: 2px inset #eee;
}

.game-toolbar-v3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  font: 12px Tahoma, Arial, sans-serif;
}

.game-help-v3 {
  margin: 8px 2px 3px;
  font: 11px/1.4 Tahoma, Arial, sans-serif;
}

@media (max-width: 600px) {
  .hero { height: 185px; }
  .hero-title { margin-top: 38px; }
  .title-flame-v3 { left: 3%; width: 94%; height: 55px; }
  .menu-editor-row-v3 { grid-template-columns: 1fr auto auto auto; }
  .menu-editor-row-v3 input:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
  }
}