* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 10px;
}

.header-top h1 {
  margin: 0;
}

.logout-btn {
  position: absolute;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s, border-color 0.3s;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  font-size: 1.1em;
  opacity: 0.9;
}

.search-section {
  padding: 30px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  gap: 10px;
}

.search-box {
  flex: 1;
  padding: 12px 16px;
  font-size: 1em;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  transition: border-color 0.3s;
}

.search-box:focus {
  outline: none;
  border-color: #667eea;
}

.search-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.filters {
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #495057;
}

.filter-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.results-section {
  padding: 30px 20px;
}

.no-results {
  text-align: center;
  color: #868e96;
  font-size: 1.1em;
  padding: 40px 20px;
}

.pose-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 20px;
  transition: all 0.3s;
}

.pose-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  border-color: #667eea;
}

.pose-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.pose-title {
  font-size: 1.6em;
  font-weight: 700;
  color: #212529;
}

.pose-sanskrit {
  font-size: 0.9em;
  color: #764ba2;
  font-style: italic;
  margin-bottom: 5px;
}

.pose-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
}

.badge-category {
  background: #e7f5ff;
  color: #1971c2;
}

.badge-level {
  background: #f0f9ff;
  color: #0066cc;
}

.relevance-score {
  background: #fff3bf;
  color: #c47900;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 600;
  white-space: nowrap;
}

.pose-section {
  margin-top: 20px;
}

.pose-section-title {
  font-weight: 700;
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.1em;
}

.pose-list {
  list-style: none;
}

.pose-list li {
  padding: 8px 0;
  color: #495057;
  padding-left: 20px;
  position: relative;
}

.pose-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: #764ba2;
  font-weight: bold;
}

.muscle-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.muscle-badge {
  background: #f1f3f5;
  padding: 10px;
  border-radius: 6px;
  font-size: 0.9em;
  border-left: 3px solid #667eea;
}

.muscle-badge .label {
  font-weight: 600;
  color: #212529;
}

.muscle-badge .role {
  font-size: 0.85em;
  color: #764ba2;
  display: block;
  margin-top: 2px;
}

.intensity-bar {
  display: inline-block;
  width: 60px;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.intensity-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 3px;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.8em;
  }

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

  .pose-header {
    flex-direction: column;
    gap: 10px;
  }

  .relevance-score {
    align-self: flex-start;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-in;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  animation: slideUp 0.3s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #868e96;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #212529;
}

/* Summary List Styles */
.results-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.pose-summary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
  display: flex;
  flex-direction: column;
}

.pose-summary-image {
  width: 100%;
  height: 150px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pose-summary-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pose-summary:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.pose-summary-title {
  font-size: 1.3em;
  font-weight: 700;
  margin-bottom: 8px;
}

.pose-summary-sanskrit {
  font-size: 0.85em;
  opacity: 0.9;
  font-style: italic;
  margin-bottom: 12px;
}

.pose-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pose-summary-tag {
  background: rgba(255, 255, 255, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
}

.pose-summary-relevance {
  font-size: 0.9em;
  opacity: 0.85;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pose-summary-click {
  font-size: 0.8em;
  opacity: 0.75;
}

/* Pose Images */
.pose-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.pose-image-container {
  background: #f8f9fa;
  border-radius: 8px;
  overflow: visible;
  display: block;
  padding: 10px;
  min-height: 300px;
  width: 100%;
}

/* Footer and Disclaimer */
.app-footer {
  background: #f5f5f5;
  border-top: 1px solid #ddd;
  padding: 1.5rem 2rem;
  margin-top: 2rem;
  text-align: center;
}

.disclaimer-text {
  color: #d32f2f;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.copyright-text {
  color: #666;
  font-size: 0.85rem;
  margin: 0;
}

.pose-image-container img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 500px;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  object-fit: contain;
}

.pose-image-label {
  margin-top: 8px;
  font-size: 0.9em;
  color: #495057;
  font-weight: 600;
}

.pose-image-placeholder {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #e9ecef 0%, #f1f3f5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  font-weight: 600;
  color: #868e96;
  border-radius: 4px;
  border: 2px dashed #dee2e6;
}
