body {
  font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
  background: linear-gradient(135deg, #FFDEE9 0%, #B5FFFC 100%);
  color: #333;
  text-align: center;
  margin: 0;
  padding: 0;
}

body.dark-mode {
  background: linear-gradient(135deg, #1E1E1E 0%, #3C3C3D 100%);
  color: #FFFFFF;
}

.main-content {
  max-width: 1634px; /* Increased from 1574px to accommodate wider left panel */
  margin: 0 auto;
  position: relative;
}

.horizontal-containers {
  display: flex;
  max-width: 1634px;
  margin: 0 auto;
  gap: 0;
}

.container-1,
.container-3 {
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.container-2 {
  width: 1024px;
  margin: 0;
  padding: 0;
}

#canvas-container {
  position: relative;
  width: 1024px;
  height: 768px;
  background: transparent;
  background-size: 20px 20px;
  background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc),
    linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc);
  background-position: 0 0, 10px 10px;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

#drawing-canvas,
#particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

#drawing-canvas {
  background-color: transparent;
}

#particle-canvas {
  pointer-events: none;
}

#youtube-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 768px;
  display: none;
  z-index: 1;
}

.tools-above-canvas {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tools-combined {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.tools-combined .left-buttons,
.tools-combined .right-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.effect-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px 4px; /* Reduced from 4px 6px */
  font-size: 13px; /* Reduced from 14px */
  border-radius: 5px; /* Reduced from 6px */
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
  margin-bottom: 3px; /* Reduced from 5px */
  width: 95%; /* Reduced from 98% */
}

.effect-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

.effect-button.selected {
  background: rgba(255, 255, 255, 0.9);
  border-color: #FFD700;
}

.effect-button .icon {
  font-size: 18px; /* Reduced from 20px */
  line-height: 1;
}

.effect-button .label {
  margin-top: 1px; /* Reduced from 2px */
  font-size: 9px; /* Reduced from 10px */
  line-height: 1.1;
  text-align: center;
  white-space: pre-line;
}

.line-effects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px; /* Reduced from 5px */
}

.color-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px; /* Reduced from 20px */
  width: 100%; /* Ensure full width usage */
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px; /* Reduced from 3px */
  width: 100%; /* Ensure full width usage */
  max-width: 160px; /* Reduced from 180px */
  margin: 0 auto; /* Center the grid */
}

.color-button {
  width: 26px; /* Reduced from 28px */
  height: 26px; /* Reduced from 28px */
  border: none;
  border-radius: 0%;
  cursor: pointer;
  transition: transform 0.2s;
}

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

