@font-face {
  font-family: 'Jersey15';
  src: url('https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Jersey15-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  overflow: hidden;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif");
  background-repeat: repeat;
  background-size: 500px 500px;
  background-position: center center;
  font-family: 'Jersey15', sans-serif;
  color: #fff;
  user-select: none;
}

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  color: white;
  font-size: 3rem;
  font-family: 'Jersey15', sans-serif;
  text-align: center;
  padding: 20px;
}

#internet-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 200;
  color: white;
  font-size: 3rem;
  font-family: 'Jersey15', sans-serif;
  text-align: center;
  padding: 20px;
}

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20vw;
  transform: translate(-50%, -50%);
  animation: wiggle 2s ease-in-out infinite alternate;
  z-index: 2;
}

.nyan-wrapper {
  position: relative;
  width: 100%;
}

.rainbow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 50%;
  height: calc(20vw * 0.9);
  width: 100vw;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/picmix.com_2213354.gif");
  background-repeat: repeat-x;
  background-position: right center;
  background-size: auto 110%;
  animation: scrollRainbow 2s linear infinite;
  z-index: 1;
  pointer-events: none;
}

#nyan {
  width: 100%;
  position: relative;
  z-index: 2;
}

#nyan-timer {
  position: fixed;
  bottom: 15px;
  right: 15px;
  font-size: 2.5vw;
  text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff;
  z-index: 10;
  pointer-events: none;
  font-family: 'Jersey15', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.counter-unit {
  margin: 0.1em 0;
}

#mute-button {
  background: rgba(255, 0, 255, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.4rem;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}
#mute-button:hover {
  background: rgba(255, 0, 255, 1);
}

#minigames-button {
  background: rgba(0, 255, 255, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.4rem;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}
#minigames-button:hover {
  background: rgba(0, 255, 255, 1);
}

#skin-gallery-button {
  background: rgba(255, 105, 180, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.4rem;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}
#skin-gallery-button:hover {
  background: rgba(255, 105, 180, 1);
}

#device-toggle-button {
  background: rgba(100, 100, 255, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.4rem;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}
#device-toggle-button:hover {
  background: rgba(100, 100, 255, 1);
}
#device-toggle-button.mobile-mode {
  background: rgba(100, 255, 100, 0.8);
}
#device-toggle-button.mobile-mode:hover {
  background: rgba(100, 255, 100, 1);
}

#asset-gallery-button {
  background: rgba(255, 165, 0, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.4rem;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}
#asset-gallery-button:hover {
  background: rgba(255, 165, 0, 1);
}

#top-right-controls {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 10px;
}

#in-game-controls {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 95;
  display: none;
  align-items: center;
  gap: 10px;
}
#in-game-controls button {
  background: rgba(255, 0, 255, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.4rem;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}
#in-game-controls button:hover {
  background: rgba(255, 0, 255, 1);
}
#in-game-exit-button {
  background: rgba(255, 100, 100, 0.8);
}
#in-game-exit-button:hover {
  background: rgba(255, 100, 100, 1);
}

#music-select {
  background: rgba(255, 255, 0, 0.8);
  border: none;
  border-radius: 8px;
  color: #333;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.4rem;
  padding: 7px 10px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 1.2em;
}
#music-select:hover {
  background: rgba(255, 255, 0, 1);
}

#d-pad-controls {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 55;
  display: none;
  grid-template-areas:
    ". up ."
    "left . right"
    ". down .";
  grid-template-columns: 70px 70px 70px;
  grid-template-rows: 70px 70px 70px;
  gap: 5px;
  opacity: 0.7;
}
.d-pad-btn {
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid #fff;
  border-radius: 15px;
  font-size: 2.5rem;
  color: #333;
  cursor: pointer;
  user-select: none;
}
.d-pad-btn:active {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(0.95);
}
#d-pad-up { grid-area: up; }
#d-pad-down { grid-area: down; }
#d-pad-left { grid-area: left; }
#d-pad-right { grid-area: right; }

#action-button-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 55;
  display: none;
}
#action-button {
  width: 100px;
  height: 100px;
  background-color: rgba(255, 69, 0, 0.7);
  border: 3px solid #fff;
  border-radius: 50%;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 0 0 5px black;
}
#action-button:active {
  background-color: rgba(255, 69, 0, 1);
  transform: scale(0.95);
}

#minigame-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 50;
  color: white;
  font-family: 'Jersey15', sans-serif;
  overflow-y: auto;
  padding: 20px;
}
#minigame-menu h2 {
  font-size: 4rem;
  text-shadow: 0 0 10px #00ffff;
  margin-bottom: 2rem;
  flex-shrink: 0;
}
.minigame-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 70vh;
  overflow-y: auto;
  padding: 10px;
  width: 100%;
  max-width: 600px;
}
.minigame-option {
  background: rgba(0, 200, 200, 0.7);
  border: 2px solid #00ffff;
  border-radius: 10px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 2.5rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.minigame-option:hover {
  background: rgba(0, 255, 255, 1);
  transform: scale(1.05);
}
.minigame-option.disabled {
  background: rgba(100, 100, 100, 0.7);
  border-color: #aaa;
  cursor: not-allowed;
}

#asset-gallery-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  z-index: 150;
  color: white;
  font-family: 'Jersey15', sans-serif;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}
