:root {
  --navy: #1C3B6E;
  --bg: #F4F7FB;
  --card: #FFFFFF;
  --muted: #7A96B8;
  --border: #E2E8F0;
  --text: #0F172A;
  --shadow: 0 6px 20px rgba(28, 59, 110, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.topbar {
  background: var(--navy);
  color: #fff;
  padding: 20px 32px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.brand img {
  height: 48px;
}

.brand-text h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.4px;
}

.brand-text p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.range-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: 0.15s;
}

.range-btn:hover { background: rgba(255, 255, 255, 0.2); }
.range-btn.active { background: linear-gradient(135deg, #2A5BA0, #1C3B6E); border-color: #fff; }

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(28, 59, 110, 0.15);
}

.card-thumb {
  aspect-ratio: 16 / 10;
  background: var(--bg);
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 59, 110, 0.7), transparent 50%);
}

.card-thumb .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 22px;
  z-index: 1;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--navy);
}

.card-body .range-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
  flex-wrap: wrap;
}

.btn {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  transition: 0.15s;
}

.btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary { background: linear-gradient(135deg, #2A5BA0, #1C3B6E); color: #fff; border-color: transparent; }

.viewer {
  width: 92vw;
  max-width: 1400px;
  height: 88vh;
  border: none;
  border-radius: 14px;
  padding: 0;
  background: #000;
  overflow: hidden;
}

.viewer::backdrop {
  background: rgba(15, 23, 42, 0.85);
}

.viewer-inner {
  height: calc(100% - 56px);
}

.viewer-inner iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.viewer-meta {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
}

.close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 5;
  line-height: 1;
}

footer {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}

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

@media (max-width: 768px) {
  .topbar { padding: 14px 18px; }
  main { padding: 18px; }
  .gallery { grid-template-columns: 1fr; gap: 14px; }
  .brand-text h1 { font-size: 18px; }
  .viewer { width: 100vw; height: 100vh; max-width: none; border-radius: 0; }
}
