* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Dosis', sans-serif;
}

body {
    background-color: #181818;
    color: #fff;
}

main {
    padding: 20px;
}

/* === Header === */
header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #111;
}

.logo img {
  width: 80px;
}

.header-left {
  flex: 0 0 auto;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.header-center ul {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.header-center ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

.header-right {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-right button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

/* === Theme Toggle === */
#themeToggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
}

/* === Flag Tray === */
.language-icons {
  position: absolute;
  right: 65px;
  top: 60%;
  transform: translateY(-50%) translateX(10%);
  transform-origin: right center;
  scale: 0.9;
  transition: transform 0.4s ease, opacity 0.4s ease, scale 0.4s ease;
  opacity: 0;
  pointer-events: none;
  display: flex;
  gap: 6px;
  background: transparent;
  z-index: 9999;
}

.language-icons.visible {
  transform: translateY(-50%) translateX(0%);
  opacity: 1;
  pointer-events: auto;
  scale: 1;
}

.language-icons button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.language-icons img {
  width: 32px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  transition: transform 0.2s;
}

.language-icons button:hover img {
  transform: scale(1.1);
}

/* === Headings === */
h1 {
  text-align: center;
  margin-bottom: 20px;
}

/* === Google Translate Hider === */
.goog-te-banner-frame.skiptranslate,
.skiptranslate {
  display: none !important;
}

#google_translate_element {
  display: none;
}

.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;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.card {
  background-color: #222;
  padding: 20px;
  padding-bottom: 3rem; /* reserve space for fixed bottom bar */
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  position: relative; /* enable positioning for children */
}

.card p {
    display: block;
    max-height: calc(1.2em * 10); /* 1.2em per line × 5 lines */
    overflow-y: auto;
    padding-right: 4px; /* room for scrollbar if needed */
    line-height: 1.2em;
}

.card p::-webkit-scrollbar {
    width: 4px;
}
.card p::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 2px;
}
.card p::-webkit-scrollbar-track {
    background-color: transparent;
}

.hsp-container {
    position: absolute;
    bottom: 0.5rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    color: white;
    font-weight: bold;
}

.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; /* Size of the icon */
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.3);
}
        
.attribute-icon {
    width: 24px;
    height: 24px;
}

.attribute-change {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 6px;
}
.attribute-change img.attribute-sub-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sort-button-container {
    position: absolute;
    right: 20px;
}

.sort-button {
    padding: 8px 16px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    background-color: #333;
    cursor: pointer;
}

.sort-button i {
    color: #fff;
}

/* */

#themeToggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  cursor: pointer;
}

body.light-mode {
    background-color: #f5f5f5;
    color: #000;
}

body.light-mode header {
    background-color: #e0e0e0;
}

body.light-mode nav ul li a {
    color: #000;
}

/* Inputs & Selects */
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);
}

/* Optional: Card hover effect */
body.light-mode .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Main headings */
body.light-mode h1 {
    color: #000;
}

/* Form container area */
body.light-mode .filters {
    background-color: transparent;
}

/* Card grid background (optional) */
body.light-mode .cards-grid {
    background-color: transparent;
}

/* Icons, buttons, and other dark-specific items */
body.light-mode .fa-solid {
    color: #000;
}

/* Light Mode: HSP container */
body.light-mode .hsp-container {
    color: #000;
}

/* Light Mode: number colors (these can stay as-is unless you want variants) */
body.light-mode .number-1 { color: red; }
body.light-mode .number-2 { color: goldenrod; }
body.light-mode .number-3 { color: teal; }

/* Light Mode: card hover effect */
body.light-mode .card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.15); /* lighter shadow */
}

/* Light Mode: flip button */
body.light-mode .flip-button {
    background-color: #e0e0e0;
    border: 1px solid #bbb;
    color: #000;
}

body.light-mode .flip-button i {
    color: #000;
}

/* Close button in light mode */
body.light-mode .close-button {
    color: #000;
}

/* Sort buttons in light mode */
body.light-mode .sort-button {
    background-color: #e0e0e0;
    border: 1px solid #bbb;
    color: #000;
}

/* Optional: Sort button icon color */
body.light-mode .sort-button i {
    color: #000;
}