:root {
  --bg: #050b13;
  --text: #f4f7fb;
  --muted: #a2b6c9;
  --accent: #8be564;
  --accent-2: #4ab0ff;
  --card: rgba(255, 255, 255, 0.04);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% 0%, rgba(74,176,255,0.16), transparent), var(--bg);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(5,11,19,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { font-weight: 800; letter-spacing: -0.02em; display:flex; align-items:center; gap:10px; color: var(--text); text-decoration: none;}
.nav-links { display: flex; gap: 16px; align-items: center; }
.primary-links { flex: 1; gap: 20px; justify-content: flex-end; }
.extra-links { gap: 16px; margin-left: 20px; }
.nav a.button,
.button {
  padding: 10px 14px;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #031522;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px 40px;
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.hero-card {
  padding: 22px;
  background: linear-gradient(140deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.hero h1 { margin: 0 0 14px; font-size: clamp(2rem, 4vw, 3rem); }
.hero p { margin: 0 0 14px; color: var(--muted); }

.search-form {
  display: grid;
  gap: 12px;
}

.input, select.input, textarea.input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  appearance: none;
}

select.input option {
  background: #0b1623;
  color: var(--text);
}

button.primary {
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #031522;
  font-weight: 800;
  cursor: pointer;
}
.danger-link {
  background: none;
  border: none;
  color: #ff7b7b;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}
.danger-link:hover { color: #ff9f9f; text-decoration: underline; }
.danger-link:disabled { opacity: 0.5; cursor: not-allowed; text-decoration: none; }

.grid {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin-top: auto;
}
.pill { display: inline-flex; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.08); color: var(--muted); font-size: 0.9rem; }

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.card-link:hover,
.card-link:focus {
  color: inherit;
  text-decoration: none;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0,0,0,0.35), 0 0 18px rgba(71,176,255,0.18);
  border-color: rgba(255,255,255,0.14);
}
.card.no-hover:hover {
  transform: none;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.08);
}

.price-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(139,229,100,0.18), rgba(71,176,255,0.22));
  color: var(--text);
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.1);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
}

footer {
  padding: 24px 20px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.form-row { display: grid; gap: 10px; }

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.admin-list {
  display: grid;
  gap: 10px;
  margin: 6px 0 0;
}
.admin-list-row {
  display: grid;
  grid-template-columns: var(--columns, minmax(0,1fr) minmax(0,1fr) auto);
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  margin: 0;
}
.admin-list-row .row-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  row-gap: 6px;
}
.locations-stack { grid-template-columns: 1fr; }

.rich-text {
  display: grid;
  gap: 16px;
  line-height: 1.65;
}
.rich-text p { margin: 0; }
.rich-text h2, .rich-text h3, .rich-text h4 { margin: 6px 0 2px; }
.rich-text ul, .rich-text ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.rich-text li { margin: 0; }
.rich-text img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 520px;
  height: auto;
  object-fit: cover;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
}
.rich-text figure {
  margin: 0;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.rich-text figure img { width: 100%; }
.rich-text figcaption { color: var(--muted); font-size: 0.95rem; text-align: center; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--card);
}

.gallery-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  padding: 10px;
  background: rgba(0,0,0,0.2);
}
.thumb-row .gallery-item img {
  height: 90px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.lightbox .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}
.lightbox .nav-btn:hover { background: rgba(255,255,255,0.2); }
.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-thumbs {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.45);
  border-radius: 12px;
  overflow-x: auto;
  max-width: 90vw;
}
.lightbox-thumbs img {
  width: 70px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.4);
  opacity: 0.7;
  transition: opacity 120ms ease, transform 120ms ease, border-color 120ms ease;
}
.lightbox-thumbs img.active,
.lightbox-thumbs img:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: var(--accent-2);
}

.bird-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.bird-tile {
  display: grid;
  gap: 6px;
  align-items: center;
  grid-template-columns: 60px 1fr;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.bird-tile img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.checkbox-tile {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.organizer {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
}
.organizer img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text);
}
.admin-table th, .admin-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}
.admin-table th { color: var(--muted); }
.avatar-thumb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.15);
}
.avatar-thumb.placeholder {
  background: rgba(255,255,255,0.08);
}
.admin-table .actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
}

.nav-links.mobile {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  position: absolute;
  right: 20px;
  top: 60px;
  background: rgba(5,11,19,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  z-index: 30;
}

.nav-links.open {
  display: flex;
}

@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
  }
  .primary-links {
    width: 100%;
    justify-content: flex-end;
  }
  .nav-links.desktop.extra-links {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .nav-links { gap: 10px; }
  .nav { flex-wrap: wrap; gap: 10px; }
}
