@font-face { 
  font-family: 'SpongeBoy Font'; 
  src: url('https://file.garden/ZyKxtu8SZCpjP8Ah/Spongeboy%20Me%20Bob.ttf') format('truetype'); 
}
@font-face {
  font-family: 'Some Time Later';
  src: url('/Some Time Later.otf') format('opentype');
}
body { margin: 0; overflow: hidden; font-family: 'SpongeBoy Font', Arial, sans-serif; }
canvas { display: block; }
#ui, #credit, #subtitles, #transitionOverlay, #topicDisplay, #stopTopic, #walkingToggle, #watermark, #anyaiWatermark, #bubbleTransition, #uiToggle { position: absolute; }
#ui {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 15px;
  border-radius: 10px;
  align-items: center;
}
#topicInput {
  flex: 1;
  min-width: 200px;
  padding: 8px;
  border: 2px solid #FFA500;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 16px;
}
#ui button {
  background: #FFA500;
  color: black;
  border: none;
  border-radius: 5px;
  padding: 8px 15px;
  font-weight: bold;
  transition: all 0.3s ease;
}
#ui button:hover {
  background: #FF8C00;
  transform: scale(1.05);
}
#credit { bottom: 10px; left: 10px; color: rgba(255,255,255,0.5); font-size: 12px; z-index: 100; }
#subtitles { bottom: 50px; left: 50%; transform: translateX(-50%); color: white; padding: 10px; border-radius: 5px; font-size: 24px; text-align: center; max-width: 80%; z-index: 100; font-family: 'SpongeBoy Font', Arial, sans-serif; line-height: 1.4; }
#topicDisplay { 
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  border-left: 4px solid #FFA500;
  top: 85px; 
  z-index: 100; 
}
#stopTopic { 
  background: #ff4136 !important; 
  color: white !important; 
  font-weight: bold; 
  padding: 10px 20px; 
  border-radius: 8px; 
  border: 2px solid rgba(255,255,255,0.2);
  display: none; 
  z-index: 100; 
}
#settingsPopup, #creditsPopup, #scriptEditorPopup {
  background: rgba(0, 0, 0, 0.9);
  border: 2px solid #FFA500;
}
#settingsPopup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  border-radius: 10px;
  z-index: 1000;
  display: none;
  max-height: 80vh;
  overflow-y: auto;
  max-width: 90%;
  width: 400px;
}
#settingsPopup::-webkit-scrollbar {
  width: 8px;
}
#settingsPopup::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
#settingsPopup::-webkit-scrollbar-thumb {
  background: #FFA500;
  border-radius: 4px;
}
#settingsPopup::-webkit-scrollbar-thumb:hover {
  background: #FF8C00;
}
#settingsPopup label, #scriptEditorPopup h2, #creditsPopup h2 {
  color: #FFA500;
  margin-bottom: 8px;
}
#settingsPopup select,
#settingsPopup input[type="text"],
#settingsPopup input[type="number"],
#scriptEditorPopup textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #FFA500;
  background: rgba(255, 255, 255, 0.9);
}
#settingsPopup input[type="password"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #FFA500;
  background: rgba(255, 255, 255, 0.9);
}
#settingsPopup input[type="checkbox"] {
  margin-right: 10px;
}
.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
#transitionOverlay { top: 0; left: 0; width: 100%; height: 100%; background-color: black; display: none; justify-content: center; align-items: center; z-index: 1000; }
#transitionOverlay img { max-width: 100%; max-height: 100%; }
#walkingToggle { top: 50px; right: 10px; z-index: 100; }
#watermark { bottom: 10px; right: 10px; font-size: 16px; z-index: 100; font-family: Arial, sans-serif; transition: bottom 0.3s ease-in-out; cursor: pointer; }
#anyaiWatermark { bottom: 30px; right: 10px; font-size: 16px; z-index: 100; font-family: Arial, sans-serif; }
#watermark span, #anyaiWatermark span { font-weight: bold; }
#watermark .pine { color: #FFA500; }
#watermark .guy { color: #00FF00; }
#anyaiWatermark .any { color: #FF00FF; }
#anyaiWatermark .ai { color: #00FFFF; }
#bubbleTransition { top: 0; left: 0; width: 100%; height: 100%; display: none; z-index: 1001; }
#bubbleTransition img { width: 100%; height: 100%; object-fit: cover; }
#creditsPopup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  border-radius: 10px;
  z-index: 1000;
  display: none;
  color: white;
  font-family: 'SpongeBoy Font', Arial, sans-serif;
}
#creditsPopup ul {
  list-style-type: none;
  padding: 0;
}
#creditsPopup li {
  margin: 10px 0;
}
#creditsPopup a {
  color: #00FFFF;
  text-decoration: none;
}
#creditsPopup a:hover {
  text-decoration: underline;
}
#creditsPopup button {
  margin-top: 15px;
}
#scriptEditorPopup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.9);
  padding: 20px;
  border-radius: 10px;
  z-index: 1000;
  width: 80%;
  max-width: 600px;
  display: none;
}
#scriptEditorPopup textarea {
  font-family: monospace;
  resize: vertical;
  line-height: 1.4;
  width: 100%;
  height: 200px;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(255,255,255,0.9);
  border: 1px solid #FFA500;
  border-radius: 5px;
}
#scriptEditorPopup h2 {
  font-family: 'SpongeBoy Font', Arial, sans-serif;
  margin-top: 0;
}
#scriptEditorPopup button {
  font-family: 'SpongeBoy Font', Arial, sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #FFA500;
  color: black;
  border: none;
  border-radius: 5px;
  padding: 8px 15px;
  margin-right: 10px;
}
#scriptEditorPopup button:hover {
  transform: scale(1.05);
}
#scriptEditorPopup button#closeScriptEditor {
  background: #666;
  color: white;
}
.music-controls {
  margin-top: 15px;
  border-top: 1px solid #FFA500;
  padding-top: 15px;
}
.button-group {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}
.volume-control {
  margin: 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.volume-control input[type="range"] {
  flex: 1;
  height: 5px;
  border-radius: 5px;
  background: #FFA500;
  outline: none;
  -webkit-appearance: none;
}
.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #FFA500;
  cursor: pointer;
}
.volume-control span {
  min-width: 48px;
  color: #FFA500;
}
#nowPlaying {
  color: #FFA500;
  font-size: 14px;
  margin-top: 10px;
  font-style: italic;
}
#titleCard {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; 
  display: none;
  z-index: 1002;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
