* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #fdd6cb;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

.heart {
  position: fixed;
  width: 26px;
  height: 22px;
  pointer-events: none;
  z-index: 9999;
}

.hidden {
  display: none !important;
}

/* --- Экран входа --- */

.login {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.login.fade-out {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.05);
  pointer-events: none;
}

.avatar {
  width: 100px;
  height: 100px;
  margin-bottom: 16px;
}

.name {
  font-size: 22px;
  color: #7a3b2e;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.password {
  width: 260px;
  padding: 12px 16px;
  border: none;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  color: #7a3b2e;
  text-align: center;
  outline: none;
  box-shadow: 0 4px 14px rgba(122, 59, 46, 0.15);
  transition: box-shadow 0.2s ease;
}

.password::placeholder {
  color: rgba(122, 59, 46, 0.5);
}

.password:focus {
  box-shadow: 0 4px 20px rgba(122, 59, 46, 0.35);
}

.hint {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(122, 59, 46, 0.6);
}

.error {
  margin-top: 14px;
  font-size: 15px;
  color: #b7003a;
  height: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.error.show {
  opacity: 1;
}

/* --- Экран загрузки --- */

.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 20;
  width: 460px;
  max-width: 90vw;
  font-family: 'Times New Roman', serif;
  transition: opacity 0.6s ease;
}

.loading.fade-out {
  opacity: 0;
}

.loading-icon {
  width: 130px;
  height: 130px;
  margin-bottom: 24px;
  animation: spin 1.4s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.loading-title {
  font-size: 24px;
  color: #2a2a2a;
  margin-bottom: 18px;
  letter-spacing: 0.5px;
}

.loading-bar {
  width: 100%;
  height: 26px;
  border-radius: 14px;
  background: #8b8fe8;
  overflow: hidden;
}

.loading-fill {
  width: 0%;
  height: 100%;
  border-radius: 14px;
  background: #7ed957;
  transition: width 0.15s linear;
}

.loading-text {
  margin-top: 22px;
  font-size: 22px;
  color: #2a2a2a;
  letter-spacing: 0.5px;
  min-height: 28px;
  text-align: center;
}

/* --- Рабочий стол --- */

.desktop {
  position: fixed;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  transform-origin: top left;
  z-index: 30;
}

.desktop-grid {
  position: absolute;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.desktop-left {
  left: 16px;
}

.desktop-right {
  right: 16px;
}

.icon {
  width: 96px;
  height: 96px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease;
}

.icon:hover {
  transform: scale(1.05);
}

.icon:active {
  transform: scale(0.97);
}

.icon-img {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Окна --- */

.window {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
}

.window-body {
  position: relative;
  width: 600px;
  height: 691px;
}

.window-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.window-content {
  position: absolute;
  inset: 0;
  padding: 40px;
  overflow: hidden;
  color: #2a2a2a;
  font-family: 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.5;
}

/* --- Окно-статья --- */

.window-scroll {
  z-index: 90;
}

.window-body-scroll {
  width: 600px;
  height: 691px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
}

.window-body-scroll .window-bg {
  position: static;
  width: 600px;
  height: auto;
  display: block;
}

.window-body-scroll::-webkit-scrollbar {
  width: 0;
}

/* --- Кнопка-превью внутри окна вики отключена --- */

.story-btn {
  display: none;
}

/* --- Панель задач --- */

.taskbar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1280px;
  height: 29px;
  z-index: 1000;
}

.taskbar-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.taskbar-start {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 96px;
  height: 29px;
  cursor: pointer;
}

.taskbar-time {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 90px;
  height: 29px;
}

.taskbar-time-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.clock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  line-height: 1.1;
  pointer-events: none;
}

.clock-time {
  font-size: 11px;
  letter-spacing: 0.5px;
}

.clock-date {
  font-size: 9px;
  letter-spacing: 0.3px;
}

/* --- Сцена с подарком --- */

.present-scene {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  z-index: 500;
  pointer-events: none;
}

.present-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  will-change: transform;
}

.tnt-gif {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 628px;
  height: 916px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
}

