:root {
  --red:       #b1142b;

  --sky-hi:   #8fc1ee;
  --sky:      #3d82c8;
  --sky-deep: #2563a8;
  --sky-ink:  #1f5798;
  --blue-grad: linear-gradient(168deg, #7fb8ec 0%, #3d82c8 48%, #2563a8 82%, #6fb0e8 100%);

  --primary:      var(--sky-deep);
  --primary-dark: var(--sky-ink);
  --bg:        #eaf2fb;
  --card-bg:   #ffffff;
  --text:      #2c3a4e;
  --text-muted:#7c8aa0;
  --border:    rgba(61, 130, 200, 0.28);
  --radius:    14px;
  --shadow:        0 10px 28px rgba(60, 95, 150, 0.14);
  --shadow-hover:  0 18px 40px rgba(60, 95, 150, 0.20), 0 0 0 1px rgba(61, 130, 200, 0.5);

  --title-grad: linear-gradient(168deg, #5b9bd9 0%, #2f6fb5 46%, #1f4e85 82%, #4a90d0 100%);
  --hair-line:  linear-gradient(90deg, transparent, rgba(61, 130, 200, 0.7), transparent);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Georgia", serif;
}

html, body {
  background:
    radial-gradient(1200px 520px at 50% -160px, rgba(120, 175, 235, 0.28), transparent 64%),
    radial-gradient(840px 560px at 102% -30px, rgba(61, 130, 200, 0.12), transparent 55%),
    radial-gradient(780px 580px at -8% 8%, rgba(120, 175, 235, 0.16), transparent 58%),
    linear-gradient(180deg, #e3eefb 0%, var(--bg) 38%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='0.012 0.04' numOctaves='3' seed='7'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23m)'/></svg>");
}

.site-title, .detail-title, .apply-title {
  font-family: var(--serif);
  background: var(--title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.site-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(234, 242, 251, 0.8));
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  z-index: 30;
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--hair-line);
}
.site-header .site-title { font-weight: 700; letter-spacing: 0.04em; font-size: 19px; }
.site-header .logo { filter: drop-shadow(0 2px 5px rgba(61, 130, 200, 0.4)); }
.site-header .back-link {
  color: var(--sky-deep);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color .18s ease;
}
.site-header .back-link:hover { color: var(--sky-ink); }

.banner {
  position: relative;
  animation: rise .7s cubic-bezier(.2,.7,.2,1) both;
}
.banner img {
  border: 1px solid rgba(61, 130, 200, 0.55);
  box-shadow:
    0 16px 40px rgba(30, 70, 130, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 0 36px rgba(61, 130, 200, 0.1);
}

.category-tabs { animation: rise .7s .06s cubic-bezier(.2,.7,.2,1) both; }
.category-tab {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(60, 95, 150, 0.06);
}
.category-tab:hover { color: var(--sky-deep); border-color: rgba(61, 130, 200, 0.55); }
.category-tab.active {
  background: var(--blue-grad);
  border-color: var(--sky-hi);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 168, 0.32);
  text-shadow: 0 1px 2px rgba(20, 60, 110, 0.5);
}

.activity-grid { padding-top: 18px; }
.activity-card {
  background: linear-gradient(168deg, #ffffff, #eef4fc);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
}
.activity-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  z-index: 3;
}
.activity-card:hover {
  transform: translateY(-6px);
  border-color: rgba(61, 130, 200, 0.7);
  box-shadow: var(--shadow-hover), 0 0 34px rgba(61, 130, 200, 0.12);
}
.activity-card .cover {
  background: linear-gradient(135deg, #dde8f5, #f2f7fc);

  aspect-ratio: var(--cover-ratio, 1920 / 734);
  object-fit: cover;
  object-position: center;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.activity-card:hover .cover { transform: scale(1.045); }
.activity-card .title { color: #2f4258; font-weight: 700; letter-spacing: 0.01em; }
.activity-card .subtitle { color: var(--text-muted); }

.tag {
  background: rgba(61, 130, 200, 0.12);
  color: var(--sky-deep);
  border: 1px solid rgba(61, 130, 200, 0.4);
}
.tag.apply {
  background: rgba(61, 130, 200, 0.1);
  color: var(--sky-deep);
  border-color: rgba(61, 130, 200, 0.4);
}

.badge-top { display: none; }

.activity-card:nth-child(1) { animation-delay: .04s; }
.activity-card:nth-child(2) { animation-delay: .10s; }
.activity-card:nth-child(3) { animation-delay: .16s; }
.activity-card:nth-child(4) { animation-delay: .22s; }
.activity-card:nth-child(5) { animation-delay: .28s; }
.activity-card:nth-child(6) { animation-delay: .34s; }
.activity-card:nth-child(7) { animation-delay: .40s; }
.activity-card:nth-child(8) { animation-delay: .46s; }

.skeleton-card {
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.skeleton-card .sk-cover { aspect-ratio: var(--cover-ratio, 1920 / 734); }
.sk-cover, .sk-line, .sk-btn {
  background: linear-gradient(90deg, #d4e3f4 25%, #eef5fd 37%, #d4e3f4 63%);
  background-size: 400% 100%;
}

.state { color: var(--text-muted); padding: 80px 16px; }
.state > div:not(.retry) { font-size: 15px; }

.state::before {
  content: "";
  display: block;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(61, 130, 200, 0.1) center / 32px no-repeat;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' stroke='%232563a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='6' width='24' height='22' rx='3'/><path d='M4 12h24M11 3v5M21 3v5'/></svg>");
}
.state:has(.retry)::before {
  background-color: rgba(177, 20, 43, 0.1);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' stroke='%23b1142b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='16' cy='16' r='12'/><path d='M16 10v8M16 22h.01'/></svg>");
}
.state .retry {
  background: var(--blue-grad);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(37, 99, 168, 0.32);
  text-shadow: 0 1px 2px rgba(20, 60, 110, 0.5);
}

.btn, .btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--blue-grad);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 1px solid rgba(143, 193, 238, 0.85);
  text-shadow: 0 1px 2px rgba(20, 60, 110, 0.5);
  box-shadow: 0 8px 20px rgba(37, 99, 168, 0.3), 0 1px 0 rgba(255, 255, 255, 0.45) inset;
  transition: transform .14s ease, box-shadow .2s ease, filter .2s ease;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -150%;
  width: 70%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 26px rgba(37, 99, 168, 0.42); }
.btn:hover::before { left: 160%; }
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled, .btn-disabled {
  background: linear-gradient(168deg, #d6e1ee, #c2d2e4);
  color: #8c9bb0;
  border-color: rgba(61, 130, 200, 0.2);
  box-shadow: none;
  text-shadow: none;
}
.btn:disabled::before, .btn-disabled::before { display: none; }
.btn-secondary {
  background: transparent;
  color: var(--sky-deep);
  border: 1px solid rgba(61, 130, 200, 0.55);
  box-shadow: none;
  text-shadow: none;
}
.btn-secondary::before { display: none; }
.btn-secondary:hover { background: rgba(61, 130, 200, 0.1); color: var(--sky-ink); }

.detail { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.detail-cover {
  border: 1px solid rgba(61, 130, 200, 0.5);
  box-shadow: 0 16px 38px rgba(30, 70, 130, 0.18), 0 0 28px rgba(61, 130, 200, 0.08);
}

.detail-cover img {
  aspect-ratio: var(--cover-ratio, 1920 / 734);
  object-fit: cover;
}
.detail-title { font-weight: 800; letter-spacing: 0.01em; position: relative; }
.detail-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: 12px;
  border-radius: 3px;
  background: var(--title-grad);
  box-shadow: 0 2px 8px rgba(61, 130, 200, 0.4);
}
.detail-subtitle { color: var(--text-muted); }
.detail-meta { color: var(--text-muted); }
.detail-meta .expired { color: var(--red); }

.act-content { color: var(--text); }
.act-content a { color: var(--sky-deep); }
.act-content a:hover { color: var(--sky-ink); }
.act-content h1, .act-content h2, .act-content h3 {
  font-family: var(--serif);
  color: var(--sky-deep);
  border-left: 3px solid var(--sky);
  padding-left: 12px;
}
.act-content td, .act-content th { border-color: var(--border); }
.act-content th { color: var(--sky-deep); background: rgba(61, 130, 200, 0.07); }
.act-content img { box-shadow: 0 10px 26px rgba(30, 70, 130, 0.16); }
.act-content hr { border: none; height: 1px; background: var(--hair-line); margin: 1.5em 0; }

.apply-bar {
  background: linear-gradient(0deg, rgba(234, 242, 251, 0.96), rgba(234, 242, 251, 0.78));
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.apply-bar::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--hair-line);
}
.apply-form, .apply-query {
  background: linear-gradient(168deg, #ffffff, #eef4fc);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.apply-title { font-weight: 700; letter-spacing: 0.03em; }
.apply-row > label { color: var(--text-muted); }
.apply-row .req { color: var(--red); }
.apply-input {
  background: #fbfdff;
  border: 1px solid var(--border);
  color: var(--text);
}
.apply-input::placeholder { color: #9aa8bd; }
.apply-input:focus {
  border-color: rgba(61, 130, 200, 0.8);
  box-shadow: 0 0 0 3px rgba(61, 130, 200, 0.18);
}
.apply-captcha .captcha-img { border-color: var(--border); }
.apply-msg.ok { color: #2e9b5b; }
.apply-msg.err { color: var(--red); }
.apply-table th { color: var(--text-muted); }
.apply-table th, .apply-table td { border-bottom: 1px solid var(--border); }

.site-footer {
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  position: relative;
  margin-top: auto;
  padding-top: 28px;
  letter-spacing: 0.04em;
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 50%; top: -1px;
  transform: translateX(-50%);
  width: 220px; height: 1px;
  background: var(--hair-line);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .banner, .category-tabs, .activity-card, .detail { animation: none; }
  .btn::before { display: none; }
}
