* {
  box-sizing: border-box;
  user-select: none;
}
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  background: #000 url("/img/bg2.jpeg") center center / cover no-repeat fixed;
  color: #111;
}

.site-logo {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 20;
  width: 155px;
  max-width: 25vw;
  height: auto;
  image-rendering: auto;
  cursor: default;
}

.menu-links {
  position: fixed;
  top: 95px;
  left: 24px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  letter-spacing: 2px;
  padding: 12px 18px 14px 18px;
  background: rgba(10, 0, 20, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 140, 255, 0.25);
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(180, 0, 255, 0.15), inset 0 0 30px rgba(200, 100, 255, 0.05);
  color: #e8c8ff;
  text-shadow: 0 0 6px #b86aff, 0 0 12px #7a2aff;
}
.menu-links span {
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  background: transparent;
  border: none;
  font-family: 'Courier New', monospace;
  font-size: 18px;
  color: #e8c8ff;
  text-shadow: 0 0 6px #b86aff, 0 0 12px #7a2aff;
  transition: all 0.25s;
  letter-spacing: 2px;
  display: inline-block;
  position: relative;
}
.menu-links span::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ff88ff, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.menu-links span:hover {
  text-shadow: 0 0 14px #ffaaff, 0 0 30px #cc44ff, 0 0 50px #8800ff;
  background: rgba(200, 100, 255, 0.08);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(200, 80, 255, 0.15);
}
.menu-links span:hover::after {
  opacity: 0.8;
}
.menu-links a {
  text-decoration: none;
  color: inherit;
}

.window {
  position: absolute;
  width: 390px;
  min-width: 260px;
  height: 285px;
  min-height: 190px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.55);
  resize: both;
  overflow: hidden;
  z-index: 2;
}
.window.active { z-index: 100; }
#updates-window { left: 16%; top: 8%; }
#currently-window { left: 46%; top: 6%; }
#notes-window { left: 30%; top: 52%; width: 360px; height: 245px; }
#ads-window {
  left: 66%;
  top: 60%;
  width: 320px;
  height: 224px;
  min-width: 200px;
  min-height: 150px;
  resize: both;
}
#contact-window {
  left: 50%;
  top: 30%;
  width: 340px;
  height: 200px;
  min-width: 280px;
  min-height: 160px;
  resize: both;
  display: none;
  z-index: 200;
}
#contact-window .contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 20px 16px;
  height: 100%;
  align-content: center;
  background: #d0d0d0;
  border: 2px solid #808080;
}
#contact-window .contact-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #c0c0c0;
  border: 2px solid #ffffff #808080 #808080 #ffffff;
  padding: 12px 6px;
  text-decoration: none;
  color: #000;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: bold;
  transition: all 0.15s;
  text-align: center;
  gap: 6px;
  border-radius: 2px;
}
#contact-window .contact-grid a:hover {
  background: #d8d8d8;
  border-color: #808080 #ffffff #ffffff #808080;
  transform: scale(1.02);
}
#contact-window .contact-grid a img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.titlebar {
  height: 24px;
  padding: 2px 3px 2px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #0879a8 0%, #2e9ec1 35%, #a8c9ff 68%, #e6a4ff 100%);
  color: #fff;
  font-family: Tahoma, "MS Sans Serif", sans-serif;
  font-size: 13px;
  font-weight: bold;
  cursor: grab;
}
.titlebar:active { cursor: grabbing; }
.window.inactive .titlebar {
  background: linear-gradient(90deg, #7e7e7e 0%, #a5a5a5 45%, #c5c5c5 100%);
}
.window-buttons { display: flex; gap: 2px; }
.window-button {
  width: 18px; height: 18px; padding: 0; margin: 0;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  background: #c0c0c0;
  color: #000;
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 14px;
  font-weight: bold;
  cursor: pointer;
}
.window-button:active {
  border-color: #404040 #fff #fff #404040;
  padding-left: 1px; padding-top: 1px;
}
.window-body {
  height: calc(100% - 24px);
  padding: 5px;
  background: #c0c0c0;
  display: flex;
  flex-direction: column;
}
.note-content {
  flex: 1;
  padding: 5px 7px;
  background: #fff;
  border: 2px solid;
  border-color: #404040 #fff #fff #404040;
  overflow: auto;
  font-family: "Courier New", monospace;
  font-size: 13px;
  line-height: 1.3;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #111;
}
.note-content ul {
  margin: 0;
  padding-left: 18px;
  list-style-type: none;
}
.note-content ul li {
  margin: 0;
  padding: 0;
  line-height: 1.3;
}
.note-content ul li:before {
  content: "› ";
  color: #666;
}
.note-content p {
  margin: 1px 0;
}
.note-content h2 {
  margin: 1px 0 3px 0;
  font-size: 15px;
}
.note-content a {
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
}
.note-content a:visited {
  color: #551a8b;
}
.note-content a:hover {
  text-decoration: none;
}
.note-content .blog-link {
  color: #0000ee;
  text-decoration: underline;
}
.note-content .blog-link:visited {
  color: #551a8b;
}
.note-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2px 0;
  font-size: 12px;
  line-height: 1.2;
}
.note-content th,
.note-content td {
  padding: 1px 4px;
  border: 1px solid #c0c0c0;
  vertical-align: top;
  text-align: left;
}
.note-content th {
  background: #e8e8e8;
  font-weight: bold;
}