#asset-gallery-overlay h2 {
  font-size: 4rem;
  text-shadow: 0 0 10px #ffff00;
  margin-top: 1rem;
  margin-bottom: 2rem;
}
#asset-gallery-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
}
#close-asset-gallery, #download-all-assets, #view-in-file-garden {
  background: rgba(255, 100, 100, 0.7);
  border: 2px solid #ff6464;
  border-radius: 10px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#close-asset-gallery:hover, #download-all-assets:hover:not(:disabled), #view-in-file-garden:hover {
  background: rgba(255, 100, 100, 1);
  transform: scale(1.05);
}
#download-all-assets {
  background: rgba(100, 255, 100, 0.7);
  border-color: #64ff64;
}
#download-all-assets:hover:not(:disabled) {
  background: rgba(100, 255, 100, 1);
}
#download-all-assets:disabled {
  background: #555;
  border-color: #888;
  cursor: not-allowed;
  opacity: 0.7;
}
#view-in-file-garden {
  background: rgba(100, 100, 255, 0.7);
  border-color: #6464ff;
}
#view-in-file-garden:hover {
    background: rgba(100, 100, 255, 1);
}
#asset-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1600px;
  padding: 20px;
}
.asset-card {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid #ffff00;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}
.asset-preview {
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  background-color: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid #444;
}
.asset-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.asset-preview .audio-icon {
  font-size: 4rem;
}
.asset-info h3 {
  font-size: 1.5rem;
  margin: 0 0 10px 0;
  word-break: break-all;
}
.asset-info code {
  background: rgba(0,0,0,0.5);
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #eee;
  user-select: text;
  word-break: break-all;
  display: block;
}

#skin-gallery-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  z-index: 150;
  color: white;
  font-family: 'Jersey15', sans-serif;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}
#skin-gallery-overlay h2 {
  font-size: 4rem;
  text-shadow: 0 0 10px #ff69b4;
  margin-top: 1rem;
  margin-bottom: 2rem;
}
#close-skin-gallery {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 100, 100, 0.7);
  border: 2px solid #ff6464;
  border-radius: 10px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
#close-skin-gallery:hover {
  background: rgba(255, 100, 100, 1);
  transform: scale(1.05);
}
#skin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1600px;
  padding: 20px;
}
.skin-card {
  background: rgba(255, 255, 255, 0.1);
  border: 3px solid #ff69b4;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}
.skin-card.selected {
  border-color: #00ffff;
  transform: scale(1.05);
  box-shadow: 0 0 20px #00ffff;
}
.skin-card:not(.selected):hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.2);
}

.skin-preview {
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
  background-color: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid #444;
  overflow: hidden;
}
.skin-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.skin-card h4 {
  font-size: 1.8rem;
  margin: 0;
  color: #ffc0cb;
}

#maze-game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 45;
  display: none;
  justify-content: center;
  align-items: center;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
}
#maze-grid {
  display: grid;
  border: 5px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  position: relative;
}
.maze-cell {
  background-color: #1a0033; /* Wall color */
  position: relative;
}
.maze-cell.path {
  background-color: transparent;
}
.maze-cell.start {
  background-color: #00ff00;
}
.maze-cell.end {
  background-color: #ff00ff;
}
#maze-player {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyan.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 47;
}
#maze-ui {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  text-shadow: 0 0 10px #ff00ff;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 5px 20px;
  border-radius: 10px;
}
#maze-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
}
#maze-end-screen h2 {
  font-size: 5rem;
  text-shadow: 0 0 10px #00ffff;
}
#maze-end-screen p {
  font-size: 2.5rem;
}
#maze-end-screen button {
  background: rgba(0, 255, 255, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#maze-end-screen button:hover {
  background: rgba(0, 255, 255, 1);
}

#defender-game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 48;
  display: none;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  overflow: hidden;
}
#defender-player-rainbow-trail {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/picmix.com_2213354.gif");
  background-repeat: repeat-x;
  background-size: auto 100%;
  animation: scrollRainbow 0.5s linear infinite;
  z-index: 51;
  pointer-events: none;
  filter: grayscale(1);
  display: none;
}
#defender-planet {
  position: absolute;
  width: 30vw;
  height: 30vw;
  max-width: 400px;
  max-height: 400px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 49;
}
#defender-player {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/tacnayn.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 52;
  transition: top 0.05s linear;
  transform: scaleX(-1); /* Face right towards enemies */
}
.defender-enemy {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyan.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 50;
  transform: scaleX(-1); /* Face left towards planet */
}
.defender-bullet {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 50;
}
#defender-ui {
  position: fixed;
  top: 15px;
  left: 15px;
  font-size: 2rem;
  text-shadow: 0 0 5px #aa00aa;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 5px 20px;
  border-radius: 10px;
}
#defender-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#defender-end-screen h2 {
  font-size: 5rem;
  color: #aa00aa;
  text-shadow: 0 0 10px #ff00ff;
}
#defender-end-screen p {
  font-size: 2.5rem;
  color: white;
}
#defender-end-screen button {
  background-color: rgba(138, 43, 226, 0.8);
}
#defender-end-screen button:hover {
  background-color: rgba(138, 43, 226, 1);
}

