/* ========================================
   MANIFEST0_ Design System for Bookmarks
   Based on manifesto.ink design tokens
   ======================================== */

:root {
  /* Light Mode Tokens (Manifesto) */
  --background: 255 255 255;
  --foreground: 24 24 27; /* Zinc 900 */

  --card: 255 255 255;
  --card-foreground: 24 24 27;

  --primary: 24 24 27;
  --primary-foreground: 250 250 250;

  --secondary: 244 244 245; /* Zinc 100 */
  --secondary-foreground: 24 24 27;

  --muted: 244 244 245;
  --muted-foreground: 113 113 122; /* Zinc 500 */

  --accent: 244 244 245;
  --accent-foreground: 24 24 27;

  --success: 22 163 74; /* Green 600 */
  --warning: 234 179 8; /* Yellow 500 */
  --info: 37 99 235; /* Blue 600 */

  --border: 228 228 231; /* Zinc 200 */
  --input: 228 228 231;
  --ring: 24 24 27;

  --brand: 22 163 74; /* Green 600 */

  --radius: 0.25rem;
}

/* Dark Mode Tokens (Manifesto) */
.dark, body {
  --background: 9 9 11; /* Zinc 950 */
  --foreground: 250 250 250; /* Zinc 50 */

  --card: 9 9 11;
  --card-foreground: 250 250 250;

  --primary: 250 250 250;
  --primary-foreground: 9 9 11;

  --secondary: 39 39 42; /* Zinc 800 */
  --secondary-foreground: 250 250 250;

  --muted: 39 39 42;
  --muted-foreground: 161 161 170; /* Zinc 400 */

  --accent: 39 39 42;
  --accent-foreground: 250 250 250;

  --success: 34 197 94; /* Green 500 */
  --warning: 250 204 21; /* Yellow 400 */
  --info: 96 165 250; /* Blue 400 */

  --border: 39 39 42;
  --input: 39 39 42;
  --ring: 212 212 216;

  --brand: 34 197 94; /* Green 500 */
}

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

body {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  background: rgb(var(--background));
  color: rgb(var(--foreground));
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  position: relative;
  overflow-x: hidden;
}

/* Subtle Background Gradient */
.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    circle at 20% 50%,
    rgba(var(--brand), 0.03) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 80% 80%,
    rgba(var(--info), 0.02) 0%,
    transparent 50%
  );
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 4rem 0 3rem;
  position: relative;
}

.header-badge {
  display: inline-block;
  padding: 0.375rem 1rem;
  background: rgba(var(--brand), 0.1);
  border: 1px solid rgba(var(--brand), 0.2);
  border-radius: 2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--brand));
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.subtitle {
  color: rgb(var(--muted-foreground));
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(var(--card), 0.5);
  backdrop-filter: blur(20px);
  padding: 1.75rem;
  border-radius: calc(var(--radius) * 2);
  border: 1px solid rgba(var(--border), 0.5);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    rgb(var(--brand)),
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--brand), 0.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(var(--brand), 0.1);
  background: rgba(var(--card), 0.8);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: rgb(var(--brand));
  margin-bottom: 0.25rem;
}

.stat-label {
  color: rgb(var(--muted-foreground));
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Controls */
.controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  color: rgb(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-box input:focus {
  outline: none;
  border-color: rgb(var(--brand));
  box-shadow: 0 0 0 3px rgba(var(--brand), 0.1);
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(var(--muted-foreground));
  font-size: 1rem;
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn, .add-btn {
  padding: 0.625rem 1.25rem;
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  color: rgb(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  text-transform: capitalize;
}

.filter-btn:hover, .add-btn:hover {
  background: rgb(var(--accent));
  border-color: rgb(var(--brand));
  transform: translateY(-1px);
}

.filter-btn.active {
  background: rgb(var(--brand));
  border-color: rgb(var(--brand));
  color: rgb(var(--primary-foreground));
}

.add-btn {
  background: rgb(var(--brand));
  border-color: rgb(var(--brand));
  color: rgb(var(--primary-foreground));
  font-weight: 600;
}

.add-btn:hover {
  background: rgb(22 163 74);
  box-shadow: 0 2px 8px rgba(var(--brand), 0.3);
}

/* Categories Section */
.categories-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(var(--card), 0.5);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--border), 0.5);
  border-radius: calc(var(--radius) * 2);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgb(var(--foreground));
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.title-icon {
  font-size: 1.125rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: rgb(var(--secondary));
  border: 2px solid rgb(var(--border));
  border-radius: calc(var(--radius) * 4);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(var(--foreground));
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.category-pill:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--brand));
  background: rgb(var(--accent));
  box-shadow: 0 4px 12px rgba(var(--brand), 0.15);
}

