body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #333;
    color: #fff;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

header {
    background-color: #f8f8f8;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dark-mode header {
    background-color: #222;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 1rem;
}

nav ul li a {
    text-decoration: none;
    color: #333;
}

.dark-mode nav ul li a {
    color: #fff;
}

#theme-toggle {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.dark-mode #theme-toggle {
    background-color: #f8f8f8;
    color: #333;
}

main {
    padding: 2rem;
}

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

.template-card {
    border: 1px solid #ddd;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s;
}

.template-card:hover {
    transform: scale(1.05);
}

.template-card img {
    max-width: 100%;
    height: auto;
}

.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    margin-top: 1rem;
}

.dark-mode .btn {
    background-color: #0056b3;
}

footer {
    background-color: #f8f8f8;
    text-align: center;
    padding: 1rem;
    position: relative;
    bottom: 0;
    width: 100%;
}

.dark-mode footer {
    background-color: #222;
}