* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	image-rendering: pixelated;
}

@font-face {
	font-family: 'IBM_VGA';
	src: url('WebPlus_IBM_VGA_8x16.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
	font-weight: 100 800;
}



:root {
	--icon-spritesheet: url(images/spritesheet.png);
}

body {
  margin: 0;
  background-color: #000;
  overflow: hidden;
  font-family: 'IBM_VGA', monospace;
  font-size: 1.6rem;
  image-rendering: pixelated;
}

@media (max-width: 900px) {
  body {
    font-size: 1.2rem;
  }
}
@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }
}

.btn, button {
  background: #000;
  color: #fff;
  border: 3px solid #fff;
  padding: 0.4rem 1.2rem;
  font-family: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  image-rendering: pixelated;
}
.btn:hover, button:hover {
  background: #fff;
  color: #000;
}

/* Рабочий стол */
.desktop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 32px;
  height: calc(100vh - 60px);
}

@media (max-width: 1200px) {
  .desktop {
    padding: 3vw;
    gap: 1vw;
  }
}
@media (max-width: 900px) {
  .desktop {
    grid-template-columns: 1fr;
    padding: 2vw;
    gap: 2vw;
  }
}
@media (max-width: 600px) {
  .desktop {
    grid-template-columns: 1fr;
    padding: 2vw 1vw;
    gap: 1vw;
    height: auto;
  }
}
.icons-column {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.left-icons {
  margin: 4vw 0 0 4vw;
  align-items: flex-start;
  padding-right: 2vw;
}

.right-icons {
  margin: 14vw 4vw 0 0;
  align-items: flex-end;
  padding-left: 2vw;
}

@media (max-width: 900px) {
  .left-icons, .right-icons {
    margin: 36px 16px 0 16px;
    padding-right: 1vw;
    padding-left: 1vw;
  }
}
@media (max-width: 600px) {
  .left-icons, .right-icons {
    margin: 40px 0 0 10px;
    padding-right: 10px;
    padding-left: 10px;
  }
}

.logo {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  background: transparent;
}
.logo img, #logo {
  width: 240px;
  height: auto;
  display: block;
  margin: 0 auto;
}

@media (max-width: 900px) {
  /* .logo {
    width: 200px;
    max-width: 80vw;
  } */

  .logo img, #logo {
    width: 160px;
  }
}
@media (max-width: 600px) {
  /* .logo {
    width: 120px;
    max-width: 90vw;
  } */

  .logo img, #logo {
    width: 120px;
    max-width: 90vw;
  }
}

/* Иконки */
.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: white;
  text-align: center;
  width: 8vw;
  min-width: 48px;
  max-width: 64px;
  gap: 1.2rem;
}

@media (max-width: 900px) {
  .icon {
    width: 12vw;
    min-width: 40px;
    max-width: 56px;
    gap: 0.8rem;
  }
}
@media (max-width: 600px) {
  .icon {
    width: 16vw;
    min-width: 32px;
    max-width: 48px;
    gap: 0.5rem;
  }
}

.icon img {
  width: 100%;
  height: auto;
  max-width: 48px;
  margin-bottom: 3px;
  transform: scale(4);
}
@media (max-width: 900px) {
  .icon img {
    max-width: 40px;
  }
}
@media (max-width: 600px) {
  .icon img {
    margin-bottom: 16px;
    max-width: 32px;
  }
}




.title-bar {
  height: 2.8rem;
  position: relative;
  width: 100%;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px;
  overflow: hidden;
  border-bottom: solid 3px;
}
.title-text {
	margin: 0 0 0 1.5rem;}

.title-icon {
  display: flex;
  align-items: center;
  gap: 8px;
	position: relative;
  z-index: 1; 
}

.title-icon img {
  width: 16px;
  height: 16px;
}

@keyframes progress {
  from { transform: scaleX(0) }
  to { transform: scaleX(1) }
}

@keyframes invertProgress {
  0% { clip-path: inset(0 100% 0 0) }
  100% { clip-path: inset(0 0 0 0) }
}


