:root {
  --bg: #0b0c10;
  --card: #12141a;
  --text: #e7e9ee;
  --muted: #a8afbf;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Apple Color Emoji",
    "Segoe UI Emoji";
  background:
    radial-gradient(
      1200px 600px at 20% -10%,
      rgba(120, 170, 255, 0.15),
      transparent 60%
    ),
    radial-gradient(
      900px 500px at 110% 20%,
      rgba(255, 120, 200, 0.12),
      transparent 55%
    ),
    var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ===== TOPBAR ===== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(11, 12, 16, 0.7);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.controls input,
.controls select {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.controls input {
  min-width: 240px;
}

.controls input::placeholder {
  color: rgba(231, 233, 238, 0.6);
}

/* ===== HERO ===== */

.hero {
  padding: 26px 0 10px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* ===== ALBUMS ===== */

.albums {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 14px 0 26px;
}

.album {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.album-head {
  padding: 18px 18px 0;
}

.album-head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.album-head p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
}

/* ===== IMAGE GRID ===== */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.card {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.18s ease;
}

.card:hover img {
  transform: scale(1.02);
}

/* ===== VIDEO ===== */

.video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 18px 18px;
}

.video-title {
  width: min(960px, 100%);
  margin: 8px 0 10px;
  color: var(--muted);
}

.ratio {
  width: min(960px, 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  position: relative;
}

.ratio::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.ratio > video,
.ratio > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: contain;
}

/* ===== LIGHTBOX (EDITOR) ===== */

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.78);
  z-index: 50;
  padding: 18px;
}

.lightbox.open {
  display: grid;
  place-items: center;
}

.lb-panel {
  width: min(1120px, 96vw);
  background: rgba(18, 20, 26, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.lb-headtext {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.lb-title {
  color: rgba(231, 233, 238, 0.9);
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ✅ FIX: no error, has standard + webkit */

.lb-desc {
  color: rgba(231, 233, 238, 0.72);
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.lb-desc.multiline {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.lb-close {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.lb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.lb-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  -webkit-user-select: none;
  user-select: none;
}

.lb-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lb-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.lb-btn-warn {
  border-color: rgba(255, 180, 120, 0.35);
}

.lb-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lb-sep {
  width: 1px;
  height: 26px;
  background: var(--line);
  margin: 0 2px;
}

.lb-stage {
  position: relative;
  background: #000;
  padding: 12px;
}

#lbCanvas {
  width: 100%;
  height: min(70vh, 720px);
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
}

.lb-hint {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(231, 233, 238, 0.9);
  font-size: 0.9rem;
}

/* ===== FOOTER ===== */

.footer {
  padding: 18px 18px 32px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--text);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ===== DROPDOWN FILTER ===== */

.controls select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: linear-gradient(180deg, #1a1d25, #12141a);
  color: #f1f5ff;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 38px 10px 14px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  background-image:
    linear-gradient(45deg, transparent 50%, #9aa4ff 50%),
    linear-gradient(135deg, #9aa4ff 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 55%,
    calc(100% - 12px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.controls select:focus {
  outline: none;
  border-color: #8aa2ff;
  box-shadow: 0 0 0 3px rgba(138, 162, 255, 0.25);
}

.controls select option {
  background: #12141a;
  color: #e9edff;
  font-weight: 500;
}

.controls select option:checked {
  background: #2a2f44;
  color: #ffffff;
  font-weight: 700;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 860px) {
  .controls input {
    min-width: 160px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card img {
    height: 200px;
  }
}

@media (max-width: 520px) {
  .topbar .wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .controls {
    width: 100%;
  }
  .controls input,
  .controls select {
    width: 100%;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .card img {
    height: 220px;
  }
}
