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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 2rem;
}

nav {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
}

.nav-links a {
    margin-left: 1.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: #000;
}

main {
    flex: 1;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.search-section {
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
}

.search-form input:focus {
    border-color: #999;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.search-form button:hover {
    background: #000;
}

.results-info {
    color: #666;
    margin-bottom: 1.5rem;
}

.bookmark-list {
    list-style: none;
}

.bookmark-item {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.bookmark-item h3 {
    margin-bottom: 0.5rem;
}

.bookmark-item h3 a {
    color: #0066cc;
    text-decoration: none;
}

.bookmark-item h3 a:hover {
    text-decoration: underline;
}

.bookmark-url {
    font-size: 0.85rem;
    color: #888;
    word-break: break-all;
    margin-bottom: 0.5rem;
}

.bookmark-excerpt {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.75rem;
}

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

.tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: #e8e8e8;
    color: #555;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
}

.tag:hover {
    background: #ddd;
    color: #333;
}

.tags-header {
    margin-bottom: 1.5rem;
}

.tags-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.tag-link:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.tag-name {
    color: #333;
    font-weight: 500;
}

.tag-count {
    background: #e8e8e8;
    color: #666;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

footer {
    text-align: center;
    padding: 1rem;
    color: #888;
    font-size: 0.85rem;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

@media (max-width: 600px) {
    main {
        padding: 1rem;
    }

    header {
        padding: 1rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form button {
        width: 100%;
    }
}
