* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 26%),
    linear-gradient(180deg, #f7faff 0%, #eef3f9 100%);
  color: #1f2937;
}

a {
  color: #2563eb;
  text-decoration: none;
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(9, 19, 37, 0.9);
  color: #fff;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 19px;
  font-weight: 700;
}

.brand-text small {
  color: rgba(219, 234, 254, 0.82);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-links a,
.link-button {
  color: #dbeafe;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.link-button:hover {
  color: #fff;
}

.page-shell {
  padding: 32px 0 56px;
}

.card,
.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
}

.hero h1,
.card h1,
.card h2,
.panel h2 {
  margin-top: 0;
}

.narrow {
  max-width: 560px;
}

.course-list {
  display: grid;
  gap: 14px;
}

.course-item,
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.muted {
  color: #64748b;
  font-size: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 8px;
}

.full-width {
  grid-column: 1 / -1;
}

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

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  font-weight: 600;
}

.primary-button {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.secondary-button {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.small {
  padding: 8px 12px;
  font-size: 14px;
}

.inline-form {
  margin: 0;
}

.link-button {
  background: transparent;
  padding: 0;
}

.button-link {
  text-decoration: none;
}

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
}

.flash.success {
  background: #dcfce7;
  color: #166534;
}

.flash.error {
  background: #fee2e2;
  color: #991b1b;
}

.flash.warning {
  background: #fef3c7;
  color: #92400e;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
  gap: 20px;
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
}

.hero-main {
  background:
    url("/images/hero-bg.png"),
    url("/images/hero-bg.jpg"),
    #0f172a;
  color: #fff;
  overflow: hidden;
  position: relative;
  text-align: center;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero-main::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-side {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hero-main .eyebrow {
  color: #bfdbfe;
}

.hero-main h1 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
}

.hero-desc {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.8;
  margin-left: auto;
  margin-right: auto;
}

.line-mask {
  display: inline;
  padding: 0.12em 0.38em;
  border-radius: 0.42em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.line-mask-light {
  background: rgba(15, 23, 42, 0.34);
}

.line-mask-soft {
  background: rgba(15, 23, 42, 0.44);
}

.line-mask-strong {
  background: rgba(15, 23, 42, 0.52);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.ghost-link {
  color: #dbeafe;
  font-weight: 600;
}

.hero-side-head,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-side-head {
  align-items: center;
}

.feature-grid {
  display: grid;
  gap: 12px;
}

.feature-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  text-align: center;
  justify-items: center;
}

.feature-card strong {
  color: #0f172a;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.empty-state {
  text-align: center;
}

.course-section h2 {
  margin-bottom: 0;
}

.course-index {
  min-width: 42px;
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  letter-spacing: 0.08em;
}

.course-info {
  display: grid;
  gap: 4px;
  flex: 1;
}

.course-info strong {
  color: #0f172a;
  font-size: 16px;
}

.course-arrow {
  color: #2563eb;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.course-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.08);
  border-color: #bfdbfe;
}

.course-item,
.primary-button,
.secondary-button {
  transition: all 0.2s ease;
}

.auth-shell,
.course-layout,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.auth-intro,
.auth-card,
.course-overview,
.course-player-card,
.admin-hero,
.admin-form-card {
  min-height: 100%;
}

.auth-intro {
  background:
    linear-gradient(135deg, rgba(11, 32, 74, 0.96), rgba(30, 64, 175, 0.9)),
    #0f172a;
  color: #fff;
  text-align: center;
}

.auth-intro .eyebrow {
  color: #bfdbfe;
}

.auth-intro .hero-desc {
  max-width: 620px;
}

.auth-feature-grid {
  margin-top: 24px;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.auth-card h2 {
  margin-bottom: 10px;
}

.auth-copy {
  margin: 0 auto 20px;
}

.auth-card .form-grid {
  text-align: left;
}

.auth-card .primary-button {
  width: 100%;
}

.course-layout {
  align-items: stretch;
}

.course-overview {
  background:
    linear-gradient(135deg, rgba(11, 32, 74, 0.96), rgba(30, 64, 175, 0.9)),
    #0f172a;
  color: #fff;
}

.course-overview .eyebrow {
  color: #bfdbfe;
}

.course-overview h1 {
  margin-bottom: 16px;
  font-size: clamp(28px, 3vw, 38px);
}

.course-copy {
  max-width: 680px;
}

.course-meta-grid,
.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.admin-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.course-player-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.course-player-card .section-head {
  align-items: center;
}

.admin-hero {
  background:
    linear-gradient(135deg, rgba(11, 32, 74, 0.96), rgba(30, 64, 175, 0.9)),
    #0f172a;
  color: #fff;
  text-align: center;
}

.admin-hero .eyebrow {
  color: #bfdbfe;
}

.admin-panel,
.admin-form-card {
  display: flex;
  flex-direction: column;
}

.admin-row {
  border-radius: 16px;
}

.list-content {
  display: grid;
  gap: 4px;
}

.text-link {
  color: #2563eb;
  font-weight: 600;
}

.video-player {
  margin-top: 8px;
}

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

.video-player {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  background: #000;
}

.meta-list {
  display: grid;
  gap: 10px;
}

@media (max-width: 768px) {
  .auth-shell,
  .course-layout,
  .admin-grid,
  .hero-grid,
  .course-meta-grid,
  .admin-summary-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .title-row,
  .list-row,
  .nav-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions,
  .section-head,
  .hero-side-head,
  .course-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-main,
  .hero-side,
  .auth-intro,
  .auth-card,
  .admin-hero {
    text-align: left;
  }

  .hero-desc,
  .auth-copy {
    margin-left: 0;
    margin-right: 0;
  }

  .feature-card {
    justify-items: start;
    text-align: left;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .course-index {
    min-width: auto;
  }
}
