/* Base Reset and Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Dosis', sans-serif;
}

body {
    background-color: #181818;
    color: #fff;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #111;
}

.logo img {
    width: 80px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

main {
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

#search-bar,
#type-filter,
#attribute-filter {
    padding: 10px;
    border-radius: 5px;
    border: none;
    background-color: #333;
    color: #fff;
}

/* Card Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Card */
.card {
    background-color: #222;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.3);
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.card h2 {
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card h2 img.attribute-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

/* Sorting Buttons */
.sort-button-container {
    position: absolute;
    right: 20px;
    display: flex;
    gap: 10px;
}

.sort-button {
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    background-color: #333;
    cursor: pointer;
}

.sort-button i {
    color: #fff;
}

/* Theme Toggle Button */
#themeToggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
}

/* ================================
   LIGHT MODE OVERRIDES
================================== */

body.light-mode {
    background-color: #f5f5f5;
    color: #000;
}

body.light-mode header {
    background-color: #e0e0e0;
}

body.light-mode nav ul li a {
    color: #000;
}

body.light-mode h1 {
    color: #000;
}

body.light-mode .filters {
    background-color: transparent;
}

body.light-mode .cards-grid {
    background-color: transparent;
}

/* Inputs & Filters */
body.light-mode #search-bar,
body.light-mode #type-filter,
body.light-mode #attribute-filter {
    background-color: #fff;
    color: #000;
    border: 1px solid #ccc;
}

/* Cards */
body.light-mode .card {
    background-color: #fff;
    color: #000;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

body.light-mode .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Icons */
body.light-mode .fa-solid {
    color: #000;
}

/* Sort Buttons in Light Mode */
body.light-mode .sort-button {
    background-color: #e0e0e0;
    color: #000;
    border: 1px solid #bbb;
}

body.light-mode .sort-button i {
    color: #000;
}

/* Theme Icon Filter */
img.thematic-filter {
    transition: filter 0.3s ease;
}

body:not(.light-mode) img.thematic-filter {
    filter: brightness(0) invert(1);
}

body.light-mode img.thematic-filter {
    filter: brightness(0);
}