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

.install-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.install-box {
  background: #16213e;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  text-align: center;
  color: #eee;
  width: 350px;
}

.install-box h2 {
  color: #f5a623;
  margin-bottom: 15px;
}

.install-box p {
  margin-bottom: 15px;
  color: #aaa;
  font-size: 14px;
}

.install-box input {
  width: 100%;
  padding: 12px;
  border: 1px solid #333;
  border-radius: 5px;
  background: #0f3460;
  color: #fff;
  font-size: 14px;
  margin-bottom: 15px;
}

.install-box input:focus {
  outline: none;
  border-color: #f5a623;
}

.install-box button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 5px;
  background: #f5a623;
  color: #000;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.install-box button:hover {
  background: #e6951c;
}

.install-box .message {
  margin-top: 10px;
  padding: 8px;
  border-radius: 5px;
  font-size: 13px;
  display: none;
}

.install-box .message.error {
  background: #e74c3c;
  color: white;
  display: block;
}

.install-box .message.success {
  background: #2ecc71;
  color: white;
  display: block;
}

body {
  overflow: hidden;
  background: #3a6ea5 url('assets/bliss.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  cursor: url('Cursor1.cur'), auto;
  width: 100vw;
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xp-window {
  display: flex;
  flex-direction: column;
  border: 3px solid #0054e3;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  background: #ece9d8;
  overflow: hidden;
  max-width: 100%;
  max-height: 100%;
  position: relative;
}

.xp-logo {
  position: absolute;
  top: 32px;
  left: -31px;
  z-index: 1;
  pointer-events: none;
  transform: scale(0.75);
  transform-origin: top left;
  -webkit-mask: radial-gradient(ellipse, black 30%, transparent 65%);
  mask: radial-gradient(ellipse, black 30%, transparent 65%);
}

.xp-titlebar {
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 20%, #0654d8 40%, #0252cc 60%, #0350ca 80%, #054fc5 90%, #0550c4 100%);
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}

.xp-titlebar-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.xp-titlebar-text {
  flex: 1;
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.xp-titlebar-buttons {
  display: flex;
  gap: 2px;
}

.xp-btn {
  width: 21px;
  height: 21px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.xp-minimize {
  background: linear-gradient(180deg, #3c8eef 0%, #2470d0 50%, #1a5cb8 100%);
  color: white;
}

.xp-maximize {
  background: linear-gradient(180deg, #3c8eef 0%, #2470d0 50%, #1a5cb8 100%);
  color: white;
}

.xp-close {
  background: linear-gradient(180deg, #e8775e 0%, #d44b2c 50%, #c03518 100%);
  color: white;
}

.xp-btn:hover {
  filter: brightness(1.2);
}

.xp-btn:active {
  filter: brightness(0.9);
}

.xp-menubar {
  background: #ece9d8;
  border-bottom: 1px solid #aca899;
  padding: 2px 4px;
  display: flex;
  gap: 2px;
  position: relative;
  z-index: 10;
}

.xp-menu-item {
  padding: 2px 8px;
  font-size: 11px;
  color: #000;
  cursor: pointer;
  border-radius: 2px;
}

.xp-menu-item:hover {
  background: #316ac5;
  color: white;
}

.xp-window-body {
  padding: 0;
  background: #000;
}

.game-container {
  width: 800px;
  height: 600px;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  transform-origin: center center;
}

@media (max-width: 850px) {
  .xp-window {
    border-radius: 0;
    border: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
  }
  
  .game-container {
    transform: scale(calc(100vw / 800));
    transform-origin: top left;
  }
}

@media (max-height: 700px) and (min-width: 851px) {
  .game-container {
    transform: scale(calc(100vh / 680));
    transform-origin: center center;
  }
}

@media (max-width: 600px) {
  .xp-titlebar-text {
    font-size: 10px;
  }
  
  .xp-menubar {
    display: none;
  }
  
  .xp-btn {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  background: url('assets/title_1_en.jpeg') center center / 800px 600px no-repeat;
  z-index: 0;
}

.landing-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 800px;
  height: 600px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url('Cursor3.cur'), pointer;
  opacity: 1;
  transition: opacity 1.5s ease-in-out;
  pointer-events: auto;
  padding-top: 355px;
}

.landing-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.landing-content {
  text-align: center;
}

.landing-text {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 28px;
  font-weight: bold;
  color: #fff;
  text-shadow:
    -2px -2px 0 #5C3317,
    2px -2px 0 #5C3317,
    -2px 2px 0 #5C3317,
    2px 2px 0 #5C3317,
    0 -2px 0 #5C3317,
    0 2px 0 #5C3317,
    -2px 0 0 #5C3317,
    2px 0 0 #5C3317,
    0 0 10px rgba(255, 200, 0, 0.8),
    0 0 20px rgba(255, 150, 0, 0.6),
    0 0 40px rgba(255, 200, 0, 0.5);
  letter-spacing: 2px;
  animation: landingPulse 2s ease-in-out infinite;
}

.landing-text.flicker {
  animation: flickerText 0.1s linear 10 forwards;
}

@keyframes flickerText {
  0%, 49% { opacity: 1; }
  50%, 99% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes landingPulse {
  0%, 100% {
    opacity: 0.6;
    text-shadow:
      -2px -2px 0 #5C3317,
      2px -2px 0 #5C3317,
      -2px 2px 0 #5C3317,
      2px 2px 0 #5C3317,
      0 -2px 0 #5C3317,
      0 2px 0 #5C3317,
      -2px 0 0 #5C3317,
      2px 0 0 #5C3317,
      0 0 10px rgba(255, 200, 0, 0.4),
      0 0 20px rgba(255, 150, 0, 0.3),
      0 0 30px rgba(255, 200, 0, 0.2);
  }
  30%, 70% {
    opacity: 1;
    text-shadow:
      -2px -2px 0 #5C3317,
      2px -2px 0 #5C3317,
      -2px 2px 0 #5C3317,
      2px 2px 0 #5C3317,
      0 -2px 0 #5C3317,
      0 2px 0 #5C3317,
      -2px 0 0 #5C3317,
      2px 0 0 #5C3317,
      0 0 15px rgba(255, 200, 0, 1),
      0 0 30px rgba(255, 150, 0, 0.8),
      0 0 50px rgba(255, 200, 0, 0.6);
  }
}

.menu-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease-in-out 0.3s;
}

.menu-content.visible {
  opacity: 1;
  pointer-events: auto;
}

.buttons-container {
  position: absolute;
  top: calc(50% + 135px);
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transition: opacity 1s ease-in-out;
  pointer-events: auto;
}

.buttons-container.hidden {
  opacity: 0;
  pointer-events: none;
}

.buttons-bg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

.buttons-list {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 0;
  padding: 0;
}

.menu-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: url('Cursor3.cur'), pointer;
  transition: transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 100%;
  position: relative;
}

.menu-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -30px;
  right: -30px;
  height: 18px;
  transform: translateY(-50%);
  background: radial-gradient(ellipse at center, rgba(240, 160, 20, 1) 0%, rgba(220, 140, 10, 0.8) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: -1;
}

.menu-btn:hover::before {
  opacity: 1;
}

.menu-btn:hover {
  filter: brightness(1.4);
}

.menu-btn img {
  display: block;
  height: 100%;
  width: auto;
  pointer-events: none;
}

.menu-btn:active {
  transform: scale(0.95);
}

.menu-btn.flicker::before {
  animation: flickerGlow 0.1s linear 10;
}

@keyframes flickerGlow {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.menu-btn.selected {
  outline: 1px solid rgba(255, 180, 0, 0.8);
  outline-offset: 1px;
}

.menu-btn.selected:hover {
  filter: brightness(1.4);
}

.downloads-page {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease-in-out;
  z-index: 5;
}

.downloads-page.visible {
  opacity: 1;
  pointer-events: auto;
}

.downloads-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  object-fit: fill;
}

.downloads-list {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 30px;
}

.download-item {
  width: 280px;
  padding: 8px 20px;
  background: none;
  border: none;
  color: white;
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    -2px -2px 0 #3d1c00,
    2px -2px 0 #3d1c00,
    -2px 2px 0 #3d1c00,
    2px 2px 0 #3d1c00,
    0 -2px 0 #3d1c00,
    0 2px 0 #3d1c00,
    -2px 0 0 #3d1c00,
    2px 0 0 #3d1c00;
  cursor: url('Cursor3.cur'), pointer;
  transition: transform 0.1s ease;
  position: relative;
}

.download-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -30px;
  right: -30px;
  height: 18px;
  transform: translateY(-50%);
  background: radial-gradient(ellipse at center, rgba(200, 120, 0, 1) 0%, rgba(180, 100, 0, 0.6) 40%, transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: -1;
}

.download-item:hover::before {
  opacity: 1;
}

.download-item:hover {
  filter: brightness(1.4);
}

.download-item:active {
  transform: scale(0.95);
}

.download-item.flicker::before {
  animation: flickerGlow 0.1s linear 10;
}

.flying-back {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 0, 0.9) 0%, rgba(200, 120, 0, 0.7) 70%);
  color: #fff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url('Cursor3.cur'), pointer;
  z-index: 10;
  box-shadow: 0 0 15px rgba(255, 180, 0, 0.6);
  animation: flyFloat 3s ease-in-out infinite;
  transition: transform 0.1s ease;
}

.flying-back:hover {
  transform: scale(1.2);
  box-shadow: 0 0 25px rgba(255, 180, 0, 0.9);
  filter: brightness(1.3);
}

.flying-back:active {
  transform: scale(0.9);
}

@keyframes flyFloat {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-8px) translateX(4px); }
  50% { transform: translateY(-3px) translateX(-3px); }
  75% { transform: translateY(-10px) translateX(2px); }
}

.copyright {
  position: absolute;
  bottom: 0px;
  right: 10px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.5px;
  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.8),
    1px -1px 0 rgba(0,0,0,0.8),
    -1px 1px 0 rgba(0,0,0,0.8),
    1px 1px 0 rgba(0,0,0,0.8);
  z-index: 4;
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.5; }
  42%, 58% { opacity: 1; }
}

@media (max-width: 500px) {
  .copyright {
    font-size: 10px;
    bottom: 2px;
    right: 5px;
  }
}
