:root {
--rarity-all: #444;
--rarity-common: #abc1c1;
--rarity-uncommon: #ed6d4f;
--rarity-rare: #36cf75;
--rarity-epic: #3d85e6;
--rarity-legendary: #842dda;
--rarity-mythic: #ff63e1;
--rarity-exotic: #caff73;
--rarity-unique: #ffb626;
}

/* ===================================================== */
/* RARITY COLORS                                         */
/* ===================================================== */
.filter-btn[data-filter="all"]       { background: var(--rarity-all); }
.filter-btn[data-filter="common"]    { background: var(--rarity-common); color: #000; }
.filter-btn[data-filter="uncommon"]  { background: var(--rarity-uncommon); }
.filter-btn[data-filter="rare"]      { background: var(--rarity-rare); }
.filter-btn[data-filter="epic"]      { background: var(--rarity-epic); }
.filter-btn[data-filter="legendary"] { background: var(--rarity-legendary); }
.filter-btn[data-filter="mythic"]    { background: var(--rarity-mythic); }
.filter-btn[data-filter="exotic"]    { background: var(--rarity-exotic); color: #000; }
.filter-btn[data-filter="unique"]    { background: var(--rarity-unique); }

/* ===================================================== */
/* BASE LAYOUT                                           */
/* ===================================================== */

* { box-sizing: border-box; }

body {
margin: 0;
padding: 0;
font-family: "Inter", sans-serif;
background: #0e0e12;
color: #fff;
}

.container {
text-align: center;
margin: 0;
margin-bottom: 5em;
}

h1 {
margin-top: -0.1em;
margin-bottom: 0;
font-size: 2.2em;
background: linear-gradient(90deg, #7b2ff7, #f107a3);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}

h4 {
font-size: 1em;
margin: 0;
padding-top: 0.5em;
font-weight: 300;
}

.menu
{
	background: linear-gradient(180deg, #222222, #000000);
	background: radial-gradient(circle at top, rgba(255,0,100,0.5),rgba(0,0,0,0) 50%);
}

/* ===================================================== */
/* UNIFIED BUTTON STYLE (for all non-Rarity buttons)     */
/* ===================================================== */
button,
.filter-buttons button,
.type-btn,
#searchBtn,
#resetBtn,
#pagination button {
background: #21262d;
border: 1px solid #30363d;
color: #c9d1d9;
border-radius: 6px;
padding: 0.4em 0.5em;
cursor: pointer;
font-size: 0.8em;
font-weight: 600;
transition: all 0.2s ease;
margin: 0.2em 0;
}

#searchBtn, #resetBtn
{
	font-size: 1.2em;
}

button:hover,
.filter-buttons button:hover,
.type-btn:hover,
#searchBtn:hover,
#resetBtn:hover,
#pagination button:hover:not(:disabled) {
background: #30363d;
}

button.active,
.filter-buttons button.active,
.type-btn.active,
#pagination button.active {
background: #238636;
border-color: #2ea043;
color: #fff;
}

#pagination button:disabled {
opacity: 0.4;
cursor: not-allowed;
}

/* ===================================================== */
/* SEARCH INPUT                                          */
/* ===================================================== */
#searchInput {
width: 560px;
padding: 0.8em 1em;
border-radius: 0.6em;
border: 1px solid #333;
background: #0e0e12;
color: #fff;
font-size: 1em;
}

#searchInput:focus {
outline: none;
border-color: #7b2ff7;
}

/* Special gradients for main search/reset buttons */
#searchBtn {
background: linear-gradient(90deg, #7b2ff7, #f107a3);
border: none;
color: #fff;
}
#resetBtn {
background: #444;
border: none;
color: #fff;
}

/* ===================================================== */
/* FILTER SECTIONS                                       */
/* ===================================================== */
.searchbar,
.filterbar,
.filter-section,
#type-filters {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 8px;
}

.searchbar
{
	margin-bottom: 0.5em;
}

.filterbar
{
	margin-top: 0.5em;
}

.filter-group
{
	margin-top: 0.5em;
}


.filter-btn {
border: none;
border-radius: 0.5em;
padding: 0.33em 2.35em;
font-size: 0.9em;
font-weight: 600;
color: #fff;
cursor: pointer;
transition: transform 0.15s, opacity 0.2s;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.filter-btn.active {
outline: 2px solid #fff;
}
.filter-btn:hover {
opacity: 0.9;
}

/* ===================================================== */
/* SWITCHES                                              */
/* ===================================================== */
.switch-filters {
display: flex;
gap: 20px;
justify-content: center;
align-items: center;
}

.switch {
display: inline-flex;
align-items: center;
cursor: pointer;
user-select: none;
}

.switch input { display: none; }

.switch .slider {
width: 40px;
height: 20px;
background: #666;
border-radius: 10px;
position: relative;
transition: background 0.2s;
margin-right: 0.5em;
margin-left: 1em;
}

.switch .slider::before {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
background: #fff;
border-radius: 50%;
transition: transform 0.2s;
}

.switch input:checked + .slider {
background: #2ea043;
}

.switch input:checked + .slider::before {
transform: translateX(20px);
}

.switch .label-text {
font-size: 0.9em;
color: #c9d1d9;
}

/* ===================================================== */
/* CARDS                                                 */
/* ===================================================== */
#results {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 1.5em;
}

