:root {
  --bg-dark: #05060a;
  --bg-card-top: rgba(0, 0, 0, 0);
  --bg-card: rgba(0, 0, 0, 0);
  --bg-card-solid: #1313138c;
  --glass: rgba(255,255,255,0.04);

  --border-light: rgba(255, 255, 255, 0.171);
  --border-strong: rgba(255,255,255,0.12);
  --muted: #98a0aa;

  --accent: #004d1a;
  --accent2: #007400;

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: #eef5f4;
  background: #000;
  overflow-x: hidden;
  position: relative;
}

a{
    text-decoration: none;
}

/* Canvas */
#bgParticles {
  position: fixed;
  top:0; left:0;
  width:100vw;
  height:100vh;
  z-index: -2;
  background: radial-gradient(circle at top, #023800, #000000 100%);
}

/* Dark overlay */
body::after {
  content:"";
  position:fixed;
  top:0; left:0; right:0; bottom:0;
  background: linear-gradient(140deg, rgba(0,0,0,0.6), rgba(0,0,0,0.9));
  z-index:-1;
}

.app {
  max-width: 1180px;
  margin: 32px auto;
  padding: 16px;
}

/* HEADER */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.459);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(6px);
  margin-bottom: 28px;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.5px;
  color: #ebffec;
}

/* CONTROLS */
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.controls input,
.controls select {
  background: var(--bg-card-top);
  border: 1px solid var(--border-light);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: inherit;
  outline: none;
  min-width: 160px;
  backdrop-filter: blur(6px);
  transition: 0.25s ease;
}

.controls input {
  min-width: 220px;
}

.controls input:focus,
.controls select:focus {
  border-color: var(--accent2);
  background: rgba(10, 14, 20, 0);
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(270px,1fr));
  gap: 20px;
}

/* CARD */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);

  transform: translateY(14px);
  opacity: 0;
  transition:
    transform .28s ease,
    opacity .28s ease,
    box-shadow .28s ease,
    border .3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 50px rgba(0,0,0,0.75);
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--glass);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* не искажает */
  object-position: center;
  display: block;
}



/* TITLES */
.title {
  font-size: 1.05rem;
  font-weight: 700;
}

.game-title {
  font-size: 0.82rem;
  opacity: 0.55;
}

/* TAGS */
.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(0, 0, 0, 0.233);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
}

/* META */
.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
}

/* BUTTONS */
.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: auto;
}

.btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: 0.25s ease;
}

.btn:hover {
  border-color: var(--accent2);
  opacity: 0.9;
}

.btn.primary {
  background-color: var(--accent);
  color: #dfdfdf;
  border: none;
  font-weight: 700;
}

.btn.primary:hover {
  background-color: #00ff002f;
  color: #ffffff;
  border: none;
  font-weight: 700;
}

/* EMPTY */
.empty {
  text-align: center;
  color: var(--muted);
  padding: 22px;
  font-size: 0.95rem;
}

/* FOOTER */
.footer {
  text-align: center;
  color: var(--muted);
  margin-top: 28px;
  font-size: 0.95rem;
}

.footer a{
color: var(--muted);
}

.footer a:hover{
  color: #006807;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top:0; left:0;
  width:100%; height:100%;
  background-color: rgba(0, 0, 0, 0.603);
  animation: fadeIn .25s;
}

@keyframes fadeIn { from{opacity:0;} to{opacity:1;} }

.modal-content {
  background: var(--bg-card-solid);
  margin: 7% auto;
  padding: 24px;
  max-width: 520px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
  position: relative;
  animation: slideDown .25s;
}

@keyframes slideDown {
  from { transform: translateY(-40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.modal-content::-webkit-scrollbar {
  width: 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
  transition: 0.25s;
}

.modal-close:hover {
  color: var(--accent);
}

#modalDesc {
  white-space: pre-wrap;
  line-height: 1.45;
  margin: 10px 0 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

select {
  background: var(--bg-card-top);
  color: #e5fdff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  backdrop-filter: blur(6px);
}

/* Цвет текста в опциях */
select option {
  background: #000;
  color: #e5fdff;
}

/* Ховер / фокус */
select:focus {
  border-color: var(--accent2);
}

select:hover {
  border-color: var(--accent);
  background: rgba(0, 255, 0, 0.055);
}

#visitCounter {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