#titleCardImage, #upfrontTitleCard {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 1s ease;
}
#titleText {
  font-family: 'Some Time Later', sans-serif;
  font-size: 48px;
  color: #ffeb3b; 
  text-align: center;
  max-width: 80%;
  word-wrap: break-word;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  transition: opacity 1s ease;
}
#creditText {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  color: #000066; 
  font-family: 'Some Time Later', sans-serif;
  opacity: 0;
  transition: opacity 1s ease;
}
#creditText .made-by {
  font-size: 48px;
  margin-bottom: 10px;
}
#creditText .powered-by {
  font-size: 36px;
}
#loadingScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  font-family: 'SpongeBoy Font', Arial, sans-serif;
  color: white;
  font-size: 24px;
}
#loadingScreen .spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #FFA500;
  border-top: 5px solid transparent;
  border-radius: 50%;
  margin: 20px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#generationProgress {
  margin-top: 10px;
  font-size: 18px;
}
#parodyWatermark {
  position: fixed;
  top: 10px;
  right: 10px;
  background-color: rgba(255, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  z-index: 1000;
  pointer-events: none;
}
#remixInfoBtn {
  position: fixed;
  bottom: 50px;
  left: 10px;
  background-color: rgba(0,0,0,0.7);
  color: #FFA500;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #FFA500;
  cursor: pointer;
  z-index: 100;
  font-family: Arial, sans-serif;
}
#remixInfoBtn:hover {
  background-color: rgba(0,0,0,0.9);
}
#remixInfoPopup {
  position: absolute;
  bottom: 80px;
  left: 10px;
  max-width: 300px;
  background: rgba(0,0,0,0.9);
  border: 2px solid #FFA500;
  border-radius: 10px;
  padding: 15px;
  z-index: 1000;
  display: none;
  color: white;
  font-family: Arial, sans-serif;
}
#remixingNotice {
  position: fixed;
  bottom: 50px;
  left: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  z-index: 100;
  max-width: 250px;
  background-color: rgba(0,0,0,0.5);
  padding: 5px;
  border-radius: 5px;
  font-family: Arial, sans-serif;
}
#preloadPopup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  font-family: 'SpongeBoy Font', Arial, sans-serif;
  color: white;
}

#preloadPopup h2 {
  color: #FFA500;
  margin-bottom: 20px;
  font-size: 28px;
}

#preloadPopup p {
  margin-bottom: 25px;
  max-width: 400px;
  text-align: center;
}

#preloadPopup .button-group {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

#preloadPopup button {
  background: #FFA500;
  color: black;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-weight: bold;
  font-family: 'SpongeBoy Font', Arial, sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

#preloadPopup button:hover {
  transform: scale(1.05);
  background: #FF8C00;
}

#preloadPopup #skipPreloadBtn {
  background: #555;
  color: white;
}

#preloadProgress {
  margin-top: 20px;
  width: 80%;
  max-width: 400px;
  display: none;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #FFA500;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  color: #FFA500;
}

#episodePopup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.9);
  padding: 20px;
  border-radius: 10px;
  z-index: 1000;
  display: none;
  color: white;
  font-family: 'SpongeBoy Font', Arial, sans-serif;
  max-width: 80%;
  width: 500px;
}

#episodePopup h2 {
  color: #FFA500;
  margin-top: 0;
}

#episodeList {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
  border: 1px solid rgba(255,165,0,0.3);
  border-radius: 5px;
  padding: 10px;
  background: rgba(0,0,0,0.5);
}

#episodeList::-webkit-scrollbar {
  width: 8px;
}

#episodeList::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

#episodeList::-webkit-scrollbar-thumb {
  background: #FFA500;
  border-radius: 4px;
}

.episode-item {
  padding: 8px;
  margin-bottom: 5px;
  border-radius: 5px;
  background: rgba(255,165,0,0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.episode-item:hover {
  background: rgba(255,165,0,0.4);
}

.episode-metadata {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-top: 5px;
}
#discordLink {
  position: fixed;
  right: 10px;
  top: 10px;
  background: #5865F2;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 1000;
  font-family: Arial, sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
}

#discordLink:hover {
  background: #4752C4;
  transform: scale(1.05);
}

#discordLink img {
  width: 25px;
  height: 20px;
}