#game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 40;
  display: none;
  overflow: hidden;
}
#player {
  position: absolute;
  width: 10vw; /* Responsive width */
  height: auto;
  transition: top 0.05s linear, left 0.05s linear;
  z-index: 42;
}
#player-rainbow-trail {
  position: absolute;
  height: 9vw; /* Responsive height */
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/picmix.com_2213354.gif");
  background-repeat: repeat-x;
  background-size: auto 100%;
  animation: scrollRainbow 0.5s linear infinite;
  z-index: 41;
  display: none;
  pointer-events: none;
}
.obstacle {
  position: absolute;
  width: 10vw; /* Responsive width */
  height: auto;
  z-index: 41;
}
#game-ui {
  position: fixed;
  top: 15px;
  left: 15px;
  font-size: 2rem;
  text-shadow: 0 0 5px #ff00ff;
  z-index: 50;
  display: none;
}
.game-over-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 60;
  text-align: center;
}
.game-over-screen h2 {
  font-size: 5rem;
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
}
.game-over-screen p {
  font-size: 2.5rem;
}
.game-over-screen button {
  background: rgba(255, 0, 255, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
.game-over-screen button:hover {
  background: rgba(255, 0, 255, 1);
}

#parkour-game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 44;
  display: none;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  overflow: hidden;
}
#parkour-player {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyan.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 46;
  transition: transform 0.1s linear; /* For flipping direction */
}
.parkour-platform {
  position: absolute;
  background-color: #33ff33;
  border: 3px solid #ccffcc;
  border-radius: 10px;
  box-shadow: 0 0 15px #33ff33;
  z-index: 45;
}
#parkour-finish-line {
  position: absolute;
  background-color: #ff00ff;
  border: 3px solid #ffccff;
  border-radius: 10px;
  box-shadow: 0 0 15px #ff00ff;
  z-index: 45;
}
#parkour-finish-line::after {
  content: 'FINISH';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 2rem;
  text-shadow: 0 0 5px black;
}
#parkour-ui {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  text-shadow: 0 0 10px #33ff33;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 5px 20px;
  border-radius: 10px;
  text-align: center;
}
#parkour-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#parkour-end-screen h2 {
  font-size: 5rem;
  text-shadow: 0 0 10px #33ff33;
}
#parkour-end-screen p {
  font-size: 2.5rem;
  color: white;
}
#parkour-end-screen button {
  background: rgba(51, 255, 51, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#parkour-end-screen button:hover {
  background: rgba(51, 255, 51, 1);
}

#poptart-game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 47;
  display: none;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  overflow: hidden;
}
#poptart-player {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyan.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 49;
  bottom: 2%;
}
#poptart-ui {
  position: fixed;
  top: 15px;
  left: 15px;
  font-size: 2rem;
  text-shadow: 0 0 5px #ff00ff;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 5px 20px;
  border-radius: 10px;
}
#poptart-spawner {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/tacnayn.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 50;
  top: 1%;
  transform: scaleX(-1);
}
.poptart-item {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 48;
}
#poptart-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#poptart-end-screen h2 {
  font-size: 5rem;
  text-shadow: 0 0 10px #ff00ff;
}
#poptart-end-screen p {
  font-size: 2.5rem;
}
#poptart-end-screen button {
  background: rgba(255, 105, 180, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#poptart-end-screen button:hover {
  background: rgba(255, 105, 180, 1);
}

#quiz-game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 47;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  overflow: auto;
  padding: 20px;
  box-sizing: border-box;
}
#quiz-content {
  background: rgba(0,0,0,0.7);
  padding: 2rem 3rem;
  border-radius: 20px;
  border: 3px solid #00ffff;
  box-shadow: 0 0 20px #00ffff;
  max-width: 90vw;
  width: 800px;
  text-align: center;
}
#quiz-question {
  font-size: 2.5rem;
  min-height: 100px;
  margin-bottom: 2rem;
  color: #fff;
}
#quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.quiz-option-btn {
  background: rgba(0, 200, 200, 0.7);
  border: 2px solid #00ffff;
  border-radius: 10px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.quiz-option-btn:not(:disabled):hover {
  background: rgba(0, 255, 255, 1);
  transform: scale(1.02);
}
.quiz-option-btn:disabled {
  cursor: not-allowed;
}
.quiz-option-btn.correct {
  background: #22c55e !important;
  border-color: #86efac !important;
}
.quiz-option-btn.incorrect {
  background: #ef4444 !important;
  border-color: #fca5a5 !important;
}
#quiz-ui {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  text-shadow: 0 0 5px #00ffff;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 5px 20px;
  border-radius: 10px;
}
#quiz-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#quiz-end-screen h2 {
  font-size: 5rem;
  text-shadow: 0 0 10px #00ffff;
}
#quiz-end-screen p {
  font-size: 2.5rem;
  color: white;
}
#quiz-end-screen button {
  background: rgba(0, 255, 255, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#quiz-end-screen button:hover {
  background: rgba(0, 255, 255, 1);
}

#meow-cards-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 46;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* Allow UI to sit above grid */
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
}

