/* Define color palettes using CSS variables */
:root {
    /* Light Mode (Default) */
    --page-background-start: white;
    --page-background-end: #DBD7D2;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark Mode */
        --page-background-start: #2c2c2c;
        --page-background-end: black;
    }
}

/* General page setup */
body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: sans-serif;
    
    /* Apply the background using our variables */
    background-color: var(--page-background-end);
    background-image: linear-gradient(to bottom, var(--page-background-start), var(--page-background-end));
    
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* The grid container */
.bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    max-width: 800px; 
    width: 95%;
}

/* Each bookmark link */
.bookmarks-grid a {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
    
    /* FIXED: Use 'background: none' for better Safari compatibility */
    background: none; 
    /* REMOVED: Box-shadow is no longer needed */
}

/* Add a hover effect */
.bookmarks-grid a:hover {
    transform: scale(1.08);
}

/* The images inside the links */
.bookmarks-grid a img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Responsive Design --- */
/* For screens smaller than 800px (tablets and mobile) */
@media (max-width: 799px) {
    .bookmarks-grid {
        /* Mobile: 4 columns for better usability */
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        padding-left: 40px;
        padding-right: 40px;
        padding-bottom: 40px;
    }
}