.color-button.selected {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

.action-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.action-buttons button,
.action-buttons label,
.action-buttons input[type="number"] {
  padding: 6px 10px; /* Reduced from 8px 12px */
  font-size: 14px; /* Reduced from 16px */
  border-radius: 6px; /* Reduced from 8px */
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

.action-buttons button:hover,
.action-buttons label:hover,
.action-buttons input[type="number"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

h1 {
  font-size: 48px;
  background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 2px;
  margin: 0 auto;
  max-width: 1200px;
  font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
}

h2 {
  color: #333;
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
}

label {
  color: #333;
}

.replay-toggle-button,
.animated-effects-toggle-button,
.remix-button {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

.replay-toggle-button:hover,
.animated-effects-toggle-button:hover,
.remix-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

.delete-button {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
  background: rgba(255, 0, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(5px);
}

.delete-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 0, 0, 0.5);
}

.share-button {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  margin-top: 10px;
  margin-left: 10px;
  transition: all 0.3s ease;
  background: rgba(0, 128, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(5px);
}

.share-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 128, 0, 0.5);
}

.guestbook-entry {
  border: none;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.guestbook-entry img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

.guestbook-entry p {
  font-size: 18px;
  color: #333;
}

.action-buttons .recording-time-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.action-buttons .recording-time-container label,
.action-buttons .recording-time-container input[type="number"] {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  margin: 0;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

.action-buttons .recording-time-container input[type="number"] {
  width: 70px;
  text-align: center;
}

.countdown-timer {
  display: inline-block;
  margin-left: 10px;
  font-size: 18px;
  color: #333;
  background-color: lightyellow;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px solid #fff;
  backdrop-filter: blur(5px);
  opacity: 1;
  transition: opacity 3s;
}

.recording-indicator {
  display: inline-block;
  margin-left: 10px;
  font-size: 18px;
  color: red;
  font-weight: bold;
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

#brush-size {
}

#color-picker {
  margin-top: 3px; /* Reduced from 5px */
  border: none;
  width: 50px; /* Reduced from 56px */
  height: 30px; /* Reduced from 35px */
  cursor: pointer;
}

.tools-combined button {
  padding: 6px 10px; /* Reduced from 8px 12px */
  font-size: 14px; /* Reduced from 16px */
  border-radius: 6px; /* Reduced from 8px */
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

.tools-combined button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

.color-selection input[type="color"],
.color-selection input[type="number"] {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

.color-selection input[type="color"]:hover,
.color-selection input[type="number"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

.file-upload-container {
  margin: 0;
  display: inline-block;
  vertical-align: middle;
}

.file-upload-container input[type="file"] {
  display: none;
}

.file-upload-container .custom-file-upload {
  padding: 6px 10px; /* Reduced from 8px 12px */
  font-size: 14px; /* Reduced from 16px */
  border-radius: 6px; /* Reduced from 8px */
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
}

.file-upload-container .custom-file-upload span {
  margin-left: 5px;
}

.file-upload-container .custom-file-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

#settings-button {
  padding: 8px 12px;
  font-size: 24px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

#settings-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

#settings-panel {
  margin-top: 10px;
  padding: 15px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  display: none;
  width: 100%;
}

#settings-panel h3 {
  margin-top: 0;
  color: #333;
}

#settings-panel label {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

#settings-panel select {
  width: 100%;
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

#settings-panel select:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

#settings-panel input[type="color"] {
  width: 100%;
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

#settings-panel input[type="color"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

.color-picker-container,
.background-selection-container,
.color-set-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.color-picker-container label,
.background-selection-container label,
.color-set-selection label {
  margin-right: 5px;
  padding: 8px 12px;
  font-size: 18px;
  all: unset;
}

.color-picker-container input[type="color"] {
  width: 56px; /* Reduced from 64px */
  height: 35px; /* Reduced from 40px */
  border: none;
  cursor: pointer;
  margin-left: 5px;
}

.background-selection-container label,
.background-selection-container select,
.background-selection-container input[type="color"] {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
  margin-left: 5px;
}

.background-selection-container label:hover,
.background-selection-container select:hover,
.background-selection-container input[type="color"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.5);
}

.background-selection-container input[type="color"] {
  display: none;
}

.color-cycling-settings {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px; /* Reduced from 15px */
  width: 100%;
  gap: 5px; /* Reduced from 10px */
}

.color-cycling-settings label {
  font-size: 12px; /* Reduced from 14px */
  color: #333;
  text-align: center;
  margin-bottom: 3px; /* Reduced from 5px */
}

.color-cycling-settings input[type="range"] {
  width: 100%;
  max-width: 140px; /* Reduced from 160px */
  margin-bottom: 3px; /* Reduced from 5px */
}

.blend-mode-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px; /* Reduced from 15px */
  width: 100%;
}

.blend-mode-selection label {
  font-size: 12px; /* Reduced from 14px */
  color: #333;
  margin-bottom: 3px; /* Reduced from 5px */
  text-align: center;
}

.blend-mode-selection select {
  width: 100%;
  max-width: 140px; /* Reduced from 160px */
  padding: 5px 6px; /* Reduced from 6px 8px */
  font-size: 13px; /* Reduced from 14px */
  border-radius: 5px; /* Reduced from 6px */
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
}

.brush-opacity-setting {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px; /* Reduced from 15px */
  width: 100%;
  gap: 5px; /* Reduced from 10px */
}

.brush-opacity-setting label {
  font-size: 12px; /* Reduced from 14px */
  color: #333;
  text-align: center;
  margin-bottom: 3px; /* Reduced from 5px */
}

.brush-opacity-setting input[type="range"] {
  width: 100%;
  max-width: 140px; /* Reduced from 160px */
}

.color-prompt-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px; /* Reduced from 10px */
  width: 100%;
  max-width: 180px; /* Reduced from 200px */
}

.color-prompt-input-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px; /* Reduced from 10px */
  margin-bottom: 10px; /* Reduced from 15px */
  width: 100%;
}

.color-prompt-input-container label {
  font-size: 14px; /* Reduced from 16px */
  color: #333;
  font-weight: bold;
}