#meow-cards-grid {
  display: grid;
  gap: 1.5vmin;
  perspective: 1000px;
}
.meow-card {
  width: 20vmin;
  height: 20vmin;
  max-width: 150px; /* Cap max size */
  max-height: 150px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s, opacity 0.5s ease-in, filter 0.3s;
  cursor: pointer;
}
.meow-card.flipped {
  transform: rotateY(180deg);
}
.meow-card.matched {
  cursor: default;
  opacity: 0;
  pointer-events: none;
}
.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.card-back {
  background: linear-gradient(45deg, #ff00ff, #00ffff);
  border: 3px solid white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10vmin; /* Responsive font size */
  color: white;
  text-shadow: 0 0 5px black;
}
.card-front {
  background-color: #fff;
  border: 3px solid #ccc;
  transform: rotateY(180deg);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.card-front img {
  width: 90%;
  height: 90%;
  object-fit: contain;
}
#meow-cards-ui {
  position: relative; /* Changed from fixed */
  transform: none;
  left: auto;
  top: auto;
  margin-bottom: 20px;
  font-size: 3rem;
  text-shadow: 0 0 10px #ff00ff;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 5px 20px;
  border-radius: 10px;
  text-align: center;
}
#meow-cards-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#meow-cards-end-screen h2 {
  font-size: 5rem;
  text-shadow: 0 0 10px #ff00ff;
}
#meow-cards-end-screen p {
  font-size: 2.5rem;
  color: white;
}
#meow-cards-end-screen button {
  background: rgba(255, 0, 255, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#meow-cards-end-screen button:hover {
  background: rgba(255, 0, 255, 1);
}

#hide-and-seek-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 49;
  display: none;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  overflow: hidden;
}
.tree-object {
  position: absolute;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  z-index: 52; /* Above hidden nyan */
}
.tree-object:hover {
  transform: scale(1.05);
}
.tree-object.shake {
  animation: shake-wrong 0.5s ease-in-out;
}
#hidden-nyan {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyan.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 51; /* Behind trees */
  transition: transform 0.5s ease, opacity 0.5s ease;
  pointer-events: none; /* Can't click on nyan directly */
  opacity: 0; /* Initially hidden */
}
#hide-and-seek-ui {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  text-shadow: 0 0 10px #33ff33;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 5px 20px;
  border-radius: 10px;
  text-align: center;
}
#hide-and-seek-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#hide-and-seek-end-screen h2 {
  font-size: 5rem;
  text-shadow: 0 0 10px #33ff33;
}
#hide-and-seek-end-screen p {
  font-size: 2.5rem;
  color: white;
}
#hide-and-seek-end-screen button {
  background: rgba(51, 255, 51, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#hide-and-seek-end-screen button:hover {
  background: rgba(51, 255, 51, 1);
}

#nyaa-voice-memory-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 49;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  overflow: hidden;
}
#nyaa-voice-content {
  background: rgba(0,0,0,0.8);
  padding: 3rem 4rem;
  border-radius: 20px;
  border: 3px solid #ff69b4;
  box-shadow: 0 0 30px #ff69b4;
  text-align: center;
  max-width: 90vw;
  width: 600px;
}
#nyaa-voice-title {
  font-size: 3rem;
  color: #ff69b4;
  text-shadow: 0 0 10px #ff69b4;
  margin-bottom: 2rem;
}
#nyaa-voice-sequence {
  min-height: 60px;
  font-size: 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.sequence-item {
  background: rgba(255, 105, 180, 0.3);
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid #ff69b4;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.5rem;
  animation: pulse-glow 1s ease-in-out;
}
#nyaa-voice-labelledby {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.nyaa-voice-btn {
  background: rgba(255, 105, 180, 0.7);
  border: 2px solid #ff69b4;
  border-radius: 10px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}
.nyaa-voice-btn:not(:disabled):hover {
  background: rgba(255, 105, 180, 1);
  transform: scale(1.05);
  box-shadow: 0 0 15px #ff69b4;
}
.nyaa-voice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.nyaa-voice-btn.playing {
  background: #ff1493 !important;
  transform: scale(1.1) !important;
  box-shadow: 0 0 20px #ff1493 !important;
}
#nyaa-voice-instructions {
  font-size: 1.5rem;
  color: #fff;
  font-style: italic;
}
#nyaa-voice-ui {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  text-shadow: 0 0 10px #ff69b4;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 10px 30px;
  border-radius: 10px;
  text-align: center;
}
#nyaa-voice-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#nyaa-voice-end-screen h2 {
  font-size: 5rem;
  color: #ff69b4;
  text-shadow: 0 0 10px #ff69b4;
}
#nyaa-voice-end-screen p {
  font-size: 2.5rem;
  color: white;
}
#nyaa-voice-end-screen button {
  background: rgba(255, 105, 180, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#nyaa-voice-end-screen button:hover {
  background: rgba(255, 105, 180, 1);
}

#tic-tac-nyan-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  display: none;
  justify-content: center;
  align-items: center;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  padding: 1vmin;
  box-sizing: border-box;
}

#tic-tac-nyan-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2vmin;
    width: 100%;
    height: 100%;
}

#tic-tac-nyan-board-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#tic-tac-nyan-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 75vmin;
  height: 75vmin;
  max-width: 450px;
  max-height: 450px;
  gap: 10px;
  background: rgba(0,0,0,0.5);
  border: 5px solid #ffaa00;
  padding: 10px;
  border-radius: 15px;
  box-shadow: 0 0 20px #ffaa00;
}

.tic-tac-nyan-cell {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  background-size: 80%;
  background-position: center;
  background-repeat: no-repeat;
}

.tic-tac-nyan-cell:hover:not(.occupied) {
  background-color: rgba(255, 255, 255, 0.4);
}

.tic-tac-nyan-cell.playerO {
  /* background-image is now set by JS */
  cursor: not-allowed;
  opacity: 1 !important;
}

.tic-tac-nyan-cell.playerX {
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/tacnayn.gif");
  transform: scaleX(-1); /* Make Tac Nayn face left */
  cursor: not-allowed;
  opacity: 1 !important;
}