/* --- Окно папки --- */

.window-folder {
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 110;
}

.window-body-folder {
  position: relative;
  width: 600px;
  height: 539px;
  background: #ffffff;
}

.folder-grid {
  position: absolute;
  top: 57px;
  left: 10px;
  right: 16px;
  display: grid;
  grid-template-columns: repeat(7, 70px);
  column-gap: 12px;
  row-gap: 18px;
}

.folder-item {
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.folder-item img {
  width: 70px;
  height: 70px;
  display: block;
}

.folder-item span {
  margin-top: 4px;
  font-size: 11px;
  color: #2a2a2a;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  text-align: center;
  white-space: nowrap;
}

/* --- Плеер --- */

.player {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
}

.player-body {
  position: relative;
}

.player-body-v {
  width: 326px;
  height: 580px;
}

.player-body-h {
  width: 577px;
  height: 468px;
}

.player-video {
  position: absolute;
  left: 0;
  top: 0;
  width: 326px;
  height: 580px;
  object-fit: cover;
  background: #000;
}

.player-body-h .player-video {
  width: 577px;
  height: 319px;
  top: 59px;
}

.player-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.player-timer {
  position: absolute;
  width: 16px;
  height: 19px;
  pointer-events: none;
  will-change: transform;
}

.player-body-v .player-timer {
  top: 491px;
  left: 7px;
}

.player-body-h .player-timer {
  top: 381px;
  left: 7px;
}

/* --- Кнопка закрытия плеера --- */

.player-close {
  position: absolute;
  cursor: pointer;
  z-index: 5;
  background: transparent;
}

.player-body-v .player-close {
  top: 8px;
  left: 294px;
  width: 24px;
  height: 25px;
}

.player-body-h .player-close {
  top: 8px;
  left: 545px;
  width: 24px;
  height: 25px;
}

/* --- Окно "звонок" (africa) --- */

.call {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 400;
}

.call-body {
  position: relative;
  width: 577px;
  height: 382px;
}

/* 1) задний фон */
.call-bg {
  position: absolute;
  inset: 0;
  width: 577px;
  height: 382px;
  object-fit: cover;
  z-index: 1;
}

/* 2) видео — пока пустое, фон прозрачный, чтобы не перекрывать гифки */
.call-video {
  position: absolute;
  top: 51px;
  left: 0;
  width: 577px;
  height: 325px;
  object-fit: cover;
  background: transparent;
  z-index: 2;
}

/* 3) анимации поверх фона и видео (пока видео не запущено) */
.call-world {
  position: absolute;
  top: calc(50% - 18px);
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.call-loading {
  position: absolute;
  bottom: 41px;
  left: 50%;
  transform: translateX(-50%);
  width: 65px;
  height: 65px;
  z-index: 4;
}

/* 4) рамка call.svg — поверх всего, кроме зоны закрытия */
.call-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* 5) зона закрытия */
.call-close {
  position: absolute;
  top: 323px;
  left: 266px;
  width: 46px;
  height: 47px;
  cursor: pointer;
  z-index: 6;
  background: transparent;
}

.call-close-2 {
  position: absolute;
  top: 6px;
  left: 550px;
  width: 18px;
  height: 17px;
  cursor: pointer;
  z-index: 6;
  background: transparent;
}

/* Прячем лишнее, когда играет видео */
.call.video-mode .call-bg,
.call.video-mode .call-world,
.call-video .call-text,
.call.video-mode .call-text,
.call.video-mode .call-loading {
  display: none;
}

/* --- Надпись под world.gif --- */

.call-text {
  position: absolute;
  top: calc(50% + 85px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
}

/* --- Зоны закрытия окон --- */

.folder-close {
  position: absolute;
  top: 6px;
  left: 572px;
  width: 19px;
  height: 18px;
  cursor: pointer;
  z-index: 10;
  background: transparent;
}

.wiki-close {
  position: absolute;
  top: 8px;
  left: 573px;
  width: 20px;
  height: 17px;
  cursor: pointer;
  z-index: 10;
  background: transparent;
}