/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f9f9f9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: #3a86ff;
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

header h1 {
  margin-bottom: 0.5rem;
}

nav {
  margin-top: 1rem;
}

.back-link {
  color: white;
  text-decoration: none;
  display: inline-block;
}

.back-link:hover {
  text-decoration: underline;
}

/* Main Content Styles */
main {
  min-height: 70vh;
}

section {
  margin-bottom: 3rem;
}

h2 {
  margin-bottom: 1.5rem;
  color: #2b5590;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
}

input[type="text"] {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
}

input[type="file"] {
  display: block;
  width: 100%;
  padding: 1rem;
  border: 1px dashed #ddd;
  border-radius: 5px;
  margin-bottom: 1rem;
  background-color: #f5f5f5;
}

.generate-btn {
  padding: 0.8rem 3.5rem;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.8rem;
}

.primary-btn {
  background-color: #4caf50;
}

.primary-btn:hover {
  background-color: #388e3c;
}

/* Category filter styles */
.category-filter {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-filter label {
  font-weight: 500;
}

.category-filter select {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 16px;
  cursor: pointer;
  background-color: white;
}

.category-filter select:focus {
  outline: none;
  border-color: #6a5acd;
  box-shadow: 0 0 0 2px rgba(106, 90, 205, 0.2);
}

/* Category label on hobby cards */
.hobby-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #555;
  margin-bottom: 8px;
}


/* Add to your public/css/styles.css file */

.search-item.custom-entry {
  border-top: 1px dashed #ddd;
  padding-top: 8px;
  margin-top: 6px;
  font-style: italic;
  background-color: #f9f9f9;
}

.search-item.custom-entry strong {
  color: #333;
}

.search-item.selected {
  background-color: #eef2ff;
  font-weight: bold;
}

.status-card.suggestions {
  background-color: #f5f8ff;
  border: 1px solid #dce6ff;
  border-left: 4px solid #17a2b8;
  padding: 15px;
  border-radius: 8px;
  margin: .5px 0 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.suggestion-link {
  color: #4a6bf5;
  text-decoration: underline;
  cursor: pointer;
}

.suggestion-link:hover {
  color: #3048b8;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 0;
  list-style: none;
  margin: 0;
}

.pill {
  display: inline-block;
  padding: 10px 18px;
  background-color: #eaf1fb;
  border-radius: 9999px;
  color: #1a73e8;
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pill:hover {
  background-color: #1a73e8;
  color: #fff;
}

.suggestions-list {
  margin: 10px 0;
  padding-left: 20px;
}

.suggestion-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.proceed-anyway-btn {
  background-color: #f0f0f0;
  color: #555;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.proceed-anyway-btn:hover {
  background-color: #e0e0e0;
}

/* Improve loading indicator visibility */
#loading {
  font-size: 1.5rem;
  text-align: center;
  margin: .5px 0 0;
  padding: 15px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.spinner {
  margin: 10px auto;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #4a6bf5;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hobby Grid Styles */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.hobby-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.hobby-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.hobby-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.hobby-content {
  padding: 1.5rem;
}

.hobby-title {
  margin-bottom: 0.8rem;
}

.hobby-description {
  color: #666;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Levels Styles */
.levels-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.level-card {
  background-color: white;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.level-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.level-info {
  flex: 1;
}

.level-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
}

.difficulty {
  display: flex;
  gap: 2px;
  margin-bottom: 0.5rem;
}

.difficulty-dot {
  width: 12px;
  height: 12px;
  background-color: #ddd;
  border-radius: 50%;
}

.difficulty-dot.active {
  background-color: #3a86ff;
}

.level-actions button {
  padding: 0.5rem 1rem;
}

/* Detail Page Styles */
.hobby-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.hobby-detail-image {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
}

.hobby-detail-content {
  flex: 1;
}

.level-detail {
  background-color: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.task-media {
  margin: 1.5rem 0;
}

.task-media img,
.task-media video {
  max-width: 100%;
  border-radius: 5px;
}

.materials-list {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.task-description {
  line-height: 1.8;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.info-message {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.completed-badge {
  display: inline-block;
  background-color: #4caf50;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-left: 1rem;
}

.not-completed-badge {
  display: inline-block;
  background-color: #cf3838;
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-left: 1rem;
}

/* Spinner/Loading */
.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3a86ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Search bar */
.search-container {
  position: relative;
  margin: 10px auto 20px;
  width: 100%;
  max-width: 500px;
  display: flex;
}

/* #hobby-search {
  flex-grow: 1;
  padding: 5px 12px;
  font-size: 1.8rem;
  border: 2px solid #ccc;
  border-radius: 6px 0 0 6px;
  box-sizing: border-box;
} */

.search-btn {
  padding: 5px 15px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.8rem;
}

.search-btn:hover {
  background-color: #45a049;
}

.search-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
}

.search-dropdown.active {
  display: block;
}

.search-item {
  padding: 0 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 1.5rem;
}

.search-item:hover,
.search-item.selected {
  background-color: #f0f0f0;
}

.search-item.category-title, .search-item.hobby-title {
  padding: 0 15px;
  margin: 1rem 0 0;
  text-decoration: underline;
  font-weight: 700;
  color: #2b5590;
}

.status-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin: .5px 0 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.status-card.pending {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
}

.status-card.not-found {
  background-color: #e8f4fd;
  border-left: 4px solid #17a2b8;
}

.status-card h3 {
  margin-top: 0;
  color: #333;
}

.status-card p {
  margin-bottom: 15px;
  color: #555;
  font-size: 1.5rem;
}