.category-pill.active {
  background: rgb(var(--brand));
  border-color: rgb(var(--brand));
  color: rgb(var(--primary-foreground));
  box-shadow: 0 4px 16px rgba(var(--brand), 0.3);
}

.category-pill .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  background: rgba(var(--brand), 0.15);
  border-radius: calc(var(--radius) * 2);
  font-size: 0.6875rem;
  font-weight: 700;
  color: rgb(var(--brand));
}

.category-pill.active .count {
  background: rgba(255, 255, 255, 0.2);
  color: rgb(var(--primary-foreground));
}

/* Tags Section */
.tags-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(var(--card), 0.5);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--border), 0.5);
  border-radius: calc(var(--radius) * 2);
}

.show-all-tags-btn {
  margin-left: auto;
  padding: 0.375rem 0.875rem;
  background: rgba(var(--brand), 0.1);
  border: 1px solid rgba(var(--brand), 0.3);
  border-radius: calc(var(--radius) * 2);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(var(--brand));
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.show-all-tags-btn:hover {
  background: rgba(var(--brand), 0.2);
  transform: scale(1.05);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tag-cloud.expanded {
  max-height: none;
}

.cloud-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: calc(var(--radius) * 2);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgb(var(--muted-foreground));
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.cloud-tag:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--brand));
  color: rgb(var(--foreground));
  background: rgb(var(--accent));
  box-shadow: 0 2px 8px rgba(var(--brand), 0.1);
}

.cloud-tag.active {
  background: rgba(var(--brand), 0.15);
  border-color: rgba(var(--brand), 0.5);
  color: rgb(var(--brand));
  font-weight: 600;
}

.cloud-tag .tag-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  background: rgba(var(--muted-foreground), 0.1);
  border-radius: calc(var(--radius) * 1.5);
  font-size: 0.625rem;
  font-weight: 700;
}

.cloud-tag.active .tag-count {
  background: rgba(var(--brand), 0.2);
  color: rgb(var(--brand));
}

/* View Controls */
.view-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(var(--card), 0.5);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--border), 0.5);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: rgba(var(--brand), 0.15);
  border: 1px solid rgba(var(--brand), 0.3);
  border-radius: calc(var(--radius) * 2);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgb(var(--brand));
}

.active-filter-tag .remove-filter {
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  font-weight: 700;
}

.active-filter-tag .remove-filter:hover {
  opacity: 1;
}

