/* Additional Theme Enhancements for Better Visual Appeal */

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

/* Enhanced theme switching animation */
body.theme-transitioning * {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.theme-transitioning {
  overflow: hidden;
}

/* Enhanced loading animations */
[data-theme="lotr"] .loading {
  background: linear-gradient(90deg, #8B4513 0%, #CD853F 50%, #B8860B 100%);
  background-size: 200% 100%;
  animation: ancient-loading 1.5s ease-in-out infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes ancient-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Enhanced search results styling */
[data-theme="lotr"] .search-result-item {
  background: linear-gradient(145deg, rgba(253, 245, 230, 0.8), rgba(245, 230, 211, 0.8));
  border-left: 4px solid #B8860B;
  transition: all 0.3s ease;
}

[data-theme="lotr"] .search-result-item:hover {
  background: linear-gradient(145deg, rgba(253, 245, 230, 1), rgba(245, 230, 211, 1));
  border-left-color: #8B4513;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(139, 69, 19, 0.15);
}

/* Enhanced chapter navigation */
[data-theme="lotr"] .chapter-nav {
  background: linear-gradient(135deg, rgba(253, 245, 230, 0.9), rgba(245, 230, 211, 0.9));
  border: 2px solid rgba(205, 133, 63, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

/* Book selector styling */
[data-theme="lotr"] .book-selector .btn-active {
  background: linear-gradient(135deg, #8B4513, #CD853F);
  color: white;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #8B4513;
}

/* Enhanced verse cards */
[data-theme="lotr"] .verse-card {
  position: relative;
  overflow: hidden;
}

[data-theme="lotr"] .verse-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #B8860B, transparent);
  opacity: 0.6;
}

/* Enhanced badge styling */
[data-theme="lotr"] .verse-number {
  background: linear-gradient(135deg, #8B4513, #B8860B);
  color: white;
  border: 2px solid #CD853F;
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
  font-family: 'Cinzel', serif;
  font-weight: 600;
}

/* Enhanced dropdown menus */
[data-theme="lotr"] .menu-title {
  color: #8B4513;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Enhanced form inputs */
[data-theme="lotr"] .input::placeholder {
  color: rgba(93, 64, 55, 0.6);
  font-style: italic;
}

/* Enhanced modal styling */
[data-theme="lotr"] .modal-box {
  background: linear-gradient(145deg, #FDF5E6, #F5E6D3);
  border: 3px solid #8B4513;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(47, 27, 20, 0.4);
  backdrop-filter: blur(20px);
}

/* Special glow effects for interactive elements */
[data-theme="lotr"] .interactive-word.active {
  background: linear-gradient(145deg, rgba(184, 134, 11, 0.2), rgba(205, 133, 63, 0.2));
  border-color: #B8860B;
  box-shadow: 0 0 20px rgba(184, 134, 11, 0.4);
  animation: word-pulse 1s ease-in-out;
}

@keyframes word-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Enhanced table styling for lexicon data */
[data-theme="lotr"] table {
  background: linear-gradient(145deg, rgba(253, 245, 230, 0.9), rgba(245, 230, 211, 0.9));
  border: 2px solid #DEB887;
  border-radius: 12px;
  overflow: hidden;
}

[data-theme="lotr"] th {
  background: linear-gradient(135deg, #8B4513, #CD853F);
  color: white;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="lotr"] td {
  border-bottom: 1px solid rgba(205, 133, 63, 0.2);
  font-family: 'Cinzel', serif;
}

/* Enhanced progress indicators */
[data-theme="lotr"] .progress {
  background: linear-gradient(90deg, #F5E6D3, #E6D2B5);
  border: 1px solid #DEB887;
  border-radius: 6px;
  overflow: hidden;
}

[data-theme="lotr"] .progress::-webkit-progress-bar {
  background: linear-gradient(90deg, #F5E6D3, #E6D2B5);
}

[data-theme="lotr"] .progress::-webkit-progress-value {
  background: linear-gradient(90deg, #8B4513, #B8860B, #CD853F);
}

/* Enhanced notification/alert styling */
[data-theme="lotr"] .alert-info {
  background: linear-gradient(145deg, rgba(70, 130, 180, 0.1), rgba(70, 130, 180, 0.05));
  border: 2px solid #4682B4;
  border-radius: 12px;
  color: #2F1B14;
}

[data-theme="lotr"] .alert-success {
  background: linear-gradient(145deg, rgba(34, 139, 34, 0.1), rgba(34, 139, 34, 0.05));
  border: 2px solid #228B22;
  border-radius: 12px;
  color: #2F1B14;
}

[data-theme="lotr"] .alert-error {
  background: linear-gradient(145deg, rgba(139, 0, 0, 0.1), rgba(139, 0, 0, 0.05));
  border: 2px solid #8B0000;
  border-radius: 12px;
  color: #2F1B14;
}

/* Responsive enhancements */
@media (max-width: 768px) {
  [data-theme="lotr"] h1 {
    font-size: 1.75rem;
  }
  
  [data-theme="lotr"] .card {
    margin: 0.25rem;
    border-radius: 8px;
  }
  
  [data-theme="lotr"] .verse-card::before {
    height: 2px;
  }
}

/* Focus enhancements for accessibility */
[data-theme="lotr"] *:focus {
  outline: 2px solid #B8860B;
  outline-offset: 2px;
}

/* Print optimizations */
@media print {
  [data-theme="lotr"] {
    background: white !important;
    color: black !important;
  }
  
  [data-theme="lotr"] .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: white !important;
  }
  
  [data-theme="lotr"] .verse-number {
    background: #f0f0f0 !important;
    color: black !important;
    border: 1px solid #ccc !important;
  }
}