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

body {
  width: 100vw;
  height: 100vh;
  /* overflow: hidden; */ 
  cursor: auto;
  overflow-y: auto; /* Allow vertical scrolling */
  font-family: 'VT323', monospace; /* Apply pixel font */
}

.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

svg {
  width: 100%;
  height: 100%;
  /* filter: blur(30px);
  transform: scale(1.1);
  animation: gradient-motion 15s ease-in-out infinite; */
  image-rendering: pixelated; /* Ensure pixelated rendering */
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1.2);
  }
}

.bubble {
  animation: float 8s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-10px); /* Reduced vertical movement */
  }
}

.title {
  color: white;
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  font-family: 'VT323', monospace; /* Apply pixel font */
  letter-spacing: 2px;
  transition: transform 0.3s ease; /* Smooth transition for the hover effect */
  animation: rainbow 5s linear infinite;
}

.title:hover {
  transform: scale(1.05); /* Move the text up slightly on hover */
  animation: rainbow 5s linear infinite; /* Apply both shake and rainbow animations */
}

@keyframes shake {
  0% { transform: translateY(-5px) rotate(2deg); }
  100% { transform: translateY(-5px) rotate(-2deg); }
}

@keyframes red-rainbow {
  0% { color: hsl(0, 100%, 70%); }    /* Light Red */
  50% { color: hsl(0, 100%, 50%); }   /* Medium Red */
  100% { color: hsl(0, 100%, 70%); }   /* Light Red */
}

@keyframes rainbow {
  0% { color: hsl(0, 100%, 70%); }
  100% { color: hsl(0, 100%, 70%); }
}

.container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  min-width: 400px;
}

.url-input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  color: white;
  font-size: 1.1rem;
  width: 300px;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.url-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

.search-container {
  display: flex;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.search-input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  color: white;
  font-size: 1.1rem;
  width: 300px; /* Increased width */
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

.search-button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  image-rendering: pixelated; 
}

.search-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
  image-rendering: pixelated; 
  transform: scale(1.05); 
  transition: transform 0.2s ease, background 0.3s ease, border-color 0.3s ease; 
}

.open-button,
.links-button,
.games-button,
.chat-room-button,
.ai-art-button,
.cloak-button,
.cai-button,
.spotify-embed-button,
.youtube-embed-button,
.popup-blocked-message button,
.ai-chat-send-button,
.guide-button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  padding: 0.8rem 3rem;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  image-rendering: pixelated; 
}

.open-button:hover,
.links-button:hover,
.games-button:hover,
.chat-room-button:hover,
.ai-art-button:hover,
.cloak-button:hover,
.cai-button:hover,
.spotify-embed-button:hover,
.youtube-embed-button:hover,
.popup-blocked-message button:hover,
.ai-chat-send-button:hover,
.guide-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
  image-rendering: pixelated; 
  transform: scale(1.05); 
  transition: transform 0.2s ease, background 0.3s ease, border-color 0.3s ease; 
}

.spotify-menu-trigger {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.spotify-menu-trigger:hover {
  transform: scale(1.1);
}

.spotify-menu-trigger img {
  width: 40px;
  height: 40px;
}

.spotify-menu {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 999;
  transition: left 0.3s ease;
  border-right: 2px solid rgba(255, 255, 255, 0.1);
}

.spotify-menu.active {
  left: 0;
}

.spotify-menu-content {
  padding: 2rem;
  color: white;
}

.spotify-menu-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1DB954;
}

.spotify-url-input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  color: white;
  font-size: 1.1rem;
  width: 100%;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.spotify-url-input:focus {
  outline: none;
  border-color: #1DB954;
  background: rgba(255, 255, 255, 0.2);
}

.spotify-container {
  width: 100%;
  margin-top: 1rem;
}

.spotify-container iframe {
  border-radius: 12px;
  width: 100%;
  margin-bottom: 1rem;
}

.visitor-counter {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
}

.visitor-counter a {
  color: white;
  text-decoration: none;
  font-size: 12px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.visitor-counter a:hover {
  opacity: 1;
}

#show-code {
  margin-top: 10px;
}

#visitor-code {
  margin-bottom: 10px;
}

.visitor-counter pre {
  max-width: 300px;
  overflow-x: auto;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.youtube-menu-trigger {
  position: fixed;
  top: 80px;
  left: 20px;
  z-index: 1000;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.youtube-menu-trigger:hover {
  transform: scale(1.1);
}

.youtube-menu-trigger img {
  width: 40px;
  height: 40px;
}

.youtube-menu {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 999;
  transition: left 0.3s ease;
  border-right: 2px solid rgba(255, 255, 255, 0.1);
}

.youtube-menu.active {
  left: 0;
}

.youtube-menu-content {
  padding: 2rem;
  color: white;
}

.youtube-menu-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #FF0000;
}

.youtube-url-input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  color: white;
  font-size: 1.1rem;
  width: 100%;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.youtube-url-input:focus {
  outline: none;
  border-color: #FF0000;
  background: rgba(255, 255, 255, 0.2);
}

.youtube-container {
  width: 100%;
  margin-top: 1rem;
}

.youtube-container iframe {
  border-radius: 12px;
  width: 100%;
  margin-bottom: 1rem;
}

.chrome-apps-menu-trigger {
  position: fixed;
  top: 140px;
  left: 20px;
  z-index: 1000;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.chrome-apps-menu-trigger:hover {
  transform: scale(1.1);
}

.chrome-apps-menu-trigger img {
  width: 40px;
  height: 40px;
}

.chrome-apps-menu {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 999;
  transition: left 0.3s ease;
  border-right: 2px solid rgba(255, 255, 255, 0.1);
}

.chrome-apps-menu.active {
  left: 0;
}

.chrome-apps-menu-content {
  padding: 2rem;
  color: white;
}

.chrome-apps-menu-content h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem; 
  color: #4285F4;
  text-align: center; 
}

.theme-url-input {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  color: white;
  font-size: 1.1rem;
  width: 100%;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.theme-url-input:focus {
  outline: none;
  border-color: #4285F4;
  background: rgba(255, 255, 255, 0.2);
}

.theme-apply-button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  padding: 0.8rem 3rem;
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  image-rendering: pixelated;
  width: 100%; 
}

.theme-apply-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.4);
  image-rendering: pixelated;
  transform: scale(1.05);
  transition: transform 0.2s ease, background 0.3s ease, border-color 0.3s ease;
}

