/* General Reset */
body {
  margin: 0;
  font-family: "Arial", sans-serif;
  background: #f5f5f5;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Light mode styles */
body.light {
  background: #ffffff;
  color: #121212;
}

/* Dark mode styles */
body {
  background: #121212;
  color: #f0f0f0;
}

/* Container styling */
.container {
  text-align: center;
  max-width: 600px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  transition: background 0.3s ease;
}

body.light .container {
  background: rgba(0, 0, 0, 0.05);
}

/* Copy button styling */
.copy-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #6c63ff;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, transform 0.2s ease;
}

.copy-btn:hover {
  background: #5a52d4;
  transform: scale(1.1);
}

.copy-btn:active {
  transform: scale(0.95);
}

body.light .copy-btn {
  background: #ff6b6b;
}

body.light .copy-btn:hover {
  background: #e05555;
}

/* Title styling */
.title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ff6b6b;
}

/* Result styling */
.result {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

#joke-setup {
  font-size: 1.5rem;
  color: #ffd700;
  display: none;
}

#joke-punchline {
  font-size: 1.2rem;
  color: #ffd700;
  display: none;
}

body.light #joke-setup,
body.light #joke-punchline {
  color: #333;
}

/* Buttons styling */
.actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.choice {
  font-size: 1.2rem;
  padding: 10px 20px;
  background: #6c63ff;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.choice:hover {
  background: #5a52d4;
  transform: scale(1.05);
}

.choice:active {
  transform: scale(0.95);
}

body.light .choice {
  background: #ff6b6b;
}

body.light .choice:hover {
  background: #e05555;
}

/* Loader Styling */
.loader {
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #6c63ff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin: 20px auto;
  display: none;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tick Animation */
#copy-icon {
  transition: transform 0.1s ease, color 0.1s ease;
}

.copy-btn.copied #copy-icon {
  transform: scale(1.3);
  color: #000000;
}
