body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
    color: #333;
}

header {
    background: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.add-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.add-form form {
    display: flex;
    gap: 1rem;
}

.add-form input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.add-form button {
    padding: 0.8rem 1.5rem;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.bookmark-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.bookmark-card:hover {
    transform: translateY(-5px);
}

.bookmark-card .preview {
    height: 150px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bookmark-card .preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bookmark-card .info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bookmark-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.actions {
    margin-top: auto;
    text-align: right;
}

.delete-btn {
    color: #dc3545 !important;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid #dc3545;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #dc3545;
    color: #white !important;
}

.bookmark-card a {
    text-decoration: none;
    color: #007bff;
}

/* Login Page */
.login-page {
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
}

.login-page form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 300px;
    text-align: center;
}

.login-page input {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.8rem;
    box-sizing: border-box;
}

.login-page button {
    width: 100%;
    padding: 0.8rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
}