.drop-zone {
  position: relative;
  border: 3px dashed #fff;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 11.2rem;
  height: 2rem;
  margin: 0 0.4rem;
  overflow: hidden; 
}

.drop-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    text-align: center;
    pointer-events: none;
    user-select: none;
    z-index: 1;
}

.drop-zone .drop-text ~ .drop-hint,
.drop-zone .drop-text + .drop-hint,
.drop-zone .drop-text {
    z-index: 2;
}

.drop-zone .drop-text ~ .drop-hint,
.drop-zone .drop-text + .drop-hint {
    display: none;
}

.drop-text {
    position: relative;
    display: inline-block;
    color: #fff;
    padding: 0.4rem;
    width: 100%;
    text-align: center;
}

.drop-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #000;
    background: #fff;
    clip-path: inset(0 calc(100% - var(--progress, 0%)) 0 0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    box-sizing: border-box;
}


.window-content {
  position: relative;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  height: calc(100% - 2.8rem);
}

.music-header {
  padding: 0;
  font-size: 1.6rem;
  text-align: center;
  margin: 0.4rem 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}


.music-terms {
  position: relative;
  height: calc(70% - 6rem);
	overflow: auto;
	border: 4px solid;
}

.music-term {
  position: absolute;
  cursor: grab;
  font-size: 1.2rem;
  user-select: none;
}

/* Случайные стартовые позиции */
.music-term:nth-child(1) { top: 10%; left: 10%; }
.music-term:nth-child(2) { top: 30%; left: 65%; }
.music-term:nth-child(3) { top: 60%; left: 20%; }
.music-term:nth-child(4) { top: 40%; left: 50%; }
.music-term:nth-child(5) { top: 70%; left: 35%; }
.music-term:nth-child(6) { top: 20%; left: 30%; }

/* Эффекты перетаскивания */
.music-term.dragging {
  cursor: grabbing;
}

.music-controls {
  display: flex;
  position: absolute;
  bottom: 48px; /* Выше футера */
  left: 0.8rem;
  right: 0;
  text-align: center;
  margin: 1.2rem 0; /* Отступ от контента и футера */
}

.silence-btn {
    display: none; /* Скрыта по ум��лчанию */
}

.reset-btn {
    display: none; /* Скрыта по умолчанию */
    margin-left: 1rem; /* Отступ от кнопки "Слушать тишину" */
}
  

.music-message {
  font-size: 1.2rem;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  color: #fff;
  border: 3px solid #fff;
  padding: 1.2rem;
  z-index: 2000;
  text-align: center;
  max-width: 80%;
  pointer-events: auto;
}


.message-ok-btn:active {
    background: #000;
    color: #fff;
}

/* Панель задач */
.taskbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 2.8rem;
  background: #000;
  border-top: 3px solid #fff;
  border-bottom: 3px solid #000;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  color: #fff;
}

.message-text{
	margin-bottom: 1rem;
}

.taskbar-right {
  position: relative;
  bottom: 1px;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 1.2rem;
  padding-right: 0.8rem;
}

.taskbar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 0.4rem;
  position: relative;
}

.taskbar-text {
  line-height: 1;
  padding-top: 0.4rem; /* Тонкая корректировка выравнивания */
}

.title-buttons {
  margin-right: 1rem;
  display: flex;
  gap: 0.5rem;
  background: transparent;
  border: none;
  padding: 0;
  width: auto;
  height: auto;
}

.docs-icons {
  display: flex;
  flex-direction: row;
  gap: 3.2rem;
  padding: 3.2rem 2.4rem 3.2rem;
  height: 100%;
  
}

doc-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: white;
  width: 64px;
}

doc-icon img {
  transform: scale(4);
  margin-bottom: 1.6rem;
}

doc-icon span {
  text-align: center;
  font-size: 1.2rem;
}

/* Стили для иконок (уже есть в вашем CSS) */
#about_ico {
    width: 9px;
    height: 11px;
    background: var(--icon-spritesheet) -10px -36px;
    transform: scale(3);
}

#manifesto_ico {
    width: 9px;
    height: 11px;
    background: var(--icon-spritesheet) 0 -12px;
    transform: scale(3);
}


