.discover-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.discover-title-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.discover-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.5px;
}

.discover-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'DM Sans', sans-serif;
}

.filter-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.filter-btn.active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.filter-count {
    background: #3b82f6;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 0;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #1d4ed8;
}

.active-filter-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: #93c5fd;
    font-size: 15px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.1s;
}

.active-filter-tag button:hover {
    color: #1d4ed8;
}

.discover-search-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.discover-search-wrap {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.search-icon-inline {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.discover-search {
    width: 100%;
    padding: 11px 14px 11px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
    outline: none;
    font-family: 'DM Sans', sans-serif;
}

.discover-search:focus {
    border-color: #94a3b8;
}

.discover-search::placeholder {
    color: #cbd5e1;
}

.results-count {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.set-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

.set-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.set-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 6px;
}

.set-students {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 16px;
}

.set-students-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
}

.set-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    flex: 1;
    align-content: flex-start;
}

.set-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.set-tag.level-tag {
    background: #fef9ec;
    color: #92400e;
    border: 1px solid #fde68a;
}

.set-tag.subject-tag {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.set-tag.school-tag {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.set-card-divider {
    height: 1px;
    background: #f1f5f9;
    margin-bottom: 16px;
}

.set-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.set-creator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.creator-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.set-card-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: #94a3b8;
    font-size: 13px;
}

.set-card:hover .set-card-arrow {
    background: #0f172a;
    color: #fff;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 10px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.empty-sub {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.clear-all-btn {
    padding: 9px 22px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.clear-all-btn:hover {
    opacity: 0.85;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    padding-bottom: 12px;
}

.pagination-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'DM Sans', sans-serif;
}

.pagination-arrow:hover:not(:disabled) {
    border-color: #94a3b8;
    color: #0f172a;
}

.pagination-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-num-btn {
    width: 38px;
    height: 38px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'DM Sans', sans-serif;
}

.page-num-btn:hover {
    border-color: #94a3b8;
    color: #0f172a;
}

.page-num-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.page-info {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
    padding: 0 6px;
}

.filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    z-index: 900;
    backdrop-filter: blur(2px);
}

.filter-overlay.active {
    display: block;
}

.filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 360px;
    background: #fff;
    z-index: 901;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 40px rgba(15, 23, 42, 0.1);
}

.filter-panel.open {
    transform: translateX(0);
}

.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.filter-panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.filter-panel-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    transition: all 0.1s;
}

.filter-panel-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.filter-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-section-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.filter-school-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-school-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    outline: none;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.filter-school-input:focus {
    border-color: #94a3b8;
}

.filter-school-input::placeholder {
    color: #cbd5e1;
}

.filter-school-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

.filter-school-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    margin-top: 10px;
    width: fit-content;
}

.filter-school-tag button {
    background: none;
    border: none;
    cursor: pointer;
    color: #86efac;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.1s;
}

.filter-school-tag button:hover {
    color: #166534;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    padding: 6px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'DM Sans', sans-serif;
}

.filter-chip:hover {
    border-color: #94a3b8;
    color: #0f172a;
}

.filter-chip.selected {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.filter-panel-footer {
    display: flex;
    gap: 10px;
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
}

.filter-clear-btn {
    flex: 1;
    padding: 11px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.filter-clear-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.filter-apply-btn {
    flex: 1;
    padding: 11px;
    background: #0f172a;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: 'DM Sans', sans-serif;
}

.filter-apply-btn:hover {
    opacity: 0.85;
}

.set-card-skeleton {
    background: #fff;
    border: 1.5px solid #f1f5f9;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    background: #f1f5f9;
    border-radius: 6px;
    height: 14px;
}

.skeleton-line.short { width: 45%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.full { width: 100%; }
.skeleton-line.thin { height: 10px; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

@media (max-width: 768px) {
    .sets-grid { grid-template-columns: 1fr; }
    .discover-search-row { flex-direction: column; align-items: flex-start; }
    .discover-search-wrap { max-width: 100%; width: 100%; }
    .filter-panel { width: 100%; }
    .page-info { display: none; }
}