/* Custom styles for AI Adventure */
.scrollbar-thin {
  scrollbar-width: thin;
}

.scrollbar-thumb-purple-600 {
  scrollbar-color: #9333ea transparent;
}

/* Webkit scrollbar styles */
.scrollbar-thin::-webkit-scrollbar {
  width: 8px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: rgba(55, 65, 81, 0.3);
  border-radius: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: #9333ea;
  border-radius: 4px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: #7c3aed;
}

/* Glowing effects for fantasy atmosphere */
.text-transparent {
  background-clip: text;
  -webkit-background-clip: text;
}

/* Loading spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Backdrop blur support */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Custom button hover effects */
button:hover {
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

button:active {
  transform: translateY(0);
}

/* Mystical glow effect for important elements */
.glow {
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.3);
}

/* Responsive image handling */
img {
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* Story text styling */
.prose {
  line-height: 1.7;
}

.prose p {
  margin-bottom: 1rem;
}

/* Map grid styling */
.grid-cols-5 > div {
  aspect-ratio: 1;
}

/* Character portrait styling */
.rounded-full img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* Inventory grid styling */
.grid-cols-4 > div {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .grid-cols-1.lg\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .prose {
    font-size: 14px;
  }
  
  .text-3xl {
    font-size: 1.5rem;
  }
  
  .p-6 {
    padding: 1rem;
  }
  
  .space-x-4 > * + * {
    margin-left: 0.5rem;
  }
  
  .flex-wrap {
    gap: 0.25rem;
  }
}

/* Fantasy theme enhancements */
.border-purple-500 {
  border-color: rgba(168, 85, 247, 0.8);
}

.bg-black.bg-opacity-40 {
  background-color: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Input focus effects */
input:focus, select:focus {
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.5);
  outline: none;
}

/* Disabled state styling */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Animation for loading states */
.loading-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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