#help_btn {
  border: none;
	width: 9px;
	height: 9px;
	background: var(--icon-spritesheet) -82px 0;
}

#close_btn {
  border: none;
	width: 9px;
	height: 9px;
	background: var(--icon-spritesheet) -82px -11px;
}


.help-btn {
  border: none;
  
}

.close-btn {
  border: none;
  
}

.help-btn:hover {
  border: none;
  background: transparent;

}

.close-btn:hover {
  border: none;
  background: transparent;
}

#music_ico {
	width: 11px;
	height: 11px;
	background: var(--icon-spritesheet) -32px 0;
}

#film_ico {
	width: 11px;
	height: 11px;
	background: var(--icon-spritesheet) -20px -12px;
}

#game_ico {
	width: 11px;
	height: 11px;
	background: var(--icon-spritesheet) -20px -24px;
}

#visual_ico {
	width: 11px;
	height: 11px;
	background: var(--icon-spritesheet) -20px -12px;
}

#docs_ico {
	width: 11px;
	height: 9px;
	background: var(--icon-spritesheet) -82px -24px;
}

#contacts_ico {
	width: 12px;
	height: 9px;
	background: var(--icon-spritesheet) -44px -14px;
}

#info_ico {
	width: 11px;
	height: 11px;
	background: var(--icon-spritesheet) -20px -36px;
}



#sound_ico {
	width: 12px;
	height: 11px;
	background: var(--icon-spritesheet) -69px -24px;
	}

#full_ico {
	width: 11px;
	height: 8px;
	background: var(--icon-spritesheet) -69px -36px;
	}

.is-sound-off #sound_ico {

	background: var(--icon-spritesheet) -69px -11px;
	}

.taskbar img {
  transform: scale(3);
}

button img {
	transform: scale(3);
	cursor: pointer;
}


/* Стили для окна контактов */
#contacts-window .window-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.flexcontacts {
  display: flex;
  width: 100%;
}

.flexcontacts-list {
  width: 40%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact_links {
  width: 60%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Стили для текста и иконок */
#contacts-window p {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 1.2rem;
  min-height: 2rem; /* Фиксированная высота для выравнивания */
}

#contacts-window .window-content img {
  margin: 0 1.6rem 0 0.8rem;
  transform: scale(3);
  image-rendering: pixelated;
}

/* Стили для ссылок */
#contacts-window .link {
  color: white;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  border-bottom: 3px dashed;
}

#contacts-window .link:hover {
  border-bottom: 3px solid;
}

/* Скрытие input координат */
#coordinates {
  display: none;
}


/* Иконки контактов */

#tg_ico {
	width: 12px;
	height: 11px;
	background: var(--icon-spritesheet) -44px 0;

}

#mail_ico {
	width: 12px;
	height: 9px;
	background: var(--icon-spritesheet) -44px -14px;

}

#phone_ico {
	width: 12px;
	height: 11px;
	background: var(--icon-spritesheet) -44px -24px;
}

#calendar_ico {
	width: 12px;
	height: 11px;
	background: var(--icon-spritesheet) -44px -36px;
}

#coords_ico {
	width: 12px;
	height: 11px;
	background: var(--icon-spritesheet) -45px -48px;
}


.copy-notification {
  color: #fff;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  border: 3px solid #fff;
  padding: 1.6rem;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.notification-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.notification-content p {
  font-size: 1.2rem;
  margin: 0;
  text-align: center;
}

.notification-ok-btn {
  background: #000;
  color: #fff;
  border: 3px solid #fff;
  padding: 0.4rem 1.2rem;
  font-family: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  image-rendering: pixelated;
}

.notification-ok-btn:hover {
  background: #fff;
  color: #000;
}

/* Стили для окна игры */
.game-content {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 0.8rem;
}

.game-text {
  min-height: 80px;
  border-bottom: 3px solid;
  padding-bottom: 0.8rem;
}

game-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

game-option {
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  border: 3px solid transparent;
}

game-option:hover {
  border: 3px dashed #fff;
}

game-option:active {
  border: 3px solid #fff;
}

game-return-btn {
    margin-top: 1rem;
}

game-next-btn {
  margin: 0.8rem auto;
}

/* Стили для модального окна власти */
.power-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.power-modal-content {
  color: #fff;
  background: #000;
  border: 3px solid #fff;
  padding: 1.6rem;
  text-align: center;
  font-size: 1.2rem;
}

.power-modal-content p {
  margin-bottom: 1.2rem;
}

.power-cancel-btn {
}

/* Стили для сообщения об ошибке */
.power-error-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1.2rem;
  z-index: 9999;
  text-align: center;
  display: none;
}