.card {
flex: 1 1 calc(20% - 14px);
max-width: calc(20% - 14px);
background: linear-gradient(0deg, #333333, #000000, #000000, #000000, #000000, #ff0066);
border-radius: 0.25em;
overflow: hidden;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
transition: transform 0.25s, box-shadow 0.25s;
text-shadow: 0 0 3px rgba(0,0,0,1);
}

.card h3
{
	color: #ffffff;
	white-space: nowrap;
	padding: 0.25em 0.25em 0 0.25em;
	font-size: 1em;
	margin: 0 0 -0.25em 0;
	text-transform: uppercase;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	max-width: 85%;
	text-align: left;
}

.card:hover {
transform: scale(1.05,1.05);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.card .thumbnail {
width: 100%;
height: 240px;
object-fit: contain;
background: radial-gradient(circle at center, rgba(255,255,255,0.33),rgba(0,0,0,0) 80%), var(--rarity-color);
}

.card-content { text-align: left; padding: 0; }

.bottom-line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.25em;
}

.price-line {
font-weight: bold;
color: #ffcc40;
font-size: 0.95em;
display: flex;
align-items: center;
gap: 4px;
}

/* ===================================================== */
/* AVAILABILITY BAR                                      */
/* ===================================================== */
.availability-bar {
position: relative;
width: 100%;
height: 20px;
margin-top: -0.56em;
background: #ff3333;
border-bottom: 1px solid #000;
}

.availability-remaining {
position: absolute;
height: 100%;
background: #2ea043;
transition: width 0.4s ease;
}

.availability-text {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-weight: bold;
color: #000;
text-shadow: 0 0 2px rgba(255,255,255,0.4);
}

/* ===================================================== */
/* BADGES                                                */
/* ===================================================== */
.badges {
display: flex;
width: 100%;
gap: 6px;
position: relative;
margin-top: -2.8em;
margin-bottom: 0.8em;
padding-right: 0.2em;
justify-content: flex-end;
}

.badge {
background: rgba(50,50,50,0.5);
border-radius: 2px;
color: #fff;
padding: 0.4em;
font-size: 0.75em;
font-weight: 600;
text-transform: capitalize;
box-shadow: 0 0 6px rgba(50,50,50,1);
}

/* ===================================================== */
/* PAGINATION                                            */
/* ===================================================== */
#pagination {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.4em;
}

#pagination span {
color: #8b949e;
font-size: 0.9rem;
align-self: center;
}

/* ===================================================== */
/* RESPONSIVE                                            */
/* ===================================================== */
@media (max-width: 700px) {
#searchInput { width: 90%; }
.filter-btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.card img { height: 200px; }
}

#pagination {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 0.4rem 0.6rem;
margin-top: 0.5em;
margin-bottom: 0.5em;
}

#pagination button {
background: #21262d;
border: 1px solid #30363d;
color: #c9d1d9;
padding: 0.4rem 0.8rem;
border-radius: 4px;
font-size: 0.85rem;
cursor: pointer;
transition: all 0.2s ease;
}

#pagination button:hover:not(:disabled) {
background: #238636;
color: #fff;
}

#pagination button.active {
background: #238636;
border-color: #2ea043;
color: #fff;
}

#pagination button:disabled {
opacity: 0.4;
cursor: not-allowed;
}

#pagination .pagination-info {
margin: 0;
color: #8b949e;
font-size: 0.9em;
white-space: nowrap;
font-family: monospace;
display: block;
}

/* Für saubere Zentrierung bei langen Zahlen */
@media (max-width: 700px) {
#pagination {
flex-direction: column;
gap: 0.6em;
}
#pagination .pagination-info {
order: 99;
}
}

.release-date
{
	font-size: 0.8em;
	color: rgba(255,255,255,0.7);
}

#dbInfo
{
	margin: 0;
	margin-bottom: 0.5em;
	font-size: 0.8em;
	color: rgba(255,255,255,0.5);
}

.card-header {
  border: 1px solid #000;
  position: relative;
  text-align: right;
  display: block;
  height: 3em;
}

.creator {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0.3em 0 0.5em 0.3em;
  font-size: 0.8em;
  color: rgba(255,255,255,0.5);
}

.total {
  font-weight: 700;
  color: #00ff00;
}

.creator-face {
  display: flex;
  height: 2.9em;
  width: 2.9em;
  position: absolute;
  top: -1px;
  right: -1px;
  border: 1px solid rgba(0,0,0,0.5);
  background: linear-gradient(180deg, #7b2ff7, #f107a3);
}

.tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 3.9em;
  right: -1px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 0.75em;
  padding: 4px 6px;
  border-radius: 4px;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.card-body .tooltip
{
	left: 0;
	bottom: 45%;
	background: transparent;
	padding: 0;
	display: flex;
	flex-direction: column-reverse;
	color: #ffffff;
	text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.card-header:hover .tooltip, .card-body:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(-8px);
}