.tic-tac-nyan-cell.win-cell {
    animation: win-pulse 1s infinite;
    background-color: rgba(255, 255, 0, 0.3);
}

@keyframes win-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 0, 0.7); }
    70% { box-shadow: 0 0 20px 10px rgba(255, 255, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 0, 0); }
}

#tic-tac-nyan-status {
  font-size: 3rem;
  margin-top: 2rem;
  text-shadow: 0 0 10px #ffaa00;
}

#tic-tac-nyan-next-round-btn {
  background: rgba(255, 170, 0, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.3s ease;
}

#tic-tac-nyan-next-round-btn:hover {
  background: rgba(255, 170, 0, 1);
}

#tic-tac-nyan-ui {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.5rem;
  text-shadow: 0 0 10px #ffaa00;
  z-index: 55;
  background: rgba(0,0,0,0.5);
  padding: 10px 30px;
  border-radius: 10px;
  text-align: center;
  display: none;
  gap: 20px;
}

#tic-tac-nyan-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#tic-tac-nyan-end-screen h2 {
  font-size: 5rem;
  color: #ffaa00;
  text-shadow: 0 0 10px #ffaa00;
}
#tic-tac-nyan-end-screen p {
  font-size: 2.5rem;
  color: white;
}
#tic-tac-nyan-end-screen button {
  background: rgba(255, 170, 0, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#tic-tac-nyan-end-screen button:hover {
  background: rgba(255, 170, 0, 1);
}

#annoy-tac-nayn-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 48;
  display: none;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  overflow: hidden;
}
#annoy-tac-nayn-target {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/tacnayn.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s ease;
}
#annoy-tac-nayn-target:hover {
  transform: scale(1.05);
}
#annoy-tac-nayn-target.clicked {
  animation: annoy-shake 0.5s ease-in-out;
}
#annoy-tac-nayn-target.angry {
  filter: hue-rotate(0deg) saturate(1.5) brightness(1.2);
  animation: angry-pulse 1s infinite;
}
#annoy-tac-nayn-target.furious {
  filter: hue-rotate(20deg) saturate(2) brightness(1.5);
  animation: furious-shake 0.2s infinite;
}
#annoy-click-effect {
  position: absolute;
  pointer-events: none;
  z-index: 51;
  font-size: 2rem;
  font-family: 'Jersey15', sans-serif;
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
  opacity: 0;
  transition: all 0.5s ease-out;
}
#annoy-tac-nayn-ui {
  position: fixed;
  top: 15px;
  left: 15px;
  font-size: 2rem;
  text-shadow: 0 0 5px #ff0000;
  z-index: 55;
  display: none;
  background: rgba(0,0,0,0.5);
  padding: 5px 20px;
  border-radius: 10px;
}
#annoy-tac-nayn-end-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 70;
  text-align: center;
  font-family: 'Jersey15', sans-serif;
}
#annoy-tac-nayn-end-screen h2 {
  font-size: 5rem;
  color: #ff0000;
  text-shadow: 0 0 10px #ff0000;
}
#annoy-tac-nayn-end-screen p {
  font-size: 2.5rem;
  color: white;
}
#annoy-tac-nayn-end-screen button {
  background: rgba(255, 0, 0, 0.8);
  border: none;
  border-radius: 8px;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.8rem;
  padding: 10px 20px;
  cursor: pointer;
  margin: 10px;
  transition: background 0.3s ease;
}
#annoy-tac-nayn-end-screen button:hover {
  background: rgba(255, 0, 0, 1);
}

@keyframes annoy-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px) rotate(-5deg); }
  75% { transform: translateX(10px) rotate(5deg); }
}

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

@keyframes furious-shake {
  0%, 100% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-5px) translateY(-5px); }
  50% { transform: translateX(5px) translateY(-5px); }
  75% { transform: translateX(-5px) translateY(5px); }
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px #ff69b4; transform: scale(1); }
  50% { box-shadow: 0 0 20px #ff69b4; transform: scale(1.05); }
  100% { box-shadow: 0 0 5px #ff69b4; transform: scale(1); }
}

@keyframes wiggle {
  0% {
    transform: translate(-65%, -50%);
  }
  100% {
    transform: translate(-35%, -50%);
  }
}

@keyframes scrollRainbow {
  from {
    background-position: right center;
  }
  to {
    background-position: left center;
  }
}

@keyframes shake-wrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.container,
#nyan-timer {
  opacity: 0;
  transition: opacity 0.5s ease;
}
body.loaded .container,
body.loaded #nyan-timer {
  opacity: 1;
}

.character-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 35vmin;
    max-width: 200px;
    background: rgba(0,0,0,0.4);
    padding: 20px;
    border-radius: 15px;
}

.character-name {
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 0 5px #fff;
}

#nyan-area .character-name { color: #00ffff; }
#tac-area .character-name { color: #ff5555; }

#tic-tac-nyan-nyan-char, #tic-tac-nyan-tac-char {
    width: 100%;
    height: auto;
}

#tic-tac-nyan-tac-char {
    transform: scaleX(-1);
}

.piece-stock {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

.stock-piece {
    width: 100%;
    padding-bottom: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 5px;
    background-color: rgba(255,255,255,0.1);
    transition: opacity 0.3s ease;
}

.stock-piece.used {
    opacity: 0.2;
}

.moving-piece {
    position: fixed;
    z-index: 100;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.5s cubic-bezier(0.5, -0.5, 0.5, 1.5);
    pointer-events: none;
}

/* Responsive layout for Tic-Tac-Nyan */
@media (orientation: landscape) {
    #tic-tac-nyan-content {
        flex-direction: row;
    }
    #tic-tac-nyan-board {
        width: 50vh;
        height: 50vh;
    }
    .character-area {
        width: 18vw;
    }
}

