[data-bookmark-button] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: #ffffff;
    color: #334155;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

[data-bookmark-button] svg {
    width: 1rem;
    height: 1rem;
    transition: transform 150ms ease, fill 150ms ease;
}

[data-bookmark-button]:hover,
[data-bookmark-button]:focus-visible {
    border-color: #6366f1;
    color: #4338ca;
    background: #f8fafc;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.12);
    outline: none;
}

[data-bookmark-button].bookmarked {
    border-color: #facc15;
    background: #fef9c3;
    color: #b45309;
}

[data-bookmark-button].bookmarked svg {
    fill: currentColor;
}

[data-bookmark-button].bookmarked:hover,
[data-bookmark-button].bookmarked:focus-visible {
    border-color: #f97316;
    color: #c2410c;
    background: #fff7ed;
}

.dark [data-bookmark-button] {
    background: #1f2937;
    border-color: #334155;
    color: #e2e8f0;
}

.dark [data-bookmark-button]:hover,
.dark [data-bookmark-button]:focus-visible {
    border-color: #818cf8;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.2);
}

.dark [data-bookmark-button].bookmarked {
    border-color: rgba(250, 204, 21, 0.6);
    background: rgba(250, 204, 21, 0.18);
    color: #facc15;
}

.dark [data-bookmark-button].bookmarked:hover,
.dark [data-bookmark-button].bookmarked:focus-visible {
    border-color: rgba(251, 191, 36, 0.75);
    color: #fde68a;
    background: rgba(234, 179, 8, 0.22);
}

.bookmark-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    padding: 1rem;
    backdrop-filter: blur(2px);
}

.bookmark-modal {
    width: min(32rem, 100%);
    border-radius: 1rem;
    background: #ffffff;
    padding: 2rem;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
}

.bookmark-modal h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

.bookmark-modal label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

.bookmark-modal textarea {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #cbd5e1;
    resize: vertical;
    min-height: 6rem;
    font: inherit;
    color: #1f2937;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.bookmark-modal textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
}

.bookmark-modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.bookmark-modal-actions button {
    border: none;
    border-radius: 0.75rem;
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.bookmark-modal-actions button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.4);
    outline-offset: 2px;
}

.bookmark-modal-actions .btn-cancel {
    background: #e2e8f0;
    color: #334155;
}

.bookmark-modal-actions .btn-cancel:hover {
    background: #cbd5e1;
}

.bookmark-modal-actions .btn-save {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.25);
}

.bookmark-modal-actions .btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(79, 70, 229, 0.28);
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 120;
    padding: 0.9rem 1.4rem;
    border-radius: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 180ms ease, transform 180ms ease;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #ef4444;
}

.toast-info {
    background: #6366f1;
}

.dark .bookmark-modal {
    background: #0f172a;
    color: #e2e8f0;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.45);
}

.dark .bookmark-modal h3 {
    color: #f8fafc;
}

.dark .bookmark-modal textarea {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

.dark .bookmark-modal textarea:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.25);
}

.dark .bookmark-modal-actions .btn-cancel {
    background: #1e293b;
    color: #cbd5f5;
}

.dark .bookmark-modal-actions .btn-cancel:hover {
    background: #273449;
}

.dark .bookmark-modal-actions .btn-save {
    background: #6366f1;
    box-shadow: 0 14px 32px rgba(99, 102, 241, 0.32);
}

.dark .toast {
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.45);
}

.dark .toast-success {
    background: #059669;
}

.dark .toast-error {
    background: #dc2626;
}

.dark .toast-info {
    background: #4c1d95;
}
