:root {
  --brand: #d14c68;
  --brand-light: #ff8178;
  --ink: #15171c;
  --muted: #6d7280;
  --line: #eceef3;
  --soft: #f7f8fb;
  --card: #ffffff;
  --shadow: 0 20px 55px rgba(28, 33, 45, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(236, 238, 243, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand-logo {
  width: 142px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.site-nav a {
  padding: 10px 13px;
  border-radius: 999px;
}

.site-nav a:hover {
  background: var(--soft);
  color: var(--ink);
}

main {
  min-height: calc(100vh - 164px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  padding: clamp(40px, 7vw, 96px) clamp(20px, 5vw, 72px) clamp(30px, 6vw, 72px);
  background: linear-gradient(180deg, #fff 0%, #fff8f8 100%);
}

.hero-copy {
  min-width: 0;
}

.hero-logo {
  width: min(520px, 100%);
  height: auto;
}

.hero-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid #f2d8dc;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
  font-size: 28px;
  box-shadow: 0 14px 34px rgba(209, 76, 104, 0.32);
}

.library-shell,
.content-page,
.admin-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(230px, 320px);
  gap: 16px;
  margin-bottom: 22px;
}

.search-box,
.select-box,
.form-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  padding: 15px 16px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(209, 76, 104, 0.55);
  box-shadow: 0 0 0 4px rgba(209, 76, 104, 0.1);
}

.category-tabs,
.editor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 34px;
}

.chip,
.editor-tabs a {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
}

.chip.is-active,
.editor-tabs a.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
}

.section-heading,
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.admin-top h1,
.content-page h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
}

.section-heading p,
.admin-note,
.content-page p {
  color: var(--muted);
}

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

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 14px 34px rgba(28, 33, 45, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.video-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
}

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

.duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(21, 23, 28, 0.78);
  color: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 18px;
}

.meta,
.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.card-body h3 {
  margin: 8px 0;
  font-size: 20px;
  line-height: 1.25;
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px dashed #e5c0c8;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.video-page {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 72px;
}

.player-frame {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #050505;
  box-shadow: var(--shadow);
}

.player-frame video {
  width: 100%;
  height: 100%;
}

.video-details {
  padding: 28px 0 8px;
}

.video-details h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.03;
}

.content-page article {
  max-width: 860px;
  color: #2f333b;
  line-height: 1.75;
}

.content-page h1 {
  margin-bottom: 24px;
}

.content-page h2 {
  margin-top: 32px;
  font-size: 24px;
}

.admin-shell.narrow {
  width: min(860px, calc(100% - 40px));
}

.admin-actions,
.row-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.danger-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  color: #fff;
  box-shadow: 0 12px 28px rgba(209, 76, 104, 0.2);
}

.secondary-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.danger-button {
  background: #b42335;
  color: #fff;
}

.link-button {
  background: transparent;
  color: var(--brand);
  padding: 0;
}

.danger {
  color: #b42335;
}

.form-card,
.table-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 14px 34px rgba(28, 33, 45, 0.06);
}

.form-card {
  display: grid;
  gap: 18px;
}

.compact-form {
  margin-bottom: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.check-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  color: var(--ink) !important;
}

.check-row input {
  width: auto;
}

.alert,
.success {
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
}

.alert {
  background: #fff1f1;
  color: #a51f2d;
}

.success {
  background: #ecfdf3;
  color: #067647;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.hero-admin-card {
  margin-bottom: 22px;
}

.editor-form {
  gap: 16px;
}

.editor-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
  padding: 16px;
}

.editor-form textarea {
  min-height: 128px;
}

.login-panel {
  width: min(440px, calc(100% - 40px));
  margin: 70px auto;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  gap: 16px;
}

@media (max-width: 900px) {
  .site-header,
  .site-footer,
  .section-heading,
  .admin-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .toolbar,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

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

  .hero-media {
    border-radius: 20px;
  }

  .brand-logo {
    width: 120px;
  }

  th:nth-child(3),
  td:nth-child(3),
  th:nth-child(6),
  td:nth-child(6) {
    display: none;
  }
}
