body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f8fafc;
  color: #334155;
}

#app {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 1rem;
  background: white;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
}

.bookmark-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.bookmark-button:hover {
  background: #2563eb;
}

.clip-content-button.active {
  background: #94a3b8;
}

.clip-content-button.active:hover {
  background: #64748b;
}

.search-container {
  margin-bottom: 0.5rem;
}

#search {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  outline: none;
  box-sizing: border-box;
}

#search:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.sort-container select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background: white;
  cursor: pointer;
}

#clips-container {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.clip-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.clip-preview {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #f1f5f9;
}

.clip-content {
  padding: 1rem;
}

.clip-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.clip-keywords {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.keyword {
  background: #e2e8f0;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.875rem;
}

.clip-date {
  color: #64748b;
  font-size: 0.875rem;
}

.clip-toolbar {
  display: flex;
  justify-content: space-between;
}

.clip-toolbar button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #3b82f6;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.summarizing .search-container,
.summarizing .sort-container {
  display: none;
}

.summary-container {
  display: none;
  background: rgb(225, 225, 225);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
}

.summary-container header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-container h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  
}

.summary-container button {
  background: transparent;
  border: none;
  color: #3b82f6;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.summarizing .summary-container {
  display: block;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.summarize-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;

  .loading-spinner {
    color: #3b82f6;
    animation: spin 1s linear infinite;
  }
}
