/* Custom styles */
#loading-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: white;
  z-index: 9999;
  transition: opacity 0.3s ease;
}
#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
#loading-screen .spinner {
  width: 2rem;
  height: 2rem;
  border: 4px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html {
  font-size: 110%;
}

#choose-style-title {
  display: none;
}

#app-logo {
  width: 4.5rem;
  height: 4.5rem;
}

.category-button {
  height: 4.5rem;
}

.category-button .emoji-icon {
  font-size: 1.5rem;
}

.category-button span {
  font-size: 0.75rem;
}
.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}
.from-purple-900 {
  --tw-gradient-from: #581c87;
  --tw-gradient-stops: var(--tw-gradient-from),
    var(--tw-gradient-to, rgba(88, 28, 135, 0));
}
.via-blue-900 {
  --tw-gradient-stops: var(--tw-gradient-from), #1e3a8a,
    var(--tw-gradient-to, rgba(30, 58, 138, 0));
}
.to-indigo-900 {
  --tw-gradient-to: #312e81;
}
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
}
.from-cyan-400 {
  --tw-gradient-from: #22d3ee;
  --tw-gradient-stops: var(--tw-gradient-from),
    var(--tw-gradient-to, rgba(34, 211, 238, 0));
}
.to-purple-400 {
  --tw-gradient-to: #c084fc;
}
.from-purple-500 {
  --tw-gradient-from: #a855f7;
  --tw-gradient-stops: var(--tw-gradient-from),
    var(--tw-gradient-to, rgba(168, 85, 247, 0));
}
.to-pink-500 {
  --tw-gradient-to: #ec4899;
}
.from-cyan-500 {
  --tw-gradient-from: #06b6d4;
  --tw-gradient-stops: var(--tw-gradient-from),
    var(--tw-gradient-to, rgba(6, 182, 212, 0));
}
.to-purple-500 {
  --tw-gradient-to: #a855f7;
}
.hover\:from-cyan-600:hover {
  --tw-gradient-from: #0891b2;
}
.hover\:to-purple-600:hover {
  --tw-gradient-to: #9333ea;
}
.bg-clip-text {
  background-clip: text;
  -webkit-background-clip: text;
}
.text-transparent {
  color: transparent;
}
.backdrop-blur-md {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.selection\:bg-purple-500::selection {
  background-color: #a855f7;
}
.selection\:text-white::selection {
  color: white;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fadeIn {
  animation: fadeIn 0.5s ease-in-out;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.animate-spin {
  animation: spin 1s linear infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.fade-out {
  animation: fadeOut 0.3s forwards;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.button-pop {
  animation: pop 0.3s ease;
}
.lucide {
  width: 1em;
  height: 1em;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.category-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 0.75rem;
  text-align: center;
  transition: all 0.2s ease-in-out;
  height: 4rem;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.category-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}
.category-button.selected {
  background-image: linear-gradient(to right, var(--tw-gradient-stops));
  --tw-gradient-from: #a855f7;
  --tw-gradient-to: #ec4899;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transform: scale(1.05);
  --tw-ring-color: #f472b6;
  box-shadow: 0 0 0 2px var(--tw-ring-color);
}
.category-button .lucide {
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.25rem;
  display: none;
}
.emoji-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: currentColor;
}
.category-button .emoji-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: 0.25rem;
}
.category-button span {
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.1;
}
/* Theme Toggle Styles */
.theme-toggle-container button,
.theme-toggle-container a {
  transition: background-color 0.2s ease, color 0.2s ease;
  width: 4rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* History panel */
#history-panel {
  height: 13rem;
  overflow-y: auto;
}
.history-copy i {
  pointer-events: none;
}

.like-btn.active svg {
  fill: currentColor;
  stroke: none;
}

.share-toggle.active svg,
.history-site-share.active svg {
  fill: currentColor;
  stroke: currentColor;
}

/* Prompt text container */
.prompt-text-box { max-height: 10rem; overflow: hidden; }