.ads-content {
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  border: none;
}
#random-banner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 0;
  margin: 0;
  overflow: hidden;
}
#random-banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0;
  box-shadow: none;
  image-rendering: auto;
}
#random-banner a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.column-static {
  position: fixed;
  bottom: 90px;
  right: 130px;
  z-index: 8;
  width: 170px;
  height: auto;
  opacity: 0.9;
  transition: filter 0.2s, transform 0.2s;
  pointer-events: auto;
  filter: drop-shadow(0 0 8px #b78aff);
  cursor: pointer;
}
.column-static:hover {
  filter: drop-shadow(0 0 28px #ff77ff) drop-shadow(0 0 60px #b300ff);
  transform: scale(1.03);
}

#column-overlay {
  position: fixed;
  bottom: 100px;
  right: 140px;
  z-index: 9;
  display: none;
  gap: 8px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,200,255,0.3);
  box-shadow: 0 0 40px rgba(180,0,255,0.2);
  flex-wrap: wrap;
  justify-content: center;
}
#column-overlay a {
  display: inline-block;
  transition: all 0.2s;
  border-radius: 4px;
}
#column-overlay a:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 16px #ff66ff);
}
#column-overlay img {
  height: 31px;
  width: auto;
  image-rendering: pixelated;
}

#contact-icon-wrapper {
  position: fixed;
  top: 95px;
  right: 24px;
  z-index: 10;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px 8px 8px;
  border-radius: 6px;
  background: transparent;
  width: 96px;
}
#contact-icon-wrapper:active { cursor: grabbing; }
#contact-icon {
  width: 76px;
  height: auto;
  image-rendering: pixelated;
  pointer-events: none;
  display: block;
  filter: none;
}
#contact-icon-wrapper .icon-label {
  color: #fff;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  text-shadow: 0 0 10px #a855f7, 0 0 20px #7a2aff;
  letter-spacing: 1px;
  background: transparent;
  padding: 2px 14px;
  border-radius: 4px;
  border: none;
  pointer-events: none;
  margin-top: 2px;
}

