:root {
  --brand: #01334b;
  --brand-soft: #0f5c7e;
  --accent: #1fb8d8;
  --bg: #eff7fb;
  --surface: #ffffff;
  --surface-alt: #eaf2f7;
  --text: #092634;
  --text-soft: #4a6472;
  --border: #c6d8e3;
  --radius: 16px;
  --shadow: 0 14px 34px rgba(1, 51, 75, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Avenir Next", "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 0% -20%, #c8e5f4 0%, #eff7fb 48%, #f7fcff 100%);
}

a {
  color: inherit;
}

.container {
  width: min(1240px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(1, 51, 75, 0.08);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  object-fit: cover;
  background: linear-gradient(140deg, var(--brand), #0f729d);
}

.brand-fallback {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #ecf9ff;
  font-weight: 700;
  background: linear-gradient(140deg, var(--brand), #0f729d);
}

.brand-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.1;
}

.brand-subtitle {
  margin: 0.2rem 0 0;
  color: var(--text-soft);
  font-size: 0.87rem;
}

.filter-nav {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.filter-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.84rem;
  background: var(--surface);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.86rem;
}

.filter-link.active {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 700;
}

.hero {
  margin-top: 1.4rem;
  border-radius: 24px;
  background: linear-gradient(145deg, #012b3f, #015478 64%, #1fb8d8 138%);
  color: #ecf9ff;
  padding: 1.7rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.hero p {
  margin: 0.7rem 0 0;
  color: #d2f1ff;
  max-width: 74ch;
}

.video-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.video-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(1, 51, 75, 0.08);
  display: grid;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(130deg, #0f668a, #1fb8d8);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.58rem;
  border-radius: 999px;
  color: #dff5ff;
  background: rgba(1, 51, 75, 0.82);
}

.video-body {
  padding: 0.95rem;
}

.video-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.28;
}

.video-meta {
  margin-top: 0.52rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.video-desc {
  margin: 0.7rem 0 0;
  color: #163f54;
  font-size: 0.9rem;
  min-height: 3.1em;
}

.video-toggle {
  margin-top: 0.75rem;
  border: 0;
  border-radius: 10px;
  padding: 0.52rem 0.72rem;
  background: #e3f2fb;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

.video-details {
  display: none;
  margin-top: 0.75rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.75rem;
}

.video-card.open .video-details {
  display: block;
}

.info-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
  margin-top: 0.6rem;
}

.info-box h3 {
  margin: 0;
  color: var(--brand);
  font-size: 0.86rem;
}

.info-box p,
.info-box pre,
.info-box ul {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
}

.info-box pre {
  background: #f7fbfe;
  border: 1px solid #c5dbe7;
  border-radius: 10px;
  padding: 0.55rem;
  white-space: pre-wrap;
  font-family: "SF Mono", "Consolas", "Liberation Mono", monospace;
}

.info-box ul {
  padding-left: 1rem;
}

.embed-wrap {
  margin-top: 0.6rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.embed-wrap iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.empty-box {
  margin-top: 1.2rem;
  background: #fefefe;
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 1rem;
  color: var(--text-soft);
}

.site-footer {
  margin-top: 1.8rem;
  border-top: 1px solid var(--border);
  padding: 1rem 0 1.5rem;
}

.footer-links {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.44rem 0.74rem;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--text-soft);
  background: var(--surface);
}

.footer-note {
  margin: 0.7rem 0 0;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.maintenance {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.maintenance-card {
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

@media (max-width: 1060px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 1.25rem;
    border-radius: 18px;
  }
}