.view-mode {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.control-label {
  color: rgb(var(--muted-foreground));
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.view-btn {
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgb(var(--muted-foreground));
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover {
  background: rgb(var(--accent));
  border-color: rgb(var(--brand));
  color: rgb(var(--foreground));
  transform: translateY(-1px);
}

.view-btn.active {
  background: rgb(var(--brand));
  border-color: rgb(var(--brand));
  color: rgb(var(--primary-foreground));
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.sort-select {
  padding: 0.5rem 0.875rem;
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  color: rgb(var(--foreground));
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 180px;
}

.sort-select:hover {
  border-color: rgb(var(--brand));
  background: rgb(var(--accent));
}

.sort-select:focus {
  outline: none;
  border-color: rgb(var(--brand));
  box-shadow: 0 0 0 3px rgba(var(--brand), 0.1);
}

.results-count {
  color: rgb(var(--muted-foreground));
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  margin-left: auto;
}

.results-count span {
  color: rgb(var(--brand));
  font-weight: 700;
}

/* Bookmarks Grid */
.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

/* List View */
.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.bookmarks-list .bookmark-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.75rem 1.25rem;
  align-items: start;
  padding: 1.25rem 1.5rem;
}

.bookmarks-list .bookmark-header {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  flex-direction: column;
  gap: 0.5rem;
}

.bookmarks-list .bookmark-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-size: 1rem;
}

.bookmarks-list .favorite-btn {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
}

.bookmarks-list .bookmark-description {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  font-size: 0.8125rem;
}

.bookmarks-list .bookmark-category {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
}

.bookmarks-list .bookmark-tags {
  grid-column: 3;
  grid-row: 2;
  margin: 0;
  justify-content: flex-end;
}

.bookmarks-list .bookmark-meta {
  grid-column: 2 / -1;
  grid-row: 3;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

/* Bookmark Card */
.bookmark-card {
  background: rgba(var(--card), 0.5);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--border), 0.5);
  border-radius: calc(var(--radius) * 2.5);
  padding: 1.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bookmark-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(var(--brand), 0.05) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.bookmark-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(var(--brand), 0.2);
  border-color: rgba(var(--brand), 0.5);
  background: rgba(var(--card), 0.8);
}

.bookmark-card:hover::after {
  opacity: 1;
}

.bookmark-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.bookmark-type {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: calc(var(--radius) * 2);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgb(var(--muted-foreground));
}

.type-github {
  color: rgb(var(--success));
  background: rgba(var(--success), 0.1);
  border-color: rgba(var(--success), 0.2);
}

.type-twitter, .type-x {
  color: rgb(var(--info));
  background: rgba(var(--info), 0.1);
  border-color: rgba(var(--info), 0.2);
}

.type-website {
  color: rgb(var(--warning));
  background: rgba(var(--warning), 0.1);
  border-color: rgba(var(--warning), 0.2);
}

.favorite-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: rgb(var(--muted-foreground));
}

.favorite-btn.active {
  color: rgb(var(--warning));
  transform: scale(1.1);
}

.favorite-btn:hover {
  transform: scale(1.2);
}

.bookmark-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: rgb(var(--foreground));
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.bookmark-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bookmark-title a:hover {
  color: rgb(var(--brand));
}

.bookmark-description {
  color: rgb(var(--muted-foreground));
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.bookmark-category {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: rgba(var(--brand), 0.1);
  color: rgb(var(--brand));
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.bookmark-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.1875rem 0.5rem;
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.6875rem;
  color: rgb(var(--muted-foreground));
  font-weight: 500;
}

.bookmark-meta {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  color: rgb(var(--muted-foreground));
  font-size: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(var(--border));
}

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

.meta-icon {
  font-size: 0.875rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: rgb(var(--card));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(var(--border));
}

.modal-header h2 {
  font-size: 1.5rem;
  color: rgb(var(--foreground));
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: rgb(var(--muted-foreground));
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0.25rem;
}

.close-btn:hover {
  color: rgb(var(--foreground));
  transform: rotate(90deg);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: rgb(var(--foreground));
  font-weight: 600;
  font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  color: rgb(var(--foreground));
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: rgb(var(--brand));
  box-shadow: 0 0 0 3px rgba(var(--brand), 0.1);
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(var(--border));
}

.btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-primary {
  background: rgb(var(--brand));
  border-color: rgb(var(--brand));
  color: rgb(var(--primary-foreground));
}

.btn-primary:hover {
  background: rgb(22 163 74);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--brand), 0.3);
}

.btn-secondary {
  background: transparent;
  color: rgb(var(--foreground));
}

.btn-secondary:hover {
  background: rgb(var(--secondary));
}

