.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.header h1 { font-size: 20px; font-weight: 700; }
.header h1 .title-accent { color: var(--primary); }

.library-container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.library-title { font-size: 24px; margin-bottom: 24px; font-weight: 700; }

.library-filters {
  display: flex; gap: 8px; margin-bottom: 24px;
  overflow-x: auto; padding-bottom: 4px;
}
.filter-btn {
  padding: 8px 16px; border-radius: 20px; border: 2px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap;
}
.filter-btn:hover { background: var(--bg); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.library-search-wrapper { margin-bottom: 16px; }
.library-search {
  width: 100%; max-width: 400px; padding: 12px 16px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; background: var(--surface); color: var(--text);
}
.library-search:focus { outline: none; border-color: var(--primary); }

.library-sort-wrapper { margin-top: 12px; }
.library-sort-select {
  padding: 8px 12px; border-radius: var(--radius-sm); border: 2px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer;
}

.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.test-card {
  background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 20px; cursor: pointer; transition: all 0.2s;
  position: relative; overflow: hidden;
}
.test-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.test-card-skill {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 20px; display: inline-block; margin-bottom: 8px;
}
.skill-reading { background: var(--reading); color: #fff; }
.skill-listening { background: var(--listening); color: #fff; }
.skill-writing { background: var(--writing); color: #fff; }
.skill-speaking { background: var(--speaking); color: #fff; }

.test-card-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.test-card-meta { font-size: 13px; color: var(--text-muted); }
.test-card-count { font-size: 12px; font-weight: 700; color: var(--primary); margin-top: 10px; }

.bookmark-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  z-index: 2; position: relative;
}
.bookmark-btn:hover { background: var(--bg); }
.bookmark-btn.bookmarked { color: var(--warning); }

.difficulty-badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 20px; display: inline-block;
}

/* Hero section */
.library-hero { margin-bottom: 32px; }
.stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.stat-pill {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 16px; text-align: center; min-width: 90px;
}

/* Continue banner */
.continue-banner {
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  color: #fff; border-radius: var(--radius); padding: 16px 20px;
  margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.continue-banner:hover { transform: translateY(-1px); }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 20px 0; }
.feature-badge {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; display: flex; flex-direction: column; gap: 6px; transition: all 0.2s;
}
.feature-badge:hover { border-color: var(--primary); }