.phone-simulator {
  position: fixed;
  left: 16px;
  bottom: 15px;
  z-index: 150;
}
.phone-simulator .phone-image {
  display: block;
  transition: filter 0.2s;
}
.phone-simulator .phone-image:hover {
  filter: drop-shadow(0 0 16px #ff44dd) drop-shadow(0 0 40px #aa00ff);
}
.phone-simulator .phone-text { position: absolute; }

.desktop-label {
  position: fixed;
  right: 18px; bottom: 14px;
  padding: 2px 5px;
  color: #fff;
  background: rgba(0,0,0,0.55);
  font: 11px "Courier New", monospace;
  letter-spacing: 1px;
  z-index: 5;
  transition: filter 0.2s;
}
.desktop-label:hover {
  filter: drop-shadow(0 0 12px #ff66ff) drop-shadow(0 0 30px #b300ff);
}

#music-player {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: rgba(8, 0, 20, 0.85);
  backdrop-filter: blur(10px);
  border-top: 2px solid rgba(200, 120, 255, 0.4);
  box-shadow: 0 -4px 40px rgba(150, 0, 255, 0.2);
  padding: 2px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  transition: none;
}
#music-player:hover {
  background: rgba(8, 0, 20, 0.85);
  border-top-color: rgba(200, 120, 255, 0.4);
}
#player-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
}
#player-container .wm-player {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px;
  background: rgba(0,0,0,0.15);
  border-radius: 20px;
  border: 1px solid rgba(200,120,255,0.08);
  height: 32px;
}
#player-container .wm-player .track-info {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 300px;
  min-width: 120px;
  font-size: 12px;
  color: #e8d0ff;
  text-shadow: 0 0 8px #a855f7;
  padding: 0 4px;
  text-align: left;
  font-family: 'Courier New', monospace;
}
#player-container .wm-player .progress-bar {
  flex: 1;
  min-width: 80px;
  height: 4px;
  background: rgba(100,60,180,0.25);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(200,150,255,0.08);
}
#player-container .wm-player .progress-bar .progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a855f7, #ff66ff);
  border-radius: 4px;
  transition: width 0.08s linear;
  box-shadow: 0 0 12px #a855f7;
}
#player-container .wm-player .controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
#player-container .wm-player .controls .btn {
  min-width: 26px;
  max-width: 30px;
  padding: 2px 4px;
  font-size: 12px;
  flex-shrink: 0;
  background: rgba(100,60,180,0.15);
  border: 1px solid rgba(200,150,255,0.1);
  border-radius: 14px;
  color: #d4b0ff;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Courier New', monospace;
  text-shadow: 0 0 6px #a855f7;
  line-height: 1;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#player-container .wm-player .controls .btn:hover {
  background: rgba(150,80,220,0.3);
  border-color: #c084fc;
  box-shadow: 0 0 16px rgba(150,80,255,0.15);
  transform: scale(1.05);
}
#player-container .wm-player .controls .btn-play { display: inline-flex; }
#player-container .wm-player .controls .btn-pause { display: none; }

.lang-switch {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 9999;
  display: flex;
  gap: 10px;
  background: rgba(10,0,20,0.4);
  backdrop-filter: blur(6px);
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid rgba(255,200,255,0.18);
  box-shadow: 0 0 20px rgba(180,0,255,0.08);
}
.lang-switch img {
  width: 32px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.5;
  border: 2px solid transparent;
}
.lang-switch img:hover {
  opacity: 1;
  transform: scale(1.1);
  border-color: #c084fc;
}
.lang-switch img.active {
  opacity: 1;
  border-color: #a855f7;
  box-shadow: 0 0 16px #a855f7;
}

