.matches-container {
  flex: 1; /* Allow container to grow/shrink */
  display: flex;
  flex-direction: column;
  align-items: center; /* Keep card centered horizontally */
  justify-content: space-between; /* Push card up, buttons down */
  padding: 12px 12px 60px 12px;
  position: relative;
  min-height: 0; /* Prevent flexbox overflow issues in some browsers */
  /* The parent .app-content handles scrolling */
}

.loading, .error-state, .no-matches {
  text-align: center;
  padding: 24px;
  max-width: 320px;
  margin: 0 auto;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #ffc107; /* Replaced purple with gold */
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-state h3, .no-matches h3 {
  color: #333;
  margin-bottom: 12px;
}

.error-state p, .no-matches p {
  color: #666;
}

.offline-message, .offline-note {
  margin-top: 16px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
  color: #666;
}

.analysis-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.analysis-content {
  background-color: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 90%;
  width: 400px;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
}

.analysis-content h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
}

.analysis-content p {
  margin-bottom: 16px;
  line-height: 1.5;
}

.close-analysis-button {
  background-color: #ffc107;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
  margin-top: 16px;
  transition: background-color 0.2s;
}

.close-analysis-button:hover {
  background-color: #e0a800; /* Replaced purple with a darker gold for hover */
}

.offline-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background-color: #f8f9fa;
  color: #666;
  padding: 8px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid #e9ecef;
  z-index: 100;
}

.offline-icon {
  display: inline-block;
  margin-right: 6px;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .matches-container {
    padding: 12px 12px 60px 12px;
  }
  
  .analysis-content {
    padding: 16px;
  }
}