@media (orientation: portrait) {
    #tic-tac-nyan-content {
        flex-direction: column;
    }
     .character-area {
        flex-direction: row;
        width: 90%;
        max-width: 450px;
        height: auto;
        gap: 10px;
    }
    .character-area .piece-stock {
        flex-grow: 1;
    }
    #tic-tac-nyan-nyan-char, #tic-tac-nyan-tac-char {
        width: 80px;
        flex-shrink: 0;
    }
     #tic-tac-nyan-board {
        width: 80vw;
        height: 80vw;
    }
    #nyan-area { order: 1; }
    #tic-tac-nyan-board-area { order: 2; }
    #tac-area { order: 3; }
}

#ai-chat-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 51;
  display: none;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
}

#ai-chat-character-select {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px 40px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  align-items: center;
}

#ai-chat-mode-select {
    background: rgba(0,0,0,0.6);
    padding: 10px;
    border-radius: 12px;
    border: 2px solid #ff1493;
    display: flex;
    gap: 10px;
}
#ai-chat-mode-select button {
    font-family: 'Jersey15', sans-serif;
    font-size: 1.5rem;
    padding: 8px 15px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    background: #555;
    color: white;
    transition: all 0.3s ease;
}
#ai-chat-mode-select button.active {
    background: #ff1493;
    border-color: white;
}

#ai-chat-together-participants-select {
    background: rgba(0,0,0,0.6);
    padding: 10px;
    border-radius: 12px;
    border: 2px solid #00ffff;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}
.participant-count-btn {
    font-family: 'Jersey15', sans-serif;
    font-size: 1.5rem;
    padding: 8px 15px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    background: #555;
    color: white;
    transition: all 0.3s ease;
    min-width: 50px;
}
.participant-count-btn.active {
    background: #00ffff;
    border-color: white;
    color: #111;
}

#ai-chat-character-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  flex-grow: 1;
  overflow-y: auto;
  justify-items: center;
  padding: 10px;
}

.ai-char-card {
  background: rgba(0,0,0,0.6);
  border: 2px solid #ff1493;
  border-radius: 10px;
  padding: 15px;
  width: 100%;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px #ff1493;
}
.ai-char-card.selected {
  transform: scale(1.05);
  box-shadow: 0 0 20px #00ffff;
  border-color: #00ffff;
}
.ai-char-card:hover {
  transform: scale(1.05);
  background: rgba(0,0,0,0.8);
}
.ai-char-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 10px;
}
.ai-char-card h4 {
  font-size: 1.8rem;
  margin: 0;
  color: #ff69b4;
}

#ai-chat-together-start-bar {
  background: rgba(0,0,0,0.7);
  padding: 15px;
  border-radius: 15px;
  border: 2px solid #ff1493;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 90%;
  max-width: 1000px;
  box-sizing: border-box;
}

#ai-chat-together-start-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

#ai-chat-together-topic-input {
  padding: 12px 15px;
  border-radius: 10px;
  border: 2px solid #ff69b4;
  background: #222;
  color: white;
  font-size: 1.2rem;
  font-family: 'Jersey15', sans-serif;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
#ai-chat-together-topic-input::placeholder {
  color: #aaa;
}

#ai-chat-together-slots {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 450px;
}
.together-slot {
  width: 70px;
  height: 70px;
  background: rgba(255,255,255,0.1);
  border: 2px dashed #ff69b4;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: #ff69b4;
  position: relative;
  overflow: hidden;
}
.together-slot .placeholder {
  display: block;
}
.together-slot .slot-img {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.together-slot.filled .placeholder {
  display: none;
}
.together-slot.filled .slot-img {
  display: block;
}

#ai-chat-start-together-btn {
  background: #ff1493;
  border: none;
  color: white;
  padding: 15px 25px;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#ai-chat-start-together-btn:hover:not(:disabled) {
  background: #c71585;
}
#ai-chat-start-together-btn:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.7;
}

#ai-chat-screen {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(0,0,0,0.75);
  box-shadow: 0 0 20px black;
}

#ai-chat-header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: rgba(0,0,0,0.5);
  border-bottom: 2px solid #ff1493;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  gap: 15px;
}
#ai-chat-back-btn {
  background: rgba(255, 105, 180, 0.7);
  border: 2px solid #ff69b4;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.2rem;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 15px;
  transition: all 0.3s ease;
}
#ai-chat-back-btn:hover {
  background: rgba(255, 105, 180, 1);
}
#ai-chat-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: contain;
  margin-right: 15px;
  background: rgba(255,255,255,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#ai-chat-name {
  flex-grow: 1;
  font-size: 2rem;
  margin: 0;
  color: #ff69b4;
  text-shadow: 0 0 5px #ff1493;
}

#ai-chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.chat-message {
  display: flex;
  gap: 10px;
  max-width: 80%;
  align-items: flex-start;
}
.chat-message .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  margin-top: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.message-content {
    display: flex;
    flex-direction: column;
}
.speaker-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 4px;
    padding: 0 12px;
}
.chat-message.ai .speaker-name {
    color: #ff69b4;
}
.chat-message.ai.char2 .speaker-name {
    color: #00aaff;
}
.chat-message.user .speaker-name {
    color: #90EE90; /* Light green */
    text-align: right;
}

