* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #05070c;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 85% 35%, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 120px 120px, 160px 160px;
  color: #e2e8f0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  user-select: none;
  -webkit-user-select: none;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  text-align: center;
  padding: 1.25rem 1rem 0.95rem;
  background: linear-gradient(180deg, rgba(5, 7, 12, 0.98) 0%, rgba(9, 13, 22, 0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
}

.brand-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
}

.star-accent {
  color: #7dd3fc;
  font-size: 0.85rem;
  opacity: 0.85;
}

.site-title {
  font-family: "Cinzel", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 28px rgba(56, 189, 248, 0.28);
}

.subtitle {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.nav-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.nav-btn {
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  border: 1px solid #1e293b;
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.nav-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #38bdf8;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.45);
}

.nav-sep {
  color: #475569;
  font-size: 0.85rem;
  padding: 0 0.1rem;
}

.gallery-grid {
  max-width: 1320px;
  margin: 2rem auto 3rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
  align-items: start;
}

.photo-card {
  background: #0b111e;
  border: 1px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
}

.photo-card:hover {
  transform: translateY(-4px);
  border-color: #38bdf8;
  box-shadow: 0 10px 26px rgba(2, 132, 199, 0.16);
}

.thumb-wrapper {
  position: relative;
  width: 100%;
  height: 240px !important;
  min-height: 240px !important;
  max-height: 240px !important;
  flex-shrink: 0;
  background: #020408;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-wrapper img,
.thumb-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-touch-callout: none;
}

.video-badge {
  position: absolute;
  bottom: 0.65rem;
  right: 0.65rem;
  background: rgba(2, 132, 199, 0.92);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(125, 211, 252, 0.5);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.card-info {
  padding: 0.95rem 1.1rem 1.05rem;
  background: #0b111e;
  border-top: 1px solid #162033;
}

.card-group {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
  padding: 0.12rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.35rem;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 500;
  color: #f8fafc;
}

.card-meta {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.empty-notice {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1.5rem;
  background: #0b111e;
  border: 1px solid #1e293b;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 0.95rem;
}

/* Lightbox Viewer */
.lightbox {
  position: fixed;
  top: var(--header-height, 124px);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 5, 8, 0.98);
  z-index: 150;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lightbox:fullscreen,
.lightbox.ios-fullscreen {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 500;
  background: #000;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.lightbox-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.65rem 1.15rem;
  background: #0b111e;
  border-bottom: 1px solid #1e293b;
  z-index: 160;
  gap: 0.75rem;
}

.lb-left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.lightbox-title-area {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-title-area h2 {
  font-size: 1.02rem;
  font-weight: 500;
  color: #f8fafc;
  line-height: 1.25;
}

.lightbox-title-area span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.lightbox-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.lb-counter {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-right: 0.25rem;
}

.lightbox-toolbar button {
  background: #162033;
  color: #fff;
  border: 1px solid #2b3b55;
  padding: 0.35rem 0.72rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  min-height: 34px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.lightbox-toolbar button:hover {
  background: #23334f;
  border-color: #38bdf8;
}

.lightbox-toolbar button.active-mode {
  background: #0284c7;
  border-color: #38bdf8;
  font-weight: 600;
}

#zoom-level {
  min-width: 48px;
  text-align: center;
  font-size: 0.84rem;
  color: #cbd5e1;
  cursor: pointer;
}

.lightbox-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  background: #020408;
}

.lightbox-viewport:active {
  cursor: grabbing;
}

.lightbox-viewport img {
  display: block;
  max-width: none;
  max-height: none;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
  -webkit-touch-callout: none;
}

.lightbox-viewport video {
  max-width: 94vw;
  max-height: 76dvh;
  background: #000;
  border-radius: 6px;
  outline: none;
  z-index: 155;
}

.image-shield {
  position: absolute;
  inset: 0;
  z-index: 152;
  -webkit-touch-callout: none;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 158;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  border: 1px solid #334155;
  width: 44px;
  height: 60px;
  border-radius: 8px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-arrow:hover {
  background: rgba(2, 132, 199, 0.85);
  border-color: #38bdf8;
}

.prev-arrow {
  left: 0.75rem;
}

.next-arrow {
  right: 0.75rem;
}

.lb-hint {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  padding: 0.35rem 0.5rem;
  background: #070a12;
  border-top: 1px solid #111827;
}

@media (max-width: 820px) {
  .site-header {
    padding: 0.85rem 0.65rem 0.7rem;
  }

  .site-title {
    font-size: 1.45rem;
    letter-spacing: 3px;
  }

  .subtitle {
    font-size: 0.7rem;
    letter-spacing: 1.3px;
  }

  .lightbox-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0.5rem 0.65rem;
    gap: 0.4rem;
  }

  .lb-left {
    order: 1;
  }

  .lightbox-title-area {
    order: 2;
    flex: 1;
    min-width: 120px;
  }

  .lightbox-title-area h2 {
    font-size: 0.9rem;
  }

  .lightbox-controls {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 0.3rem;
  }

  .lightbox-toolbar button {
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
    min-height: 32px;
  }

  .nav-arrow {
    width: 36px;
    height: 48px;
    font-size: 1.15rem;
  }

  .prev-arrow {
    left: 0.35rem;
  }

  .next-arrow {
    right: 0.35rem;
  }
}
