.bookmarks-section {
    margin-top: 40px;
}

.bookmark-item {
    display: grid;
    grid-template-columns: 150px 0.9fr 110px;
    gap: 6px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 8px;
    padding-bottom: 16px;
}

.bookmark-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.bookmark-link {
    font-size: clamp(0.75rem, 1.2vw + 0.4rem, 0.9rem);
    color: rgb(115, 115, 115);
    font-weight: 500;
    font-family: 'Courier New', 'Monaco', 'Menlo', 'Consolas', monospace;
    position: relative;
}

.bookmark-link a {
    color: rgb(115, 115, 115);
    text-decoration: none;
    transition: color 0.3s ease;
}

.bookmark-link a:hover {
    color: var(--main-text-color);
}

/* URL Tooltip */
.url-tooltip {
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 5px;
    z-index: 1000;
}

.bookmark-link:hover .url-tooltip {
    opacity: 1;
}

.bookmark-title {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
}

.bookmark-title a {
    font-size: clamp(0.85rem, 1.4vw + 0.5rem, 0.97rem);
    color: var(--main-text-color);
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
}

.bookmark-title a:hover {
    background-color: rgba(128, 128, 128, 0.25);
}

.bookmark-tag {
    font-size: clamp(0.75rem, 1.2vw + 0.4rem, 0.9rem);
    color: rgb(115, 115, 115);
    text-align: right;
    font-weight: 500;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary, #666);
}

.error {
    text-align: center;
    padding: 3rem;
    color: var(--error-color, #d32f2f);
}

.no-bookmarks {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary, #666);
}

/* Dark mode adjustments */
body.dark-mode .bookmark-link a {
    color: rgb(163, 163, 163);
}

body.dark-mode .bookmark-link a:hover {
    color: rgb(163, 163, 163);
}

body.dark-mode .url-tooltip {
    background-color: #555;
}

body.dark-mode .bookmark-title a {
    color: rgb(163, 163, 163);
}

body.dark-mode .bookmark-title a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

body.dark-mode .bookmark-item {
    border-bottom-color: #333;
}

/* Tag Filter Styles */
.filter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px auto;
    padding: 0 16px;
    background-color: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    width: 208px;
    height: 36px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.filter-container:hover {
    background-color: #e8e8e8;
    border-color: #d0d0d0;
}

body.dark-mode .filter-container {
    background-color: #2a2a2a;
    border-color: #404040;
}

body.dark-mode .filter-container:hover {
    background-color: #353535;
    border-color: #505050;
}

/* Custom Tooltip */
.filter-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.filter-container:hover .filter-tooltip {
    opacity: 1;
}

body.dark-mode .filter-tooltip {
    background-color: #555;
}

.filter-tag-text {
    font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
    font-weight: 500;
    color: var(--main-text-color);
}

body.dark-mode .filter-tag-text {
    color: rgb(163, 163, 163);
}

/* Make tags clickable */
.bookmark-tag {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bookmark-tag:hover {
    opacity: 0.7;
}

/* Mobile Layout */
@media (max-width: 768px) {
    .bookmark-item {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 12px 0;
        margin-bottom: 12px;
        padding-bottom: 16px;
        border-bottom: 1px solid #e5e5e5;
    }

    .bookmark-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .bookmark-link {
        text-align: left;
        font-size: clamp(0.8rem, 2vw + 0.4rem, 0.9rem);
        margin-bottom: 4px;
    }

    .bookmark-title {
        margin-bottom: 2px;
        display: flex;
        align-items: baseline;
    }

    .bookmark-title::before {
        content: '•';
        color: rgb(115, 115, 115);
        font-size: 1.2rem;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .bookmark-title a {
        padding: 0;
        font-size: clamp(0.9rem, 2.5vw + 0.5rem, 1rem);
    }

    .bookmark-tag {
        display: none;
    }

    .url-tooltip {
        left: 0;
        transform: none;
    }

    body.dark-mode .bookmark-title::before {
        color: rgb(163, 163, 163);
    }

    body.dark-mode .bookmark-item {
        border-bottom-color: #333;
    }
}
