:root {
  --bg: #05062d;
  --panel: rgba(5, 6, 45, 0.78);
  --panel-border: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: #b9bdf0;
  --accent-1: #AF40FF;
  --accent-2: #5B42F3;
  --accent-3: #00DDEB;
  --gold: #ffe48a;
  --danger: #ff6b8b;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg) url("img/space.jpg") no-repeat center top / cover fixed;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

a { color: var(--accent-3); }

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(5, 6, 45, 0.55);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  font-family: "Bitcount Prop Single Ink", system-ui, sans-serif;
  font-size: 1.7rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }

.site-nav a {
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.site-nav a:hover { background: rgba(255, 255, 255, 0.1); }
.site-nav a.active { background: linear-gradient(144deg, var(--accent-1), var(--accent-2) 50%, var(--accent-3)); }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 60px;
}

h1, h2 { margin: 0 0 12px; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.lede { color: var(--muted); margin: 0 0 20px; font-size: 1.05rem; }

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px;
  backdrop-filter: blur(8px);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 1rem;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  background: linear-gradient(144deg, var(--accent-1), var(--accent-2) 50%, var(--accent-3));
  box-shadow: rgba(151, 65, 252, 0.3) 0 10px 24px -6px;
  transition: transform 0.15s ease, opacity 0.2s;
}

.btn:hover { transform: scale(1.04); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.secondary { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.btn.small { padding: 7px 12px; font-size: 0.9rem; border-radius: 10px; }
.btn.danger { background: rgba(255, 107, 139, 0.2); color: #ffd0da; box-shadow: none; }

.link-btn {
  background: none;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  padding: 4px;
}

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 12px; font-size: 0.95rem; color: var(--muted); }

input[type="text"], textarea, select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}

select option { color: #000; }

.seg {
  display: inline-flex;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  overflow: hidden;
  flex-wrap: wrap;
}

.seg button {
  background: none;
  border: 0;
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.seg button.on { background: linear-gradient(144deg, var(--accent-1), var(--accent-3)); }

/* ---------- gallery grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: rgba(255, 255, 255, 0.05);
}

.card .meta { padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
.card .meta .name { flex: 1; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.like-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  white-space: nowrap;
}

.like-btn.on { background: rgba(255, 107, 139, 0.35); }

.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, calc(100% + 40px));
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2) 60%, var(--accent-3));
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.35s ease;
  z-index: 50;
  max-width: calc(100vw - 32px);
}

.toast.show { transform: translate(-50%, 0); }
.toast:empty { display: none; }

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 16px 30px;
}

.site-footer a { color: var(--muted); }

[hidden] { display: none !important; }

.fine { color: var(--muted); font-size: 0.88rem; margin: 8px 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }

@media (max-width: 600px) {
  .brand { font-size: 1.35rem; }
  .site-nav a { padding: 7px 9px; font-size: 0.9rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card .meta { flex-wrap: wrap; padding: 8px; }
}
