@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "MS UI Gothic", sans-serif;
}

.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.1) 2px,
      rgba(0, 0, 0, 0.1) 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 1px,
      rgba(0, 0, 0, 0.05) 1px,
      rgba(0, 0, 0, 0.05) 2px
    ),
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 70%,
      rgba(0, 0, 0, 0.2) 100%
    );
  animation: crtFlicker 0.15s infinite linear alternate;
}

@keyframes crtFlicker {
  0% {
    opacity: 1;
  }
  98% {
    opacity: 1;
  }
  99% {
    opacity: 0.98;
  }
  100% {
    opacity: 1;
  }
}

body {
  background: #2a2a2a
    url("https://i.pinimg.com/1200x/0a/16/bd/0a16bdfa188236a5ce4a86c66256957c.jpg")
    repeat;
  font-family: "MS UI Gothic", sans-serif;
  color: #ffffff;
  min-height: 100vh;
  overflow-x: hidden;
  animation: pageFloat 6s ease-in-out infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  filter: contrast(1.1) brightness(1.05) saturate(1.2);
}

@keyframes pageFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

.main-page {
  background: linear-gradient(
    to bottom,
    rgba(50, 50, 50, 0.95) 0%,
    rgba(30, 30, 30, 0.98) 50%,
    rgba(0, 0, 0, 0.95) 100%
  );
  border: 3px ridge #555;
  width: 95%;
  max-width: 800px;
  position: relative;
  z-index: 10;
  box-shadow:
    0 0 30px rgba(0, 0, 0, 0.8),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
  animation: windowFloat 8s ease-in-out infinite;
  min-height: 75vh;
  margin: auto;
}

@keyframes windowFloat {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.01);
  }
}

@keyframes navSlide {
  0%,
  100% {
    transform: translateX(0px) rotateY(0deg);
  }
  50% {
    transform: translateX(5px) rotateY(2deg);
  }
}