/* Import Modal Specific */
.import-instructions {
  background: rgb(var(--secondary));
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border-left: 3px solid rgb(var(--brand));
}

.import-instructions p {
  margin-bottom: 0.5rem;
  color: rgb(var(--muted-foreground));
  font-size: 0.875rem;
}

.import-instructions ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.import-instructions li {
  margin-bottom: 0.25rem;
  color: rgb(var(--muted-foreground));
  font-size: 0.875rem;
}

.import-instructions code {
  background: rgb(var(--muted));
  padding: 0.125rem 0.375rem;
  border-radius: calc(var(--radius) - 2px);
  font-family: inherit;
  font-size: 0.8125rem;
  color: rgb(var(--brand));
}

.file-input {
  padding: 0.625rem !important;
  cursor: pointer;
}

.file-info {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgb(var(--secondary));
  border-radius: var(--radius);
  font-size: 0.8125rem;
  color: rgb(var(--muted-foreground));
  display: none;
}

.file-info.active {
  display: block;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem;
  background: rgb(var(--secondary));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.radio-label:hover {
  border-color: rgb(var(--brand));
  background: rgb(var(--accent));
}

.radio-label input[type="radio"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: rgb(var(--brand));
}

.radio-label span {
  color: rgb(var(--foreground));
  font-weight: 500;
  font-size: 0.875rem;
}

.import-preview {
  background: rgba(var(--brand), 0.1);
  border: 1px solid rgba(var(--brand), 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.import-preview h3 {
  color: rgb(var(--brand));
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.import-preview p {
  color: rgb(var(--muted-foreground));
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.import-preview strong {
  color: rgb(var(--foreground));
  font-weight: 600;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: rgb(var(--muted-foreground));
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: rgb(var(--foreground));
  margin-bottom: 0.5rem;
}

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

.bookmark-card {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrollbar (Manifesto Style) */
::-webkit-scrollbar {
  width: 10px;
  background: rgb(var(--background));
}

::-webkit-scrollbar-thumb {
  background: rgb(var(--border));
  border: 1px solid rgb(var(--background));
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--muted-foreground));
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .container {
    padding: 1rem;
  }

  .controls {
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .categories-section,
  .tags-section {
    padding: 1rem;
  }

  .section-title {
    font-size: 0.875rem;
    flex-wrap: wrap;
  }

  .show-all-tags-btn {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .category-pills {
    gap: 0.5rem;
  }

  .category-pill {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }

  .tag-cloud {
    max-height: 150px;
  }

  .cloud-tag {
    font-size: 0.6875rem;
    padding: 0.375rem 0.75rem;
  }

  .view-controls {
    gap: 1rem;
    padding: 1rem;
    flex-direction: column;
  }

  .view-mode,
  .sort-control {
    width: 100%;
  }

  .sort-control {
    flex: 1;
    min-width: 0;
  }

  .sort-select {
    min-width: 0;
    width: 100%;
  }

  .active-filters {
    width: 100%;
    order: -1;
  }

  .results-count {
    width: 100%;
    text-align: center;
    margin-left: 0;
  }

  .bookmarks-grid {
    grid-template-columns: 1fr;
  }

  .bookmarks-list .bookmark-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 1rem;
  }

  .bookmarks-list .bookmark-header,
  .bookmarks-list .bookmark-title,
  .bookmarks-list .favorite-btn,
  .bookmarks-list .bookmark-description,
  .bookmarks-list .bookmark-category,
  .bookmarks-list .bookmark-tags,
  .bookmarks-list .bookmark-meta {
    grid-column: 1;
    grid-row: auto;
  }

  .bookmarks-list .bookmark-tags {
    justify-content: flex-start;
  }

  .modal-content {
    padding: 1.5rem;
  }
}

/* Focus States (Manifesto) */
:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px rgb(var(--background)), 0 0 0 4px rgb(var(--brand));
}

html {
  scroll-behavior: smooth;
}
