/* The Warehouse Custom Styles */

/* Google-Style Homepage */
.google-style-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1rem 2rem;
}

.logo-container {
  text-align: center;
  margin-bottom: 1rem;
}

.warehouse-logo-img {
  width: 200px;
  height: 200px;
  margin: 0 auto 1rem;
  display: block;
}

.warehouse-logo-img-horizontal {
  max-width: 400px;
  height: auto;
  margin: 0 auto 0.25rem;
  display: block;
}

.warehouse-logo-text {
  font-size: 3rem;
  font-weight: 300;
  color: #667eea;
  margin: 0;
  letter-spacing: -1px;
}

.warehouse-logo {
  font-size: 4rem;
  font-weight: 300;
  color: #667eea;
  margin: 0;
  letter-spacing: -1px;
}

.tagline {
  font-size: 1.1rem;
  color: #6c757d;
  margin: 0.25rem 0 0 0;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: #868e96;
  margin: 0.75rem 0 0 0;
  line-height: 1.5;
  max-width: 500px;
}

.search-container-google {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.search-input-google {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  box-shadow: 0 1px 6px rgba(32,33,36,.28);
  transition: box-shadow 0.2s;
  margin-bottom: 1.5rem;
}

.search-input-google:hover {
  box-shadow: 0 2px 8px rgba(32,33,36,.28);
}

.search-input-google:focus {
  outline: none;
  box-shadow: 0 2px 8px rgba(32,33,36,.28);
  border-color: #667eea;
}

.search-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.search-button-google,
.browse-button-google {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  color: #3c4043;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.browse-button-google i {
  font-size: 1rem;
}

.search-button-google:hover {
  box-shadow: 0 1px 1px rgba(0,0,0,.1);
  border-color: #dadce0;
  background: #f8f9fa;
}

.browse-button-google:hover {
  background: #667eea;
  border-color: #667eea;
  color: white;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  transform: translateY(-1px);
}

/* Primary search button */
.search-button-google.primary {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.search-button-google.primary:hover {
  background: #5568d3;
  border-color: #5568d3;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Package count */
.package-count {
  font-size: 0.95rem;
  color: #6c757d;
  margin: 0.25rem 0 0 0;
}

.search-results-google {
  margin-top: 2rem;
  width: 100%;
  max-width: 1200px;
}

.search-results-box {
  background: white;
  border: 1px solid #dfe1e5;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 6px rgba(32,33,36,.28);
}

.quick-links {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.9rem;
}

.quick-links a {
  color: #667eea;
  text-decoration: none;
  padding: 0 0.5rem;
}

.quick-links a:hover {
  text-decoration: underline;
}

.quick-links-separator {
  color: #dee2e6;
  margin: 0 0.5rem;
}

.resources-label {
  color: #6c757d;
  margin-right: 0.25rem;
}

/* Responsive - tablet */
@media (max-width: 768px) {
  .warehouse-logo-img {
    width: 140px;
    height: 140px;
  }

  .warehouse-logo-img-horizontal {
    max-width: 280px;
  }

  .warehouse-logo-text {
    font-size: 2rem;
  }

  .quick-links-separator,
  .resources-label {
    display: none;
  }

  .quick-links {
    line-height: 2;
  }

  .warehouse-logo {
    font-size: 2.5rem;
  }

  .search-buttons {
    flex-direction: column;
  }

  .search-button-google,
  .browse-button-google {
    width: 100%;
  }

  .google-style-home {
    padding: 1rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .search-input-google {
    font-size: 1rem;
    padding: 0.875rem 1rem;
  }
}

/* Responsive - mobile phone */
@media (max-width: 480px) {
  .google-style-home {
    padding: 0.75rem;
  }

  .logo-container {
    margin-bottom: 1rem;
  }

  .warehouse-logo-img-horizontal {
    max-width: 220px;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .package-count {
    font-size: 0.85rem;
  }

  .search-container-google {
    padding: 0 0.25rem;
  }

  .search-input-google {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
  }

  .search-button-google,
  .browse-button-google {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }

  .quick-links {
    font-size: 0.8rem;
    margin-top: 1.5rem;
  }

  .quick-links a {
    padding: 0 0.25rem;
  }

  .discover-section {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }

  .discover-title {
    font-size: 1.1rem;
  }

  .discover-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .discover-card {
    flex: 0 0 160px;
    padding: 0.75rem;
  }

  .discover-card-name {
    font-size: 0.9rem;
  }

  .discover-card-title {
    font-size: 0.8rem;
  }

  .discover-card-desc {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
  }

  .discover-card-stats {
    font-size: 0.7rem;
  }

  .discover-card-version,
  .discover-card-badge {
    font-size: 0.6rem;
  }
}

/* Old Hero Banner - keep for other pages */
.hero-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  text-align: center;
}

.hero-banner h2 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

/* Search */
.search-container {
  max-width: 600px;
  margin: 0 auto 1rem;
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 1rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-button {
  padding: 1rem 2rem;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.search-button:hover {
  background: #34495e;
}

.search-results {
  margin-top: 1rem;
}

/* Stats Banner */
.stats-banner {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 5px;
  margin-top: 2rem;
  color: #6c757d;
}

/* Category Cards */
.grid {
  gap: 1.5rem;
}

.grid > div {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.grid > div:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.grid h3 {
  margin-top: 0;
  color: #667eea;
}

/* Forms */
.submission-form {
  max-width: 700px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #6c757d;
  font-size: 0.875rem;
}

.form-group .checkbox {
  display: block;
  margin: 0.5rem 0;
  font-weight: normal;
}

.form-group .checkbox input {
  margin-right: 0.5rem;
}

.submit-button {
  background: #667eea;
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-button:hover {
  background: #5568d3;
}

.form-status {
  margin-top: 1rem;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 5px;
  margin: 1rem 0;
}

.alert-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.alert-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th {
  background: #f8f9fa;
  padding: 0.75rem;
  text-align: left;
  border-bottom: 2px solid #dee2e6;
  font-weight: bold;
}

td {
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

tr:hover {
  background: #f8f9fa;
}

/* Contribute Note */
.contribute-note {
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 1rem;
  border-radius: 5px;
  margin-top: 2rem;
  text-align: center;
}

/* Package Cards */
.package-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: white;
  transition: box-shadow 0.2s;
}

.package-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.package-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #667eea;
}

.package-score {
  display: inline-block;
  background: #28a745;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9rem;
}

.package-badges {
  margin: 0.5rem 0;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  margin-right: 0.5rem;
  background: #e9ecef;
  border-radius: 3px;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-banner h2 {
    font-size: 1.8rem;
  }

  .search-container {
    flex-direction: column;
  }

  .search-button {
    width: 100%;
  }

  .package-list {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .package-card {
    padding: 1rem;
  }

  .package-title {
    font-size: 1.1rem;
  }

  .package-description {
    font-size: 0.9rem;
  }

  .package-meta {
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .package-actions {
    flex-wrap: wrap;
  }

  .search-results-google {
    padding: 0 0.5rem;
  }

  .search-results-box {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .package-card {
    padding: 0.875rem;
  }

  .package-logo,
  .package-logo-fallback {
    width: 40px;
    height: 40px;
  }

  .package-title {
    font-size: 1rem;
  }

  .package-description {
    font-size: 0.85rem;
    margin: 0.35rem 0;
  }

  .package-meta {
    font-size: 0.75rem;
    margin: 0.5rem 0;
  }

  .package-actions {
    gap: 0.35rem;
  }

  .btn-feedback, .btn-view, .btn-source, .btn-review {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
  }

  .topic-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
  }
}

/* ================================
   Enhanced Package Cards
   ================================ */
.package-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.package-card {
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 1.25rem;
  background: white;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.package-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.package-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.package-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.package-logo-fallback {
  width: 48px;
  height: 48px;
  background: #f1f3f4;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a737d;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.package-header-text {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.package-title {
  font-size: 1.25rem;
  margin: 0;
  flex: 1;
}

.package-title a {
  color: #667eea;
  text-decoration: none;
}

.package-title a:hover {
  text-decoration: underline;
}

.package-score {
  background: #28a745;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.score-high { background: #28a745; }
.score-medium { background: #ffc107; color: #212529; }
.score-low { background: #dc3545; }

.package-description {
  color: #586069;
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.package-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #6a737d;
  margin: 0.75rem 0;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.exports-preview {
  background: #f6f8fa;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  margin: 0.75rem 0;
}

.exports-preview code {
  background: #e9ecef;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.exports-label {
  color: #6a737d;
}

.exports-more {
  color: #6a737d;
  font-style: italic;
  margin-left: 0.5rem;
}

.package-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.topic-tag {
  background: #e9ecef;
  color: #495057;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

.package-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
}

.btn-feedback, .btn-view {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.2s;
}

.btn-feedback {
  background: #f1f3f4;
  border: 1px solid #dadce0;
  color: #3c4043;
}

.btn-feedback:hover {
  background: #e8eaeb;
}

.btn-view {
  background: #667eea;
  border: none;
  color: white;
}

.btn-view:hover {
  background: #5568d3;
}

.btn-source {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-source:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.results-count {
  color: #6a737d;
  margin: 0;
  font-size: 0.9rem;
}

.compare-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.compare-ai-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.compare-ai-btn i {
  font-size: 1rem;
}

.search-no-results {
  text-align: center;
  padding: 2rem;
}

/* Category suggestions in search results */
.category-suggestion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.suggestion-label {
  color: #6a737d;
  font-size: 0.85rem;
}

.category-suggestion-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  text-decoration: none;
  color: #2d3748;
  font-size: 0.85rem;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.category-suggestion-link:hover {
  border-color: #667eea;
  background: #667eea;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.category-emoji {
  font-size: 1rem;
}

.category-name {
  font-weight: 500;
}

.category-desc {
  color: #6a737d;
  font-size: 0.8rem;
}

.category-suggestion-link:hover .category-desc {
  color: rgba(255,255,255,0.8);
}

/* Mobile adjustments for compare button */
@media (max-width: 480px) {
  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .compare-ai-btn {
    width: 100%;
    justify-content: center;
  }

  .category-suggestion {
    flex-direction: column;
    align-items: flex-start;
  }

  .category-suggestion-link {
    width: 100%;
    justify-content: center;
  }
}

.search-status {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  color: #6a737d;
  margin-bottom: 0.5rem;
}

.search-error {
  color: #dc3545;
}

.search-loading {
  text-align: center;
  color: #667eea;
  padding: 2rem;
  font-style: italic;
}

.search-loading::after {
  content: '';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* ================================
   Modal Styles
   ================================ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6a737d;
  background: none;
  border: none;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.feedback-pkg-name {
  color: #667eea;
  font-weight: 600;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-primary {
  background: #667eea;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-secondary {
  background: #f1f3f4;
  color: #3c4043;
  padding: 0.75rem 1.5rem;
  border: 1px solid #dadce0;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #e8eaeb;
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #24292e;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  margin: 1rem 0;
}

.btn-github:hover {
  background: #3a3f44;
  color: white;
}

.feedback-note {
  font-size: 0.85rem;
  color: #6a737d;
  margin-top: 0.5rem;
}

.required {
  color: #dc3545;
}

/* ================================
   Star Rating
   ================================ */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 1.75rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.1s;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #ffc107;
}

/* ================================
   Alert Styles (Enhanced)
   ================================ */
.alert {
  padding: 1rem;
  border-radius: 5px;
  margin: 1rem 0;
}

.alert-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.alert-success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* ================================
   Chatbot Styles
   ================================ */
.chat-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}

.chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.chat-toggle.chat-open {
  background: #6c757d;
}

.chat-toggle i {
  font-size: 1.25rem;
}

.chat-window {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  width: 380px;
  max-width: calc(100vw - 2rem);
  height: 500px;
  max-height: calc(100vh - 8rem);
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.chat-header-info i {
  font-size: 1.25rem;
}

.chat-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}

.chat-close:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-message {
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

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

.chat-message.user {
  align-self: flex-end;
}

.chat-message.assistant {
  align-self: flex-start;
}

.chat-message .message-content {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-message.user .message-content {
  background: #667eea;
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.assistant .message-content {
  background: #f1f3f4;
  color: #333;
  border-bottom-left-radius: 4px;
}

.chat-message.assistant.error .message-content {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #fed7d7;
}

.chat-message .message-content p {
  margin: 0 0 0.5rem 0;
}

.chat-message .message-content p:last-child {
  margin-bottom: 0;
}

.chat-message .message-content ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.chat-message .message-content li {
  margin-bottom: 0.25rem;
}

.chat-message .message-content code {
  background: rgba(0,0,0,0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.85em;
}

.chat-message .message-content pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 0.75rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.5rem 0;
}

.chat-message .message-content pre code {
  background: none;
  padding: 0;
}

.chat-loading {
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: flex-start;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
  background: #f1f3f4;
  border-radius: 12px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #6a737d;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid #e9ecef;
  background: white;
}

.chat-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: #667eea;
}

.chat-input:disabled {
  background: #f8f9fa;
}

.chat-send {
  width: 40px;
  height: 40px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.chat-send:hover {
  background: #5568d3;
}

.chat-send:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

.chat-send i {
  font-size: 1rem;
}

/* Mobile chat adjustments */
@media (max-width: 480px) {
  .chat-toggle {
    bottom: 1rem;
    right: 1rem;
    padding: 0.6rem 1rem;
  }

  .chat-toggle-text {
    display: none;
  }

  .chat-window {
    bottom: 4.5rem;
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    height: calc(100vh - 6rem);
    max-height: none;
  }
}

/* ================================
   Category Tiles (Browse Page)
   ================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
  max-width: 1000px;
  margin: 0 auto;
}

.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #e9ecef;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  text-align: center;
  min-height: 160px;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #667eea;
  text-decoration: none;
}

.tile-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.tile-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.tile-count {
  font-size: 0.85rem;
  color: #718096;
}

/* Category-specific accent colors on hover */
.category-tile.epidemiology:hover { border-color: #e53e3e; }
.category-tile.ropensci:hover { border-color: #38a169; }
.category-tile.tidyverse:hover { border-color: #3182ce; }
.category-tile.visualization:hover { border-color: #805ad5; }
.category-tile.spatial:hover { border-color: #d69e2e; }
.category-tile.statistics:hover { border-color: #319795; }
.category-tile.pharmacometrics:hover { border-color: #ed64a6; }
.category-tile.infrastructure:hover { border-color: #4a5568; }
.category-tile.general:hover { border-color: #667eea; }

/* Mobile adjustments */
@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem 0;
  }

  .category-tile {
    padding: 1.5rem 1rem;
    min-height: 140px;
  }

  .tile-icon {
    font-size: 2rem;
  }

  .tile-name {
    font-size: 1rem;
  }
}

/* ================================
   Google Reviews-Style System
   ================================ */

/* Large modal for reviews */
.modal-large {
  max-width: 900px;
  padding: 0;
}

.review-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
}

/* Left side: Existing reviews */
.reviews-section {
  padding: 1.5rem;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  overflow-y: auto;
  max-height: 600px;
}

.reviews-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #2d3748;
}

.review-pkg-name {
  color: #667eea;
  font-weight: 600;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.review-author {
  font-weight: 600;
  color: #2d3748;
}

.review-rating {
  color: #ffc107;
  letter-spacing: 1px;
}

.review-date {
  color: #6a737d;
  font-size: 0.85rem;
  margin-left: auto;
}

.review-title {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.review-comment {
  color: #4a5568;
  line-height: 1.5;
  font-size: 0.95rem;
}

.review-usecase {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
  font-size: 0.85rem;
  color: #6a737d;
}

.review-usecase strong {
  color: #4a5568;
}

.loading-reviews,
.no-reviews {
  text-align: center;
  color: #6a737d;
  padding: 2rem 1rem;
  font-style: italic;
}

/* Right side: Submit form */
.submit-section {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 600px;
}

.submit-section h3 {
  margin: 0 0 1.25rem 0;
  font-size: 1.1rem;
  color: #2d3748;
}

/* Star rating input (clickable) */
.star-rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
}

.star-rating-input input {
  display: none;
}

.star-rating-input label {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.1s;
}

.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
  color: #ffc107;
}

/* Full-width button */
.btn-block {
  display: block;
  width: 100%;
}

.btn-primary:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}

/* Package card review display */
.package-review-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin: 0.5rem 0;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  margin-left: -0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.package-review-summary:hover {
  background: #f8f9fa;
}

.package-review-empty {
  opacity: 0.7;
}

.package-review-empty:hover {
  opacity: 1;
  background: #fff3cd;
}

.review-cta {
  color: #856404;
}

.review-stars {
  color: #ffc107;
  letter-spacing: 1px;
}

.review-stars-empty {
  color: #ddd;
}

.review-count {
  color: #6a737d;
}

.review-avg {
  font-weight: 600;
  color: #2d3748;
}

/* Review button in package card */
.btn-review {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #856404;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: background 0.2s;
}

.btn-review:hover {
  background: #ffe69c;
}

/* Mobile adjustments for review modal */
@media (max-width: 768px) {
  .modal-large {
    max-width: 100%;
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }

  .review-modal-grid {
    grid-template-columns: 1fr;
  }

  .reviews-section {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    max-height: 250px;
  }

  .submit-section {
    max-height: none;
  }
}

/* ================================
   Discover Section
   ================================ */
.discover-section {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.discover-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #2d3748;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.discover-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.discover-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #f1f3f4;
  border: 1px solid #dadce0;
  border-radius: 20px;
  font-size: 0.9rem;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.2s;
}

.discover-tab:hover {
  background: #e8eaeb;
}

.discover-tab.active {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.discover-tab i {
  font-size: 1rem;
}

.discover-scroll-container {
  position: relative;
  display: flex;
  align-items: center;
}

.discover-cards {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.discover-cards::-webkit-scrollbar {
  display: none;
}

.discover-scroll-btn {
  position: absolute;
  z-index: 10;
  width: 40px;
  height: 40px;
  background: white;
  border: 1px solid #dadce0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.discover-scroll-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.discover-scroll-left {
  left: -20px;
}

.discover-scroll-right {
  right: -20px;
}

.discover-scroll-btn i {
  font-size: 1.25rem;
  color: #3c4043;
}

.discover-card {
  flex: 0 0 200px;
  padding: 1rem;
  background: white;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.discover-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.discover-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.discover-card-name {
  font-weight: 600;
  color: #667eea;
  font-size: 1rem;
}

.discover-card-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.discover-card-version {
  font-size: 0.75rem;
  color: #6a737d;
  background: #f1f3f4;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

.discover-card-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
}

.discover-card-badge.badge-new {
  background: #d4edda;
  color: #155724;
}

.discover-card-badge.badge-updated {
  background: #cce5ff;
  color: #004085;
}

.discover-card-title {
  font-size: 0.85rem;
  color: #2d3748;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discover-card-desc {
  font-size: 0.8rem;
  color: #6a737d;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.discover-card-stats {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid #e9ecef;
}

.discover-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #6a737d;
}

.discover-stat i {
  font-size: 0.85rem;
}

.discover-stat i.bi-star-fill {
  color: #ffc107;
}

.discover-stat i.bi-download {
  color: #28a745;
}

.discover-empty {
  text-align: center;
  color: #6a737d;
  padding: 2rem;
  font-style: italic;
}

/* Hide discover when searching */
.discover-section.hidden {
  display: none;
}

/* Mobile adjustments for discover */
@media (max-width: 768px) {
  .discover-section {
    margin: 1.5rem auto;
  }

  .discover-title {
    font-size: 1.25rem;
  }

  .discover-scroll-btn {
    display: none;
  }

  .discover-card {
    flex: 0 0 180px;
  }

  .discover-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
  }

  .discover-tabs::-webkit-scrollbar {
    display: none;
  }
}

/* ================================
   Browse Page (Collapsible Sections)
   ================================ */
.browse-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.browse-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.browse-subtitle {
  color: #6a737d;
  font-size: 1.1rem;
  margin: 0;
}

/* Browse Search */
.browse-search {
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.category-search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  box-shadow: 0 1px 6px rgba(32,33,36,.1);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.category-search-input:hover {
  box-shadow: 0 2px 8px rgba(32,33,36,.15);
}

.category-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.browse-search-container {
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.browse-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.browse-search-icon {
  position: absolute;
  left: 1rem;
  color: #6a737d;
  font-size: 1rem;
}

.browse-search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-size: 1rem;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  box-shadow: 0 1px 6px rgba(32,33,36,.1);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.browse-search-input:hover {
  box-shadow: 0 2px 8px rgba(32,33,36,.15);
}

.browse-search-input:focus {
  outline: none;
  box-shadow: 0 2px 8px rgba(32,33,36,.2);
  border-color: #667eea;
}

.browse-search-results {
  margin-bottom: 1.5rem;
}

/* Browse Controls */
.browse-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.browse-actions {
  display: flex;
  gap: 0.5rem;
}

.browse-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.875rem;
  background: #f1f3f4;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.2s;
}

.browse-action-btn:hover {
  background: #e8eaeb;
  border-color: #c0c3c6;
}

.browse-action-btn i {
  font-size: 0.9rem;
}

/* Loading State */
.browse-loading {
  text-align: center;
  padding: 3rem;
  color: #6a737d;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 3px solid #e9ecef;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Browse Sections */
.browse-section {
  margin-bottom: 0.5rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  transition: background 0.2s;
}

.section-header:hover {
  background: #f1f3f4;
}

.section-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 0.2s;
}

.section-chevron i {
  font-size: 0.9rem;
  color: #6a737d;
}

.section-header.expanded .section-chevron {
  transform: rotate(90deg);
}

.section-name {
  flex: 1;
}

.section-count {
  font-size: 0.85rem;
  font-weight: 400;
  color: #6a737d;
}

/* Section Content (Collapsible) */
.section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.section-content.expanded {
  max-height: 2000px;
  transition: max-height 0.5s ease-in;
}

/* Category Cards Grid */
.category-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

/* Category Card */
.category-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

.category-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
  text-decoration: none;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-emoji {
  font-size: 2rem;
  line-height: 1;
}

.card-title-area {
  flex: 1;
  min-width: 0;
}

.card-name {
  display: block;
  font-weight: 600;
  color: #2d3748;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.card-count {
  display: inline-block;
  font-size: 0.75rem;
  color: #667eea;
  background: #f0f3ff;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.card-description {
  color: #6a737d;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 0.75rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category Card Link */
.category-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.category-card-link:hover {
  text-decoration: none;
}

.category-card {
  cursor: pointer;
}

.category-card-link:focus-visible {
  outline: 3px solid #667eea;
  outline-offset: 2px;
  border-radius: 10px;
}

.card-featured {
  cursor: default;
}

.featured-tile {
  cursor: pointer;
}


/* Featured Packages - Discover Style */
.card-featured {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f3f4;
}

.featured-label {
  font-size: 0.75rem;
  color: #6a737d;
  font-weight: 500;
}

.featured-scroll-container {
  position: relative;
  display: flex;
  align-items: center;
}

.featured-tiles {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.25rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.featured-tiles::-webkit-scrollbar {
  display: none;
}

.featured-tile {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  min-width: 85px;
  max-width: 100px;
}

.featured-tile:hover {
  background: white;
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
  text-decoration: none;
}

.featured-tile-logo {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.featured-tile-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.featured-tile-fallback {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 8px;
}

.featured-tile-name {
  font-size: 0.7rem;
  color: #2d3748;
  font-weight: 500;
  text-align: center;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-scroll-btn {
  position: absolute;
  z-index: 5;
  width: 24px;
  height: 24px;
  background: white;
  border: 1px solid #dadce0;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: all 0.2s;
  opacity: 0.3;
}

.featured-scroll-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.featured-scroll-left {
  left: -10px;
}

.featured-scroll-right {
  right: -10px;
}

.featured-scroll-btn i {
  font-size: 0.75rem;
  color: #3c4043;
}

/* Browse Error State */
.browse-error {
  text-align: center;
  padding: 3rem;
  color: #dc3545;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .browse-page {
    padding: 0.75rem;
  }

  .browse-controls {
    justify-content: center;
  }

  .category-cards {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .section-header {
    padding: 0.875rem 1rem;
  }

  .card-emoji {
    font-size: 1.75rem;
  }

  .card-name {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .browse-action-btn span {
    display: none;
  }

  .browse-action-btn {
    padding: 0.5rem 0.75rem;
  }

  .featured-scroll-btn {
    display: none;
  }

  .featured-tile {
    min-width: 60px;
    padding: 0.4rem;
  }

  .featured-tile-logo {
    width: 32px;
    height: 32px;
  }

  .featured-tile-fallback {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .featured-tile-name {
    font-size: 0.65rem;
    max-width: 55px;
  }
}
