* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body, html {
  width: 100%;
  height: 100%;
  height: 100dvh; /* Modern dynamic mobile viewport */
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 15%, #121526 0%, #090a12 50%, #030305 100%);
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  user-select: none;
}

#bubbleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: auto;
}

#villageEasterEgg {
  position: fixed;
  z-index: 3;
  width: clamp(84px, 12vw, 140px);
  height: auto;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.35);
}

#villageEasterEgg.is-visible {
  animation: village-easter-egg-pop 1.4s ease-out forwards;
}

.bubble-counter {
  position: fixed;
  top: calc(1.5rem + env(safe-area-inset-top, 0px));
  left: calc(1.5rem + env(safe-area-inset-left, 0px));
  z-index: 100;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  color: #ffffff;
  background: rgba(18, 20, 32, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.bubble-counter-label {
  color: #a3a8b8;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#bubblePopCount {
  min-width: 1.5ch;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
}

@keyframes village-easter-egg-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(calc(var(--egg-rotation) - 8deg));
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(calc(var(--egg-rotation) + 4deg));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -62%) scale(0.9) rotate(var(--egg-rotation));
  }
}

/* --- Top-Right Social Dock --- */
.social-dock {
  position: fixed;
  top: calc(1.5rem + env(safe-area-inset-top, 0px));
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 20, 32, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #a3a8b8;
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

.social-btn.discord:hover, .social-btn.discord:active {
  color: #5865F2;
  border-color: rgba(88, 101, 242, 0.5);
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.4);
}

.social-btn.instagram:hover, .social-btn.instagram:active {
  color: #E1306C;
  border-color: rgba(225, 48, 108, 0.5);
  box-shadow: 0 0 20px rgba(225, 48, 108, 0.4);
}

/* --- Main Layout --- */
.main-container {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: calc(2.5rem + env(safe-area-inset-top, 0px)) 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

body.screensaver-active .main-container,
body.screensaver-active .social-dock,
body.screensaver-active .bubble-counter {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.screensaver-active #bubbleCanvas {
  cursor: none;
}

.logo-wrapper, 
.typing-text, 
.nav-links a {
  pointer-events: auto;
}

.logo-link {
  display: block;
  line-height: 0;
  text-decoration: none;
}

/* Top Section: Logo */
.top-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo-wrapper {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.08);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
}

.logo-wrapper:hover {
  transform: scale(1.08);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.25);
}

.logo-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Middle Section: Typing Effect */
.center-section {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0 0.5rem;
}

.typing-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.75rem, 6.8vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -1px;
  color: #f5f5f5;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
  min-height: 1.3em;
  word-break: break-word;
}

.cursor {
  display: inline-block;
  color: #00ffcc;
  animation: blink 0.8s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Bottom Section: Navigation Dock */
.bottom-section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 650px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  background: rgba(18, 20, 32, 0.6);
  padding: 0.85rem 1.4rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.nav-item {
  color: #a3a8b8;
  text-decoration: none;
  font-size: clamp(0.9rem, 2.4vw, 1.1rem);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.separator {
  color: rgba(255, 255, 255, 0.15);
  font-weight: 300;
  font-size: 1.1rem;
}

/* Hover Accent Colors */
.nav-yt:hover, .nav-yt:active {
  color: #ff334b;
  text-shadow: 0 0 16px rgba(255, 51, 75, 0.8);
  background: rgba(255, 51, 75, 0.12);
}

.nav-music:hover, .nav-music:active {
  color: #38bdf8;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.8);
  background: rgba(56, 189, 248, 0.12);
}

.nav-gta:hover, .nav-gta:active {
  color: #4ade80;
  text-shadow: 0 0 16px rgba(74, 222, 128, 0.8);
  background: rgba(74, 222, 128, 0.12);
}

.nav-mc:hover, .nav-mc:active {
  color: #c9884e;
  text-shadow: 0 0 16px rgba(201, 136, 78, 0.8);
  background: rgba(201, 136, 78, 0.14);
}

/* Mobile Screens (Galaxy S20, iPhones, etc.) */
@media (max-width: 600px) {
  .social-dock {
    top: calc(1rem + env(safe-area-inset-top, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
    gap: 0.5rem;
  }
  .social-btn {
    width: 38px;
    height: 38px;
  }
  .social-btn svg {
    width: 17px;
    height: 17px;
  }

  .logo-wrapper {
    width: 78px;
    height: 78px;
  }

  .nav-links {
    padding: 0.75rem 1rem;
    border-radius: 24px;
    gap: 0.4rem 0.5rem;
  }
  .nav-item {
    padding: 3px 6px;
    font-size: 0.85rem;
  }
  .separator {
    font-size: 0.9rem;
  }
}
.nav-swb:hover, .nav-swb:active {
  color: #8cff66;
  text-shadow: 0 0 16px rgba(140, 255, 102, 0.85);
  background: rgba(140, 255, 102, 0.12);
}
