/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  /* Dark mode background */
  body {
    background-image: linear-gradient(to bottom right, #1a1a2e, #16213e, #0f3460) !important;
    color: #e5e7eb;
  }

  /* Dark mode gradient background for game pages */
  .bg-gradient-to-br.from-purple-50.via-pink-50.to-orange-50 {
    background-image: linear-gradient(to bottom right, #1a1a2e, #16213e, #0f3460) !important;
  }

  /* Dark mode cards */
  .card {
    background-color: rgba(31, 41, 55, 0.95) !important;
    border: 1px solid rgba(75, 85, 99, 0.3);
    color: #e5e7eb;
  }

  /* Dark mode input fields */
  .input-field {
    background-color: rgba(55, 65, 81, 0.8) !important;
    border-color: #4b5563;
    color: #e5e7eb;
  }

  .input-field:focus {
    border-color: #a855f7;
    background-color: rgba(55, 65, 81, 0.9) !important;
  }

  .input-field::placeholder {
    color: #9ca3af;
  }

  /* Dark mode buttons */
  .btn-secondary {
    background-color: rgba(55, 65, 81, 0.8) !important;
    border-color: #4b5563;
    color: #e5e7eb;
  }

  .btn-secondary:hover {
    background-color: rgba(75, 85, 99, 0.8) !important;
  }

  /* Dark mode text colors */
  .text-gray-600 {
    color: #9ca3af !important;
  }

  .text-gray-700 {
    color: #d1d5db !important;
  }

  .text-gray-800 {
    color: #e5e7eb !important;
  }

  /* Dark mode backgrounds */
  .bg-gray-50 {
    background-color: rgba(55, 65, 81, 0.5) !important;
  }

  .bg-gray-100 {
    background-color: rgba(75, 85, 99, 0.5) !important;
  }

  /* Dark mode glass effect */
  .glass-effect {
    background-color: rgba(31, 41, 55, 0.2) !important;
    border-color: rgba(75, 85, 99, 0.3);
  }

  /* Dark mode modal backgrounds */
  .bg-black.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.7) !important;
  }

  /* Dark mode scrollbar */
  ::-webkit-scrollbar-track {
    background: #374151;
  }

  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #be185d);
  }

  ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6d28d9, #a855f7);
  }

  /* Dark mode success/error states */
  .bg-green-50 {
    background-color: rgba(22, 101, 52, 0.2) !important;
  }

  .bg-yellow-50 {
    background-color: rgba(133, 77, 14, 0.2) !important;
  }

  .border-green-200 {
    border-color: rgba(34, 197, 94, 0.3) !important;
  }

  .border-yellow-200 {
    border-color: rgba(234, 179, 8, 0.3) !important;
  }

  /* Dark mode close buttons */
  .text-gray-500 {
    color: #9ca3af !important;
  }

  .hover\:text-gray-700:hover {
    color: #d1d5db !important;
  }

  /* Dark mode share URL input */
  #shareUrl {
    background-color: rgba(55, 65, 81, 0.8) !important;
    color: #e5e7eb !important;
  }

  /* Dark mode form labels */
  label {
    color: #d1d5db !important;
  }

  /* Dark mode select dropdowns */
  select {
    background-color: rgba(55, 65, 81, 0.8) !important;
    color: #e5e7eb !important;
  }

  select option {
    background-color: #374151;
    color: #e5e7eb;
  }

  /* Dark mode textarea */
  textarea {
    background-color: rgba(55, 65, 81, 0.8) !important;
    color: #e5e7eb !important;
  }

  /* Dark mode border separators */
  .border-gray-200 {
    border-color: #4b5563 !important;
  }

  /* Dark mode toast notifications */
  .bg-blue-500 {
    background-color: #3b82f6 !important;
  }

  .bg-green-500 {
    background-color: #10b981 !important;
  }

  .bg-red-500 {
    background-color: #ef4444 !important;
  }
}

/* Smooth transitions for dark mode */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
} 