.chat-message .text {
  padding: 12px 15px;
  border-radius: 15px;
}
.chat-message.ai .text {
  background: #3c3c3c;
  border-bottom-left-radius: 3px;
  color: #fff;
}
.chat-message.ai.char2 .text {
  background: #2a2a4a;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 3px;
  color: #fff;
}
.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.chat-message.user .text {
  background: #005c4b;
  color: white;
  border-bottom-right-radius: 3px;
  border-bottom-left-radius: 15px;
}
.chat-message.user .avatar {
  display: none;
}
.chat-message.typing .text {
    display: flex;
    align-items: center;
}
.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.view-prompt-btn {
  background: rgba(100, 100, 255, 0.7);
  border: 2px solid #a0a0ff;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.2rem;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.view-prompt-btn:hover {
  background: rgba(100, 100, 255, 1);
}

#ai-chat-input-container {
  display: flex;
  padding: 15px;
  border-top: 2px solid #ff1493;
  background: rgba(0,0,0,0.5);
  flex-shrink: 0;
  gap: 10px;
}
#ai-chat-input {
  flex-grow: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #555;
  background: #333;
  color: white;
  font-size: 1.2rem;
  font-family: Arial, sans-serif;
  resize: none;
  height: 50px;
}
#ai-chat-send-btn {
  background: #ff1493;
  border: none;
  color: white;
  padding: 0 25px;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#ai-chat-send-btn:hover {
  background: #c71585;
}
#ai-chat-send-btn:disabled {
  background: #555;
  cursor: not-allowed;
}

#ai-chat-together-screen {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(0,0,0,0.75);
  box-shadow: 0 0 20px black;
}

#ai-chat-together-header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: rgba(0,0,0,0.5);
  border-bottom: 2px solid #00ffff;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  gap: 15px;
}
#ai-chat-together-header-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-grow: 1;
}

#ai-chat-together-header-avatars .header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255,255,255,0.1);
    border: 2px solid #00ffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#ai-chat-together-header-avatars .header-avatar.user-avatar {
    border-color: #90EE90;
    box-shadow: 0 0 10px #90EE90;
}

#ai-chat-together-back-btn {
  background: rgba(0, 200, 200, 0.7);
  border: 2px solid #00ffff;
  color: white;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.2rem;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}
#ai-chat-together-back-btn:hover {
  background: rgba(0, 255, 255, 1);
}

#ai-chat-together-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#ai-chat-together-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  border-top: 2px solid #00ffff;
  background: rgba(0,0,0,0.5);
  flex-shrink: 0;
  gap: 10px;
}

#ai-chat-together-input {
  flex-grow: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #555;
  background: #333;
  color: white;
  font-size: 1.2rem;
  font-family: Arial, sans-serif;
  resize: none;
  height: 50px;
}
#ai-chat-together-input:disabled {
    background-color: #222;
    cursor: not-allowed;
}

#ai-chat-together-send-btn, #ai-chat-restart-together-btn {
  background: #00ffff;
  border: none;
  color: #111;
  padding: 0 25px;
  height: 50px;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

#ai-chat-together-send-btn:hover:not(:disabled), #ai-chat-restart-together-btn:hover {
  background: #00cccc;
}

#ai-chat-together-send-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

#prompt-viewer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
    font-family: 'Jersey15', sans-serif;
}
#prompt-viewer-content {
    background: rgba(10, 0, 20, 0.95);
    border: 3px solid #ffaa00;
    box-shadow: 0 0 20px #ffaa00;
    border-radius: 15px;
    padding: 2rem;
    max-width: 90vw;
    width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
#prompt-viewer-content h2 {
    font-size: 3rem;
    color: #ffaa00;
    text-shadow: 0 0 10px #ffaa00;
    margin: 0 0 1.5rem 0;
    text-align: center;
}
#prompt-viewer-text {
    background: rgba(0,0,0,0.5);
    padding: 1rem;
    border-radius: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    color: #eee;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
    flex-grow: 1;
}
#close-prompt-viewer {
    background: rgba(255, 100, 100, 0.8);
    border: 2px solid #ff6464;
    border-radius: 8px;
    color: white;
    font-family: 'Jersey15', sans-serif;
    font-size: 1.5rem;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.3s ease;
    align-self: center;
}
#close-prompt-viewer:hover {
    background: rgba(255, 100, 100, 1);
}

#bedtime-game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 53;
  display: none;
  background-color: #03000a;
  background-image:
    radial-gradient(white, rgba(255,255,255,0.2) 2px, transparent 40px),
    radial-gradient(white, rgba(255,255,255,0.15) 1px, transparent 30px),
    radial-gradient(white, rgba(255,255,255,0.1) 2px, transparent 40px),
    radial-gradient(rgba(255,255,255,0.4), rgba(255,255,255,0.1) 2px, transparent 30px);
  background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
  background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
  overflow: hidden;
  cursor: pointer;
}

#bedtime-bed {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40vw;
  height: 30vw;
  max-width: 600px;
  max-height: 450px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
  z-index: 54;
}

#bedtime-nyan {
  position: absolute;
  bottom: 8vw; /* Adjust to sit on the bed */
  left: 50%;
  transform: translateX(-50%);
  width: 20vw;
  height: 15vw;
  max-width: 300px;
  max-height: 225px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 55;
  animation: gentle-breathing 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gentle-breathing {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.03); }
}