/* Стили для финального символа */
.power-symbol {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.4rem;
  color: #fff;
  z-index: 10000;
  display: none;
}

.black-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  z-index: 9998; /* Ниже сообщений, но выше всего остального */
  display: none;
}

/* Анимация открытия окна - только рамка */
@keyframes windowFrame {
  0% {
    width: 30px;
    height: 30px;
    left: calc(var(--start-x) - 5px);
    top: calc(var(--start-y) - 5px);
  }
  100% {
    width: var(--end-width);
    height: var(--end-height);
    left: var(--end-x);
    top: var(--end-y);
  }
}

/* === Базовые переиспользуемые классы === */
.window {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56vw;
  height: 72vh;
  background-color: #000;
  color: #fff;
  border: 3px solid #fff;
  overflow: hidden;
  z-index: 1003;
  display: none;
}

.window.visible .window-content {
    opacity: 1;
}

.window-content {
    position: relative;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 3.5rem);
    background: none;
}

.window-title, .title-bar {
  height: 2.8rem;
  width: 100%;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px;
  border-bottom: 3px solid #fff;
  background: none;
}

.window-footer, .footer, .music-footer, .manifesto-footer {
  min-height: 1.6rem;
  font-size: 1.2rem;
  text-align: center;
  margin-top: auto;
  padding: 8px 0 0 0;
  border-top: 3px solid #fff;
  z-index: 2000;
  background: none;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  color: white;
  text-align: center;
  width: 8vw;
  min-width: 48px;
  max-width: 64px;
  gap: 1.2rem;
}

@media (max-width: 900px) {
  .icon {
    width: 12vw;
    min-width: 40px;
    max-width: 56px;
    gap: 0.8rem;
  }
}
@media (max-width: 600px) {
  .icon {
    width: 16vw;
    min-width: 32px;
    max-width: 48px;
    gap: 0.5rem;
  }
}

.text-block, .game-text, .final-message {
  font-size: 1.2rem;
  line-height: 1.4;
  color: #fff;
  max-width: 80%;
  margin: 1.2rem auto;
  text-align: left;
}

/* Стиль для "призрака" рамки */
.window-ghost {
  position: fixed;
  border: 3px solid #fff;
  background: transparent;
  z-index: 1001;
  animation: windowFrame 0.4s steps(4, end) forwards;
  image-rendering: pixelated;
  pointer-events: none;
  transform-origin: center;
}

.window-ghost.animating {
    opacity: 1;
    transition: all 0.5s ease-out;
}

/* Стиль для выключенного звука */
.is-sound-off #sound_ico {
  background: var(--icon-spritesheet) -69px -12px;
}


.info-text {
  padding-right: 3.2rem; /* Отступ справа для иконки */
  font-size: 1.2rem;
  line-height: 1.4;
}

.info-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.info-option {
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  border: 3px solid transparent;
}

.info-option:hover {
  border: 4px dashed #fff;
}

.info-option.used {
    position: relative;
}

.info-option.used:hover {
    border: 4px solid #000;
}


.info-option.used::after {
  content: "+";
  position: absolute;
  right: 2rem;
  font-size: 1.2rem;
}

.info-start-btn {
  margin-top: auto; 
  margin-bottom: 0.8rem;
  align-self: center;
}

.info-assistant {
  width: 9px;
  height: 13px;
  background: var(--icon-spritesheet) -24px -60px; /* Начальный кадр (стоп) */
  image-rendering: pixelated;
  position: absolute;  /* Фиксируем позицию */
  top: 2rem;             /* Выравниваем по верху */
  right: 0.8rem; 
  margin-left: 1.6rem;
  transform: scale(4);
  animation: assistant-talking 1.2s steps(1) infinite;
}

