:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--card-background);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

section {
    background: var(--card-background);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px -1px rgb(0 0 0 / 0.15);
}

h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-list {
    list-style: none;
    display: grid;
    gap: 1rem;
}

.tool-item {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    transition: var(--transition);
}

.tool-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tool-favicon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.tool-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.tool-link:hover {
    color: var(--secondary-color);
}

.tool-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .sections {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0f172a;
        --card-background: #1e293b;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
    }

    .tool-item {
        background: #272f3d;
    }

    .tool-item:hover {
        background: #323a4b;
    }

    .search-input {
        background-color: #272f3d;
        color: var(--text-primary);
        border-color: #3f4758;
    }
}

/* ... (previous CSS styles remain the same until .tool-list) ... */

.tool-section {
    position: relative;
    overflow: hidden;
}

.tool-list {
    list-style: none;
    display: grid;
    gap: 1rem;
    max-height: 400px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.tool-section.expanded .tool-list {
    max-height: 2000px;
}

.expand-button {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--card-background);
    border: 2px solid var(--primary-color);
    border-radius: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: none;
}

.expand-button:hover {
    background: var(--primary-color);
    color: white;
}

.show-less {
    display: none;
}

.tool-section.expanded .show-more {
    display: none;
}

.tool-section.expanded .show-less {
    display: inline;
}

.expand-button.visible {
    display: block;
}

/* Add these new styles to your existing CSS */

.bookmark-form {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-group {
        grid-template-columns: 1fr;
    }
}

.bookmark-form input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--card-background);
    color: var(--text-primary);
}

.bookmark-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.add-bookmark-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-bookmark-btn:hover {
    background-color: var(--secondary-color);
}

.bookmark-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.bookmark-actions button {
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.bookmark-actions button:hover {
    color: var(--primary-color);
}

.delete-btn:hover {
    color: #ef4444;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .bookmark-form input {
        background-color: #272f3d;
        border-color: #3f4758;
    }
}

/* Add this new style for section spacing */
#custom-bookmarks {
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 2rem;
}

/* Update the sections class */
.sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}