.color-prompt-input-container input[type="text"] {
  padding: 5px 6px; /* Reduced from 6px 8px */
  font-size: 13px; /* Reduced from 14px */
  border-radius: 5px; /* Reduced from 6px */
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
  width: 100%;
  max-width: 160px; /* Reduced from 180px */
  text-align: center;
  box-sizing: border-box;
}

.color-prompt-input-container button {
  padding: 5px 6px; /* Reduced from 6px 8px */
  font-size: 13px; /* Reduced from 14px */
  border-radius: 5px; /* Reduced from 6px */
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 128, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(5px);
  width: 100%;
  max-width: 160px; /* Reduced from 180px */
  box-sizing: border-box;
}

.color-prompt-input-container button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 128, 0, 0.5);
}

.generated-colors-section {
  width: 100%;
  max-width: 180px; /* Reduced from 200px */
}

.generated-colors-label {
  font-size: 12px; /* Reduced from 14px */
  color: #333;
  margin-bottom: 3px; /* Reduced from 5px */
  font-weight: bold;
  text-align: center;
}

.generated-colors-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px; /* Reduced from 2px */
  margin-bottom: 8px; /* Reduced from 10px */
  width: 100%;
  max-width: 170px; /* Reduced from 190px */
  margin-left: auto;
  margin-right: auto;
}

.generated-color-button {
  width: 20px; /* Reduced from 22px */
  height: 20px; /* Reduced from 22px */
  border: 2px solid #fff;
  border-radius: 2px; /* Reduced from 3px */
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
}

.generated-color-button:hover {
  transform: scale(1.1);
}

.generated-color-button.selected {
  animation: pulse 2s infinite;
}

#youtube-url-container {
  display: flex;
  align-items: center;
}

#youtube-url-container label {
  margin-right: 5px;
  font-size: 16px;
  color: #333;
}

#youtube-url-input {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.7);
  color: #333;
  backdrop-filter: blur(5px);
  margin-right: 5px;
  width: 126px;
}

#youtube-url-input:focus {
  outline: none;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

#load-youtube-button {
  padding: 8px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 2px solid #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 128, 0, 0.7);
  color: #fff;
  backdrop-filter: blur(5px);
}

#load-youtube-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 128, 0, 0.5);
}

.error-message {
  color: red;
  margin-top: 5px;
}

.note {
  font-size: 12px;
  color: #333;
  margin-top: 10px;
}

.feedback-container {
  position: fixed;
  top: 90px;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1000;
}

.feedback-arrow {
  width: 30px;
  height: 60px;
  animation: bounceHorizontal 2s infinite;

  /* Move arrow to top */
  position: absolute;
  top: -100px;
  left: 20px;
  transform: translateX(-50%) rotate(90deg);
}

.feedback-arrow svg {
  width: 60%;
  height: 100%;
  transform: rotate(180deg);
}

.feedback-arrow svg path {
  animation: colorCycle 3s linear infinite;
}

.feedback-text {
  transform: rotate(270deg);
  transform-origin: left top;
  font-size: 24px;
  font-weight: bold;
  font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
  margin-top: 75px;
  background-color: blue;
  color: white;
  border-radius: 8px;
  border: 4px solid yellow;
  padding: 10px;
}

@keyframes bounceHorizontal {
  0% { transform: translateX(0); }
  50% { transform: translateX(-20px); }
  100% { transform: translateX(0); }
}

@keyframes colorCycle {
  0% { fill: red; }
  14% { fill: orange; }
  28% { fill: yellow; }
  42% { fill: green; }
  56% { fill: blue; }
  70% { fill: indigo; }
  84% { fill: violet; }
  100% { fill: red; }
}

.animated-indicator-container {
  position: fixed;
  top: 0;
  right: 60px;
  display: flex;
  align-items: center;
  z-index: 2000;
  pointer-events: none;
}

.animated-arrow {
  width: 40px;
  height: 40px;
  margin-right: -10px;
  animation: arrowBounce 2s infinite;
}

@keyframes arrowBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animated-arrow svg {
  width: 60%;
  height: 70%;
  display: block;
}

.animated-hearts {
  display: flex;
  gap: 2px;
}

.animated-heart {
  font-size: 16px;
  animation: heartDance 3s ease-in-out infinite;
}

@keyframes heartDance {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-5px) rotate(-10deg);
  }
  50% {
    transform: translateY(0) rotate(0deg);
  }
  75% {
    transform: translateY(-5px) rotate(10deg);
  }
}