.snowflake {
  opacity: 0.8;
  animation: snowfall 6s linear infinite;
}

@keyframes snowfall {
  0% {
    transform: translateY(-10px);
    opacity: 0.8;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0.8;
  }
}

/* Dark mode styles */
body.dark-mode .container {
  background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .url-input,
body.dark-mode .spotify-url-input,
body.dark-mode .youtube-url-input {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .url-input:focus,
body.dark-mode .spotify-url-input:focus,
body.dark-mode .youtube-url-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: white;
  filter: none;
  transform: none;
  animation: none;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .background rect {
  filter: brightness(0.7) saturate(0.8);
}

body.dark-mode .bubble {
  opacity: 0.4;
}

body.dark-mode .spotify-menu,
body.dark-mode .youtube-menu,
body.dark-mode .chrome-apps-menu {
  background: rgba(0, 0, 0, 0.95);
}

.disclaimer {
  color: white; 
  font-size: 0.9rem;
  margin-top: 1rem;
  opacity: 0.8;
}

.popup-blocked-message {
  display: none;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1001;
  color: white;
  font-size: 1rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  animation: popup-animation 0.5s ease-out forwards;
}

.popup-blocked-message.show {
  display: block;
  visibility: visible;
}

@keyframes popup-animation {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    visibility: visible;
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

body.dark-mode .popup-blocked-message {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .popup-blocked-message button {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 25px;
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

body.dark-mode .popup-blocked-message button:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

/* AI Chatbox Styles */
.ai-chat-container {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  margin-top: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  height: 300px; 
  position: relative; /* Make container relative */
}

.ai-chat-container::before {
  content: "🤖";
  position: absolute;
  top: 10px;
  left: 10px;
  transition: transform 0.3s ease;
  font-size: 1.5rem;
}

.ai-chat-container:hover::before {
  transform: scale(1.2);
}

.ai-chat-display {
  flex-grow: 1;
  overflow-y: auto;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
}

.ai-chat-message {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-bottom: 0.5rem;
  width: fit-content;
  max-width: 70%;
}

.ai-chat-message.user {
  background: rgba(100, 149, 237, 0.3); 
  align-self: flex-end; 
}

.ai-chat-input-area {
  display: flex;
  margin-top: 0.5rem;
}

.ai-chat-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.8rem 1rem;
  color: white;
  font-size: 1.1rem;
  margin-right: 0.5rem;
  transition: all 0.3s ease;
}

.ai-chat-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

.ai-chat-container label {
  color: white;
  margin-bottom: 0.5rem;
  display: block;
}

.ai-chat-container select {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 0.5rem 1rem;
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  width: 100%;
  appearance: none; /* Remove default arrow */
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

.ai-chat-container select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .ai-chat-container {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .ai-chat-message {
  background: rgba(0, 0, 0, 0.5);
}

body.dark-mode .ai-chat-message.user {
  background: rgba(25, 25, 112, 0.5); 
}

body.dark-mode .ai-chat-input {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .ai-chat-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

body.dark-mode .ai-chat-send-button {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .ai-chat-send-button:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .ai-chat-container select {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .ai-chat-container select:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

/* Retro Clock Styles */
.retro-clock {
  position: absolute;
  top: 20px;
  right: 80px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 10px 15px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-family: 'VT323', monospace; 
  font-size: 1.5rem;
  letter-spacing: 5px;
  text-shadow: 2px 2px 3px rgba(0,0,0,0.3);
}

body.dark-mode .retro-clock {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

.secret-button-trigger {
  position: fixed;
  top: 200px;
  left: 20px;
  z-index: 1000;
  cursor: pointer;
  transition: transform 0.3s ease;
  background-image: url("https://i.ibb.co/mK78H4F/rvl8rstpk2451-1-removebg-preview.png");
  background-size: cover;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 10px;
}

.secret-button-trigger:hover {
  transform: scale(1.1);
}

.secret-menu {
  position: fixed;
  top: 0;
  left: -400px;
  width: 400px;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 999;
  transition: left 0.3s ease;
  border-right: 2px solid rgba(255, 255, 255, 0.1);
}

.secret-menu.active {
  left: 0;
}

.secret-menu-content {
  padding: 2rem;
  color: white;
}