.bedtime-distraction {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 56;
  cursor: pointer;
  animation: pop-in 0.3s ease-out, shake-distraction 1.5s linear infinite;
  filter: drop-shadow(0 0 10px #ffdd00);
}
.bedtime-distraction:hover {
    transform: scale(1.1);
}

@keyframes pop-in {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@keyframes shake-distraction {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

#bedtime-ui {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    display: none;
    z-index: 60;
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 20px;
    border: 3px solid #6a0dad;
    box-shadow: 0 0 15px #6a0dad;
    text-align: center;
    font-family: 'Jersey15', sans-serif;
    color: white;
}
#bedtime-level {
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 1.5rem;
    background: #6a0dad;
    padding: 2px 10px;
    border-radius: 10px;
}
#sleepiness-bar-container {
    width: 100%;
    height: 40px;
    background: rgba(0,0,0,0.6);
    border-radius: 15px;
    border: 3px solid #8a2be2;
    overflow: hidden;
    position: relative;
}
#sleepiness-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 2;
    color: white;
    text-shadow: 0 0 5px black, 0 0 5px black;
    pointer-events: none;
}
#sleepiness-bar {
    width: 50%;
    height: 100%;
    background-color: #ffff00;
    border-radius: 12px;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
    z-index: 1;
}

#bedtime-end-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 70;
    text-align: center;
    font-family: 'Jersey15', sans-serif;
}
#bedtime-end-screen h2 {
    font-size: 5rem;
    color: #8a2be2;
    text-shadow: 0 0 10px #c384f7;
}
#bedtime-end-screen p {
    font-size: 2.5rem;
    color: white;
}
#bedtime-end-screen button {
    background: rgba(138, 43, 226, 0.8);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'Jersey15', sans-serif;
    font-size: 1.8rem;
    padding: 10px 20px;
    cursor: pointer;
    margin: 10px;
    transition: background 0.3s ease;
}
#bedtime-end-screen button:hover {
    background: rgba(138, 43, 226, 1);
}

.chat-message.speaking .avatar {
  animation: speak-pulse 0.5s infinite alternate;
  box-shadow: 0 0 15px #00ffff;
}
.chat-message.speaking.char2 .avatar {
  box-shadow: 0 0 15px #ff69b4;
}

@keyframes speak-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

#tac-explode-game-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 52;
  display: none;
  background: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyancatless20110725-22047-2vf3z5.gif") repeat;
  background-size: 500px 500px;
  overflow: hidden;
}
#tac-explode-player {
  position: absolute;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/Nyan.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 54;
  filter: drop-shadow(0 0 8px #00ffff);
}
#tac-explode-player.has-poptart::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background-image: url("poptart.png");
    background-size: contain;
    animation: poptart-bounce 0.5s infinite alternate;
}
@keyframes poptart-bounce {
    from { top: -20px; }
    to { top: -10px; }
}

#tac-explode-tacnayn {
  position: absolute;
  top: 50%;
  left: 50%;
  background-image: url("https://file.garden/Zj01o_oh-G9Y8APf/NYAN%20NYAN/NYAN!!!/tacnayn.gif");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 53;
  transition: transform 0.3s ease-in-out;
  filter: drop-shadow(0 0 10px #ff0000);
}
#tac-explode-tacnayn.exploding {
  animation: explode-animation 0.5s forwards;
}
@keyframes explode-animation {
    0% { transform: translate(-50%, -50%) scale(2.5); opacity: 1; filter: brightness(2); }
    100% { transform: translate(-50%, -50%) scale(5); opacity: 0; filter: brightness(5); }
}

.tac-explode-poptart {
  position: absolute;
  width: 50px;
  height: 50px;
  background-image: url("poptart.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 53;
  animation: pulse-glow 2s infinite alternate;
}

#tac-explode-ui {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    z-index: 55;
    background: rgba(0,0,0,0.5);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    font-family: 'Jersey15', sans-serif;
}
#tac-explode-timer {
    font-size: 2.5rem;
    text-shadow: 0 0 10px #ff00ff;
    color: white;
}
#tac-explode-progress-bar-container {
    width: 300px;
    height: 30px;
    background: rgba(0,0,0,0.6);
    border-radius: 15px;
    border: 3px solid #ff00ff;
    margin-top: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px #ff00ff;
}
#tac-explode-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ff00ff, #ff8c00, #ffff00);
    border-radius: 12px;
    transition: width 0.5s ease;
}

#tac-explode-end-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 70;
    text-align: center;
    font-family: 'Jersey15', sans-serif;
}
#tac-explode-end-screen h2 {
    font-size: 5rem;
    color: #ff8c00;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #ffff00;
}
#tac-explode-end-screen p {
    font-size: 2.5rem;
    color: white;
}
#tac-explode-end-screen button {
    background: rgba(255, 140, 0, 0.8);
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'Jersey15', sans-serif;
    font-size: 1.8rem;
    padding: 10px 20px;
    cursor: pointer;
    margin: 10px;
    transition: background 0.3s ease;
}
#tac-explode-end-screen button:hover {
    background: rgba(255, 140, 0, 1);
}

#set-default-music-button {
  background: rgba(255, 255, 100, 0.8);
  border: none;
  border-radius: 8px;
  color: #333;
  font-family: 'Jersey15', sans-serif;
  font-size: 1.4rem;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s ease;
}
#set-default-music-button:hover {
  background: rgba(255, 255, 100, 1);
}