body {
    font-family: system-ui, sans-serif;
    background: #fafafa;
    color: #333;
    margin: 2rem auto;
    max-width: 900px;
}

h1 {
    text-align: center;
    margin-bottom: 1rem;
}

.search-container {
    text-align: center;
    margin-bottom: 2rem;
}

#searchInput {
    width: 80%;
    max-width: 500px;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 9999px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#searchInput:focus {
    border-color: #0077cc;
    box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.2);
}

.pdf-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-inline: 1.5em;
}

.pdf-item {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 2em;
}

summary::before {
    content: "";
    position: absolute;
    left: 0.5em;
    top: 50%;
    width: 0.4em;
    height: 0.4em;
    border-right: 2px solid #555;
    border-bottom: 2px solid #555;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.2s ease;
}

details[open] > summary::before {
    transform: translateY(-50%) rotate(45deg);
}

.pdf-title {
    font-weight: 600;
    font-size: 1.1em;
}

.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: right;
}

.tag {
    background: #eee;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8em;
    text-transform: capitalize;
}

.difficulty.easy {
    background: #b6f2b6;
}

.difficulty.medium {
    background: #f2e6b6;
}

.difficulty.hard {
    background: #f2b6b6;
}

.details {
    margin-top: 1rem;
    border-top: 1px solid #ddd;
    padding-left: 1em;
    padding-top: 0.5rem;
}

a {
    color: #0077cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}