/* Ключевые кадры анимации */
@keyframes assistant-talking {
    0% { background-position: 0px -60px; }
    8.33% { background-position: -8px -61px; }
    16.66% { background-position: -16px -60px; }
    25% { background-position: 0px -61px; }
    33.33% { background-position: -16px -60px; }
    41.66% { background-position: -24px -60px; }
    50% { background-position: 0px -61px; }
    58.33% { background-position: -16px -60px; }
    66.66% { background-position: -24px -60px; }
    75% { background-position: 0px -61px; }
    83.33% { background-position: -32px -60px; }
    91.66% { background-position: -24px -60px; }
    100% { background-position: 0px -60px; }
}

.info-assistant.stopped {
    animation: none;
    background-position: -24px -60px; /* Кадр на стоп */
}

/* Восстанавливаем pointer-events для элементов управления */


#info-window .title-bar,
#info-window .title-bar * {
    pointer-events: auto;
}

#info-window .close-btn {
    cursor: pointer;
}

/* Остальные элементы */
#info-window .window-content {
    pointer-events: none;
}

#info-window .info-option,
#info-window .info-start-btn {
    pointer-events: auto;
    cursor: pointer;
}

.info-content-wrapper {
  position: relative;  /* Родитель для позиционирования */
  min-height: 96px;
  margin-bottom: 1.2rem;
  border-bottom: solid 3px;
}
.message-ok-btn-container {
  pointer-events: auto;
  text-align: center;
  margin: 0.8rem 0;
  z-index: 1000;
}

.message-ok-btn {
  margin: 0.8rem auto;
/*    display: block;*/
}

.next-btn {
  margin-left: 0.8rem;
}

.final-message {
  font-size: 1.2rem;
  margin: 1.2rem;
  line-height: 1.4;
  color: #fff;
  max-width: 80%;
}

.final-message p {margin-bottom: 1.2rem;}




.privacy-ok-btn {
  margin-top: 1.2rem;
}

.notification-window {
  display: none;
  font-size: 1.2rem;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #000;
  color: #fff;
  border: 3px solid #fff;
  padding: 1.2rem;
  z-index: 2000;
  text-align: center;
  max-width: 80%;
  pointer-events: auto;
}

.notification-window h1 {
  margin-bottom: 1.2rem;
  font-size: 1.6rem;
}

.manifesto-footer {
  display: none; /* Сначала скрыт */
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 1.6rem;
}

.manifesto-buttons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 1.6rem;
}


#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: inherit;
}

.loading-container {
    text-align: center;
    color: #fff;
    width: 80%;
    max-width: 400px;
}

.progress-container {
    border: 4px solid #fff;
    margin: 2rem 0;
    height: 30px;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: #fff;
    transition: width 0.1s linear;
}

#loadingText {
    margin-top: 0.5rem;
    font-size: 1.5rem;
}

/* === DROP HINT SCROLL ANIMATION === */
.drop-hint-scroll {
  font-size: 1.5rem;
  position: absolute;
  left: 100%;
  white-space: nowrap;
  animation: dropHintScroll 7s steps(30, end) infinite;
  pointer-events: none;
}

@keyframes dropHintScroll {
  0% {
    left: 100%;
  }
  100% {
    left: -100%;
  }
}

@media (max-width: 600px) {
  .right-icons {
    position: fixed;
    right: 0;
    bottom: 64px;
    left: auto;
    top: auto;
    flex-direction: row;
    align-items: flex-end;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem 0.5rem 0.5rem 0;
    z-index: 1001;
  }
}

@media (max-width: 600px) {
  .right-icons,
  .left-icons {
    /* position: static; */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
    gap: 2.5rem;
    margin: 3rem auto 2rem auto;
    padding: 0.5rem 0;
    width: 100%;
    z-index: 1001;
  }
}

@media (max-width: 600px) {
  .right-icons {
  
  }}

@media (max-width: 600px) {
  .window {
    width: calc(100vw - 32px);
    height: calc(100vh - 6rem);
    top: 48%;
  }
}