@media (max-width: 700px) {
  .site-logo { width: 120px; top: 10px; left: 10px; }
  .menu-links { top: 80px; left: 12px; font-size: 15px; padding: 8px 12px; }
  .menu-links span { font-size: 15px; }
  .window { width: 82vw; height: 31vh; }
  #updates-window { left: 6vw; top: 15vh; }
  #currently-window { left: 10vw; top: 48vh; }
  #notes-window { left: 14vw; top: 68vh; width: 80vw; height: 26vh; }
  #ads-window { left: 48vw; top: 72vh; width: 48vw; height: 24vh; }
  #contact-window { left: 10vw; top: 25vh; width: 80vw; height: 40vh; }
  #contact-window .contact-grid { grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 12px; }
  #contact-window .contact-grid a { font-size: 11px; padding: 8px 4px; }
  #contact-window .contact-grid a img { width: 36px; height: 36px; }
  .phone-simulator { transform: scale(0.8); transform-origin: bottom left; }
  .column-static { width: 100px; right: 30px; bottom: 75px; }
  #column-overlay { right: 30px; bottom: 85px; padding: 6px 10px; }
  #column-overlay img { height: 24px; }
  #contact-icon-wrapper { top: 80px; right: 8px; width: 72px; padding: 4px 4px 6px 4px; z-index: 10; }
  #contact-icon { width: 58px; }
  #contact-icon-wrapper .icon-label { font-size: 11px; padding: 0 8px; }
  #music-player { padding: 2px 8px; height: 34px; }
  #player-container .wm-player { gap: 6px; padding: 2px 6px; height: 26px; }
  #player-container .wm-player .track-info { flex: 0 1 120px; min-width: 50px; font-size: 10px; }
  #player-container .wm-player .controls .btn { min-width: 22px; max-width: 26px; font-size: 10px; height: 18px; padding: 1px 3px; }
  #player-container .wm-player .progress-bar { min-width: 40px; height: 3px; }
  .lang-switch { top: 12px; right: 10px; gap: 6px; padding: 4px 10px; }
  .lang-switch img { width: 26px; height: 19px; }
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a, img, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid #ff88ff; outline-offset: 3px; }
.titlebar { touch-action: none; user-select: none; -webkit-user-select: none; }
.note-content { overflow-wrap: anywhere; -webkit-overflow-scrolling: touch; }
#random-banner img { max-width: 100%; max-height: 100%; object-fit: contain; }

@media (max-width: 760px) {
  html, body { min-width: 320px; min-height: 100%; height: auto; overflow-x: hidden; overflow-y: auto; background-attachment: scroll; }
  body { min-height: 1260px; padding-bottom: 54px; }
  .site-logo { top: max(10px, env(safe-area-inset-top)); left: 12px; width: clamp(92px, 26vw, 132px); max-width: 34vw; }
  .menu-links { top: 82px; left: 12px; gap: 3px; padding: 8px 10px; border-radius: 8px; font-size: 14px; letter-spacing: 1px; backdrop-filter: none; background: rgba(10, 0, 20, .86); }
  .menu-links span { padding: 5px 6px; font-size: 14px; letter-spacing: 1px; }
  .lang-switch { top: max(10px, env(safe-area-inset-top)); right: 10px; gap: 5px; }
  .lang-switch img { width: 27px; height: 20px; }
  .window { width: min(88vw, 420px); min-width: 0; height: 285px; min-height: 190px; max-width: calc(100vw - 16px); resize: both; }
  #updates-window { left: 5vw; top: 175px; }
  #currently-window { left: 9vw; top: 475px; width: min(82vw, 390px); height: 245px; }
  #notes-window { left: 5vw; top: 735px; width: min(88vw, 400px); height: 245px; }
  #ads-window { left: 12vw; top: 995px; width: min(76vw, 340px); height: 220px; min-width: 0; min-height: 160px; }
  #contact-window { position: fixed; top: 50%; left: 50%; width: min(92vw, 380px); height: 220px; min-width: 0; min-height: 180px; margin: 0; transform: translate(-50%, -50%); resize: none; }
  #contact-window .contact-grid { gap: 7px; padding: 8px; }
  #contact-window .contact-grid a { min-height: 88px; padding: 8px 4px; gap: 7px; font-size: 11px; }
  #contact-window .contact-grid a img { width: 36px; height: 36px; }
  .column-static { right: 16px; bottom: 58px; width: clamp(62px, 16vw, 100px); }
  #column-overlay { right: 12px; bottom: 104px; left: auto; max-width: calc(100vw - 24px); gap: 6px; padding: 8px; background: rgba(0, 0, 0, .94); backdrop-filter: none; }
  #column-overlay img { max-width: 88px; height: 31px; object-fit: contain; }
  #contact-icon-wrapper { top: 132px; right: 10px; width: 76px; min-height: 76px; padding: 6px; touch-action: none; }
  #contact-icon { width: 54px; }
  #contact-icon-wrapper .icon-label { font-size: 11px; letter-spacing: .5px; }
  .phone-simulator { position: fixed; z-index: 150; bottom: 43px; left: 8px; max-width: 92px; }
  .phone-simulator .phone-image { width: 92px; max-width: 100%; height: auto; }
  .desktop-label { right: 8px; bottom: 43px; max-width: 42vw; font-size: 9px; letter-spacing: .5px; }
  #music-player { position: fixed; z-index: 999; bottom: 0; height: calc(42px + env(safe-area-inset-bottom)); padding: 4px 7px max(4px, env(safe-area-inset-bottom)); }
  #player-container .wm-player { height: 30px; gap: 6px; padding: 2px 5px; }
  #player-container .wm-player .track-info { flex: 0 1 32vw; min-width: 44px; font-size: 10px; }
  #player-container .wm-player .progress-bar { min-width: 24px; }
  #player-container .wm-player .controls { gap: 2px; }
  #player-container .wm-player .controls .btn { min-width: 30px; min-height: 28px; padding: 3px 5px; }
}

@media (max-width: 390px) {
  .menu-links { max-width: 43vw; font-size: 12px; }
  .menu-links span { font-size: 12px; letter-spacing: .5px; }
  .window { width: calc(100vw - 20px); }
  #updates-window, #notes-window { left: 10px; }
  #currently-window { left: 18px; width: calc(100vw - 36px); }
  #ads-window { left: 12vw; width: 76vw; }
  #player-container .wm-player .track-info { flex-basis: 27vw; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .site-logo { top: 8px; width: 100px; }
  .menu-links { top: 64px; gap: 0; padding: 5px; }
  .menu-links span { padding: 2px 4px; }
  .phone-simulator, .desktop-label { display: none; }
  #contact-window { width: min(76vw, 420px); height: min(78vh, 220px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}