.window-title {
  background: linear-gradient(to bottom, #666 0%, #333 100%);
  border-bottom: 2px solid #000;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
  font-family: "MS UI Gothic", sans-serif;
  cursor: move;
  user-select: none;
}

.window-controls {
  display: flex;
  gap: 2px;
}

.window-btn {
  width: 18px;
  height: 16px;
  border: 1px outset #c0c0c0;
  background: #c0c0c0;
  font-size: 10px;
  text-align: center;
  line-height: 14px;
  cursor: pointer;
  color: black;
  font-weight: bold;
  font-family: "MS UI Gothic", sans-serif;
}

.window-btn:hover {
  background: #d0d0d0;
}

.window-btn:active {
  border: 1px inset #c0c0c0;
}

.header-section {
  background: url("https://i.pinimg.com/1200x/9f/8a/13/9f8a13dd737f8b12d108f7d831eabea4.jpg")
    center/cover;
  border: 2px solid #000;
  margin: 15px;
  padding: 15px;
  text-align: center;
  position: relative;
  overflow: hidden;
  height: 110px;
}

.header-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.header-section > * {
  position: relative;
  z-index: 2;
}

.site-title {
  font-family: "Cinzel", serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow:
    3px 3px 0px #000000,
    6px 6px 0px #333333,
    0 0 30px rgba(255, 255, 255, 0.3);
  margin-bottom: 5px;
  letter-spacing: 2px;
  text-transform: lowercase;
}

.subtitle-gif {
  width: 200px;
  height: 40px;
  background: url("")
    center/contain no-repeat;
  margin: 0 auto;
  display: block;
}

.main-content {
  padding: 30px 25px 60px 25px;
  min-height: 300px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 25px;
}

.welcome-section {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}

.welcome-box {
  flex: 1;
  background: rgba(0, 0, 0, 0.6);
  border: 2px ridge #555;
  padding: 20px;
  border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.welcome-box h2 {
  font-family: "Cinzel", serif;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 15px;
  text-shadow: 2px 2px 0px #000;
  letter-spacing: 1px;
}

.welcome-box p {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
  color: #ddd;
  font-family: "MS UI Gothic", sans-serif;
}

.welcome-box p:last-child {
  margin-bottom: 0;
}

.welcome-gif-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.welcome-gif {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.4);
  border: 2px ridge #555;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-gif img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 2px;
}

.visitor-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px ridge #555;
  padding: 6px 10px;
  border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.counter-label {
  font-size: 10px;
  color: #ccc;
  font-family: "MS UI Gothic", sans-serif;
  text-transform: lowercase;
}

.visitor-counter img {
  display: block;
}

.nav-bar {
  position: fixed;
  top: 35%;
  left: calc(50% - 550px);
  transform: translateY(-50%);
  width: 280px;
  height: 420px;
  background: linear-gradient(
    to bottom,
    rgba(50, 50, 50, 0.95) 0%,
    rgba(30, 30, 30, 0.98) 50%,
    rgba(0, 0, 0, 0.95) 100%
  );
  border: 3px ridge #555;
  z-index: 200;
  box-shadow:
    0 0 30px rgba(0, 0, 0, 0.8),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
  overflow: hidden;
  animation: navSlide 7s ease-in-out infinite;
  opacity: 0;
  pointer-events: none;
}

.nav-bar.hidden {
  opacity: 0;
  pointer-events: none;
}

.nav-bar.show {
  opacity: 1;
  pointer-events: all;
}

.nav-content {
  padding: 8px;
  height: calc(100% - 26px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.nav-content::-webkit-scrollbar {
  width: 12px;
}

.nav-content::-webkit-scrollbar-track {
  background: #2a2a2a;
  border: 1px inset #555;
}

.nav-content::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #666 0%, #333 100%);
  border: 1px outset #555;
  min-height: 15px;
}

.nav-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #777 0%, #444 100%);
}

.nav-section-title {
  font-size: 11px;
  font-weight: bold;
  color: #ccc;
  padding: 8px 10px 4px 10px;
  margin: 8px 0 4px 0;
  border-bottom: 1px solid #555;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0px #000;
  font-family: "MS UI Gothic", sans-serif;
}

.nav-section-title:first-child {
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  margin: 3px 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #555;
  text-decoration: none;
  color: #fff;
  transition: all 0.2s;
  cursor: pointer;
  font-size: 12px;
  min-height: 45px;
  font-family: "MS UI Gothic", sans-serif;
}

.nav-item:hover {
  background: rgba(100, 100, 100, 0.3);
  border-color: #777;
}

.nav-gif {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-gif img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 2px;
}

.nav-bottom-gif {
  width: 100%;
  height: auto;
  margin-top: 15px;
  opacity: 0.7;
  max-height: 120px;
  object-fit: contain;
  flex-shrink: 0;
}

.chat-box {
  position: fixed;
  top: 100px;
  right: calc(50% - 550px);
  width: 300px;
  height: 350px;
  background: linear-gradient(
    to bottom,
    rgba(50, 50, 50, 0.95) 0%,
    rgba(30, 30, 30, 0.98) 50%,
    rgba(0, 0, 0, 0.95) 100%
  );
  border: 3px ridge #555;
  z-index: 150;
  box-shadow:
    0 0 30px rgba(0, 0, 0, 0.8),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.chat-box.show {
  opacity: 1;
  pointer-events: all;
}

.chat-iframe-container {
  height: calc(100% - 25px);
  padding: 5px;
}

.chat-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.footer-info {
  text-align: center;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.9);
  border-top: 1px solid #333;
  font-size: 10px;
  color: #666;
  font-family: "MS UI Gothic", monospace;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.footer-info a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-info a:hover {
  color: #fff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.dragging {
  user-select: none;
  cursor: grabbing !important;
}

.nav-toggle-gif {
  position: fixed;
  top: 100px;
  left: calc(50% - 600px);
  width: 100px;
  height: 100px;
  cursor: pointer;
  z-index: 220;
  display: block;
  transition: all 0.2s ease;
  animation: navToggleFloat 3s ease-in-out infinite;
}

@keyframes navToggleFloat {
  0%,
  100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.05);
  }
}

.nav-toggle-gif img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 3px;
}

.nav-toggle-gif:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.nav-toggle-gif:active {
  transform: scale(0.95);
}

@media (max-width: 1400px) {
  .nav-bar {
    left: 20px;
  }

  .chat-box {
    right: 20px;
  }

  .nav-toggle-gif {
    left: 20px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .main-page {
    width: 100%;
    min-height: 80vh;
    max-width: 450px;
  }

  .header-section {
    height: 90px;
  }

  .site-title {
    font-size: 1.8rem;
    letter-spacing: 1px;
  }

  .subtitle-gif {
    width: 150px;
    height: 30px;
  }

  .welcome-section {
    flex-direction: column;
    align-items: center;
  }

  .welcome-gif {
    width: 150px;
    height: 150px;
  }

  .nav-bar {
    width: 240px;
    height: 320px;
    top: 20px;
    left: 5px;
    transform: none;
  }

  .chat-box {
    width: 280px;
    height: 300px;
    right: 10px;
    top: 80px;
  }

  .nav-item {
    font-size: 11px;
    padding: 8px 10px;
    min-height: 40px;
  }

  .nav-gif {
    width: 24px;
    height: 24px;
    margin-right: 10px;
  }

  .nav-toggle-gif {
    left: 10px;
    width: 60px;
    height: 60px;
  }
}