/* Symbols Page Specific Styles */
.main-section {
  padding: 60px 0 30px;
  background: var(--background-color);
}

.main-content-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.main-content-left {
  flex: 1;
}

.section-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--heading-color);
  line-height: 1.1;
  position: relative;
  display: flex;
  align-items: center;
}

.sun-icon {
  font-size: 0.7em;
  margin-left: 10px;
  color: #ffd700;
}

.section-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 650px;
  line-height: 1.6;
}

.search-filter-container {
  background: var(--card-background);
  padding: 30px;
  margin: 30px 0;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.search-box {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.search-box input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid var(--border-color);
  border-radius: 25px;
  font-size: 1rem;
  background: var(--input-background);
  color: var(--text-color);
  transition: all 0.3s ease;
  font-family: inherit;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 75, 255, 0.1);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-tag {
  padding: 10px 18px;
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.filter-tag:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  transition: all 0.3s ease;
  z-index: -1;
}

.filter-tag:hover:before,
.filter-tag.active:before {
  width: 100%;
}

.filter-tag:hover,
.filter-tag.active {
  color: white;
  border-color: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 600;
}

/* Category Sections */
.category-section,
.featured-categories {
  padding: 50px 0;
  border-bottom: 1px solid var(--border-color);
}

.category-section:last-child,
.featured-categories:last-child {
  border-bottom: none;
}

.category-section h2,
.featured-categories h2 {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 40px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Symbol Categories Grid */
.symbol-categories-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.symbol-category {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 25px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.symbol-category:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent-color);
}

.symbol-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.symbol-category:hover::before {
  opacity: 1;
}

.category-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center;
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}

.category-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--heading-color);
}

.category-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.4;
}

.category-count {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 15px;
}

.category-preview {
  font-size: 1.2rem;
  line-height: 1.5;
  padding: 15px;
  background: var(--background-alt);
  border-radius: 8px;
  margin-top: auto;
  border: 1px solid var(--border-color);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
}

/* Symbol Preview Sidebar */
.symbol-preview-sidebar {
  background: var(--card-background);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  height: fit-content;
  position: sticky;
  top: 20px;
  width: 320px;
}

.preview-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--heading-color);
  display: flex;
  align-items: center;
}

.sidebar-icon {
  margin-right: 8px;
  font-size: 1rem;
}

.preview-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.preview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-item {
  text-align: center;
  padding: 12px 8px;
  background: var(--background-alt);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.stat-number {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #6a4bff;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Hidden state for filtering */
.symbol-category.hidden {
  display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-section {
    padding: 40px 0 20px;
  }
  
  .main-content-wrapper {
    flex-direction: column;
  }
    .symbol-preview-sidebar {
    position: static;
    margin-bottom: 30px;
    width: 100%;
  }
    .search-filter-container {
    padding: 20px;
    margin: 20px 0;
  }
  
  .symbol-categories-container {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
  
  .symbol-category {
    padding: 20px;
  }
  
  .category-section,
  .featured-categories {
    padding: 40px 0;
  }
  
  .category-section h2,
  .featured-categories h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  
  .filter-tags {
    gap: 8px;
  }
  
  .filter-tag {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .preview-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .symbol-categories-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .search-box input {
    padding: 12px 45px 12px 15px;
  }
  
  .category-icon {
    font-size: 2rem;
  }
  
  .category-name {
    font-size: 1.1rem;
  }
  
  .category-preview {
    font-size: 1rem;
    padding: 10px;
    min-height: 50px;
  }
}

/* Animation for category cards */
@keyframes categoryPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.symbol-category:active {
  animation: categoryPulse 0.2s ease-in-out;
  box-shadow: inset 0 0 0 2px var(--primary-color);
}

/* Focus styles for accessibility */
.symbol-category:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.filter-tag:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(106, 75, 255, 0.2);
}

/* Loading state placeholder */
.symbol-category.loading {
  opacity: 0.7;
  pointer-events: none;
}

.symbol-category.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Styles for the filter tag section scrolling */
.highlight-section {
  animation: highlightSection 2s ease-out;
  position: relative;
  z-index: 1;
}

@keyframes highlightSection {
  0%, 100% {
    background-color: transparent;
    box-shadow: none;
  }
  20%, 80% {
    background-color: rgba(var(--accent-rgb), 0.1);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
  }
}

/* Sticky filter tags container for better usability */
.search-filter-container {
  position: sticky;
  top: 80px;
  z-index: 100;
  background: var(--card-background);
  padding: 20px 30px;
  margin: 30px 0;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.search-filter-container.scrolled {
  box-shadow: var(--shadow-lg);
  padding: 15px 30px;
}

.filter-help {
  margin-top: 15px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.filter-help p {
  margin: 0;
}

.filter-help i {
  color: var(--accent-color);
  margin-right: 5px;
}
