:root {
    --bg-color: #f5f5f5;
    --text-color: #333;
    --header-bg: #007BFF;
    --card-bg: #fff;
    --btn-bg: #28a745;
    --btn-hover: #218838;
}

body.dark {
    --bg-color: #121212;
    --text-color: #ddd;
    --header-bg: #1a1a1a;
    --card-bg: #1e1e1e;
    --btn-bg: #4caf50;
    --btn-hover: #388e3c;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

header {
    background: var(--header-bg);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
}

header .header-buttons {
    display: flex;
    gap: 10px;
}

header .header-buttons a,
header .header-buttons button {
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(255,255,255,0.2);
    transition: background 0.2s;
}

header .header-buttons a:hover,
header .header-buttons button:hover {
    background: rgba(255,255,255,0.35);
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 15px;
}

.category-filter {
    margin-bottom: 20px;
    text-align: center;
}

.category-filter a {
    margin: 5px;
    padding: 8px 15px;
    background: #999;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s;
}

.category-filter a.active {
    background: #007BFF;
}

.category-filter a:hover {
    opacity: 0.8;
}

.cards {
    display: grid;
    gap: 20px;
}

.cards.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.cards.list-view {
    grid-template-columns: 1fr;
}

.card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s;
}

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

.card img {
    width: 100%;
    height: auto;
    display: block;
}

.card-content {
    padding: 15px;
}

.card-content h2 {
    margin: 0 0 10px;
}

.card-content p {
    line-height: 1.6;
}

a.button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: var(--btn-bg);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

a.button:hover {
    background: var(--btn-hover);
}

@media (max-width: 600px) {
    header h1 { font-size: 1.5em; }
    .card-content h2 { font-size: 1.2em; }
}









.button {
    display: inline-block;
    margin: 5px 5px 0 0;
    padding: 8px 12px;
    background: #28a745;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.button:hover {
    background: #218838;
}

.button.edit {
    background: #007BFF;
}
.button.edit:hover {
    background: #0056b3;
}

.button.delete {
    background: #dc3545;
}
.button.delete:hover {
    background: #a71d2a;
}
