:root {
  color-scheme: light;
  --ink: #11204a;
  --body: #536178;
  --muted: #7f8ba0;
  --blue: #2457ff;
  --blue-2: #1597ff;
  --purple: #7d45ff;
  --green: #22b86a;
  --orange: #ff8a18;
  --yellow: #ffce2e;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(171, 198, 238, 0.5);
  --shadow: 0 20px 60px rgba(37, 83, 161, 0.16);
  --soft-shadow: 0 10px 28px rgba(37, 83, 161, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 3% 18%, rgba(95, 149, 255, 0.18), transparent 260px),
    radial-gradient(circle at 92% 10%, rgba(36, 87, 255, 0.13), transparent 330px),
    linear-gradient(180deg, #f7fbff 0%, #eef6ff 56%, #f8fbff 100%);
}

body::before {
  position: fixed;
  inset: 58px 0 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(97, 144, 214, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(97, 144, 214, 0.14) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

body::after {
  position: fixed;
  inset: 70px 0 auto auto;
  z-index: -1;
  width: 520px;
  height: 520px;
  content: "";
  border: 2px solid rgba(50, 115, 255, 0.13);
  border-radius: 50%;
  transform: translate(35%, -26%);
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  height: 66px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(182, 207, 244, 0.52);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 230px;
  color: #1644db;
  font-size: 24px;
  font-weight: 950;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: 260px;
  height: 72px;
  object-fit: cover;
  object-position: 50% 38%;
  border-radius: 8px;
}

.brand-star {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: #fff;
  font-size: 24px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.brand-star::before {
  position: absolute;
  inset: 2px;
  z-index: -1;
  content: "";
  background: linear-gradient(135deg, #ffcf27 0 45%, #2457ff 46% 100%);
  clip-path: polygon(50% 0, 62% 33%, 98% 33%, 69% 54%, 80% 90%, 50% 68%, 20% 90%, 31% 54%, 2% 33%, 38% 33%);
}

.main-nav {
  display: flex;
  gap: clamp(8px, 1.45vw, 26px);
  justify-content: center;
  overflow-x: auto;
  white-space: nowrap;
}

.main-nav a {
  position: relative;
  padding: 23px 0 19px;
  color: #273047;
  font-size: 16px;
  font-weight: 650;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--blue);
}

.main-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: var(--blue);
}

.header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(92, 122, 185, 0.26);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(36, 87, 255, 0.1);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #273047;
}

.user-menu {
  position: relative;
  display: inline-flex;
}

.login-button,
.home-button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.profile-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  width: min(360px, calc(100vw - 28px));
  padding: 22px;
  pointer-events: none;
  opacity: 0;
  border: 1px solid #c5dcff;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 58px rgba(37, 83, 161, 0.22);
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.profile-popover::before {
  position: absolute;
  top: -12px;
  right: 28px;
  width: 24px;
  height: 12px;
  content: "";
}

.user-menu:hover .profile-popover,
.user-menu:focus-within .profile-popover,
.user-menu.profile-open .profile-popover {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.login-button {
  padding: 0 19px;
  border: 1px solid #aac5f4;
  background: #fff;
  color: var(--blue);
}

.home-button {
  padding: 0 8px 0 16px;
  border: 0;
  background: linear-gradient(135deg, #1f64ff, #1187ff);
  color: #fff;
  box-shadow: 0 12px 26px rgba(32, 96, 255, 0.28);
}

.icon-user,
.icon-card {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 17px;
}

.icon-user::before {
  position: absolute;
  top: 1px;
  left: 5px;
  width: 7px;
  height: 7px;
  content: "";
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-user::after {
  position: absolute;
  right: 1px;
  bottom: 0;
  left: 1px;
  height: 8px;
  content: "";
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 9px 9px;
}

.user-initial {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 29%, #ffd7ba 0 28%, transparent 29%),
    linear-gradient(135deg, #5fb9ff, #d7edff);
  color: #102454;
  font-size: 13px;
  font-weight: 950;
}

.auth-name {
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-card::before {
  position: absolute;
  inset: 2px 1px;
  content: "";
  border: 2px solid currentColor;
  border-radius: 3px;
}

.icon-card::after {
  position: absolute;
  top: 7px;
  left: 5px;
  width: 8px;
  height: 2px;
  content: "";
  background: currentColor;
}

.avatar-mini {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd6a4, #54b4ff);
  color: #102454;
  font-weight: 950;
}

.auth-caret {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 800;
}

.profile-logout {
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  border: 1px solid rgba(36, 87, 255, 0.18);
  border-radius: 8px;
  background: #f4f8ff;
  color: #2457ff;
  font-weight: 900;
}

.page-shell {
  width: min(1380px, calc(100% - 72px));
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  gap: 24px;
  align-items: stretch;
  min-height: 350px;
  padding: 18px 0 12px;
}

.hero-panel,
.game-panel,
.feature-card,
.profile-card,
.recommend-area,
.frontier-box,
.map-box,
.extra-grid article {
  border: 1px solid rgba(173, 203, 246, 0.64);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-panel {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(90deg, rgba(247, 251, 255, 0.94), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at 12% 58%, rgba(36, 87, 255, 0.1), transparent 150px),
    radial-gradient(circle at 84% 72%, rgba(22, 151, 255, 0.12), transparent 160px);
}

.book-hero-panel {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 16% 18%, rgba(125, 69, 255, 0.13), transparent 210px),
    radial-gradient(circle at 88% 80%, rgba(22, 151, 255, 0.14), transparent 210px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 255, 0.82));
}

.book-cover-promo {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(17, 32, 74, 0.12);
  border-radius: 8px;
  background: #061331;
  box-shadow: 0 24px 54px rgba(27, 75, 177, 0.28);
}

.book-cover-promo img {
  display: block;
  width: 100%;
  aspect-ratio: 612 / 792;
  object-fit: cover;
}

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

.book-hero-copy > p {
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 950;
}

.book-hero-copy h1 {
  margin-bottom: 8px;
  color: #17307c;
  font-size: clamp(40px, 3.6vw, 60px);
  line-height: 0.98;
}

.book-hero-copy h2 {
  margin-bottom: 12px;
  color: #13224d;
  font-size: clamp(23px, 2vw, 31px);
  line-height: 1.18;
}

.book-hero-copy span {
  display: block;
  max-width: 560px;
  color: #526078;
  font-size: 16px;
  line-height: 1.7;
}

.book-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.book-hero-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #c9d8ee;
  border-radius: 8px;
  background: #fff;
  color: #2347a3;
  font-weight: 900;
}

.book-hero-actions a:first-child {
  border-color: #2457ff;
  background: #2457ff;
  color: #fff;
}

.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 560px;
  margin-left: clamp(160px, 18vw, 225px);
  padding: 46px 24px 26px 0;
}

.hero-copy h1 {
  margin-bottom: 10px;
  color: #17307c;
  font-size: clamp(46px, 4.1vw, 66px);
  font-weight: 950;
  line-height: 0.98;
}

.hero-copy h2 {
  margin-bottom: 10px;
  color: #13224d;
  font-size: clamp(24px, 1.9vw, 30px);
  line-height: 1.2;
}

.hero-copy p {
  margin-bottom: 18px;
  color: #55637a;
  font-size: 16px;
  line-height: 1.6;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  max-width: 500px;
  padding: 10px;
  border: 1px solid rgba(186, 210, 246, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--soft-shadow);
}

.stats-strip div {
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 7px;
  align-items: center;
  min-width: 0;
}

.stats-strip small {
  color: #6b7690;
  font-size: 11px;
  white-space: nowrap;
}

.stats-strip strong {
  color: #17254e;
  font-size: 17px;
  white-space: nowrap;
}

.stat-icon,
.stat-ring {
  grid-row: span 2;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  font-size: 14px;
}

.stat-icon.blue {
  background: #e8f0ff;
  color: var(--blue);
}

.stat-icon.gold,
.stat-icon.fire {
  background: #fff2c8;
  color: #d78300;
}

.stat-ring {
  border: 4px solid #ffd14c;
  border-left-color: transparent;
  border-radius: 50%;
}

.hero-robot {
  position: absolute;
  bottom: 16px;
  left: 44px;
  z-index: 3;
  width: 136px;
  height: 212px;
  transform: scale(0.9);
  transform-origin: bottom left;
}

.robot-head {
  position: absolute;
  top: 24px;
  left: 25px;
  width: 94px;
  height: 78px;
  border: 8px solid #dceaff;
  border-radius: 42% 42% 36% 36%;
  background: #081d4a;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.14), 0 10px 30px rgba(33, 72, 150, 0.24);
}

.robot-head i {
  position: absolute;
  top: 28px;
  width: 15px;
  height: 23px;
  border-radius: 999px;
  background: #4be4ff;
  box-shadow: 0 0 18px #4be4ff;
}

.robot-head i:first-child {
  left: 27px;
}

.robot-head i:last-child {
  right: 27px;
}

.robot-body {
  position: absolute;
  top: 112px;
  left: 14px;
  width: 130px;
  height: 98px;
  border: 7px solid #dceaff;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(34, 116, 255, 0.7), rgba(170, 224, 255, 0.55));
  transform: rotate(-4deg);
}

.robot-body strong {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.screen-lines {
  position: absolute;
  top: 24px;
  left: 18px;
  width: 62px;
  height: 42px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, 0.75) 10px 13px, transparent 13px 100%),
    linear-gradient(180deg, transparent 0 8px, rgba(255, 255, 255, 0.6) 8px 10px, transparent 10px 100%);
  background-size: 16px 100%, 100% 14px;
}

.robot-arm {
  position: absolute;
  top: 128px;
  width: 45px;
  height: 19px;
  border-radius: 999px;
  background: #c6dcff;
}

.robot-arm.left {
  left: 0;
  transform: rotate(26deg);
}

.robot-arm.right {
  right: -4px;
  transform: rotate(-36deg);
}

.science-deco {
  position: absolute;
  opacity: 0.65;
}

.molecule {
  top: 26px;
  left: 44px;
  width: 104px;
  height: 78px;
}

.molecule::before,
.molecule::after {
  position: absolute;
  content: "";
  background: rgba(49, 113, 218, 0.28);
  transform-origin: left center;
}

.molecule::before {
  top: 43px;
  left: 30px;
  width: 86px;
  height: 4px;
  transform: rotate(-28deg);
}

.molecule::after {
  top: 42px;
  left: 33px;
  width: 76px;
  height: 4px;
  transform: rotate(35deg);
}

.molecule span {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, #76d8ff 35%, #5895eb);
}

.molecule span:nth-child(1) {
  top: 32px;
  left: 20px;
  width: 36px;
  height: 36px;
  background: radial-gradient(circle at 30% 25%, #fff, #ff99c4 35%, #ee5b91);
}

.molecule span:nth-child(2) {
  top: 4px;
  left: 74px;
}

.molecule span:nth-child(3) {
  right: 0;
  bottom: 4px;
}

.molecule span:nth-child(4) {
  top: 60px;
  left: 0;
}

.telescope {
  right: 70px;
  bottom: 70px;
  width: 128px;
  height: 48px;
  border: 7px solid rgba(116, 92, 255, 0.34);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.flask {
  position: absolute;
  right: 44px;
  bottom: 12px;
  width: 74px;
  height: 132px;
  opacity: 0.42;
  border: 7px solid rgba(127, 185, 255, 0.48);
  border-top: 0;
  border-radius: 0 0 34px 34px;
}

.flask::before {
  position: absolute;
  top: -36px;
  left: 17px;
  width: 28px;
  height: 40px;
  content: "";
  border: 7px solid rgba(127, 185, 255, 0.48);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.flask::after {
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 58px;
  content: "";
  border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, rgba(91, 191, 255, 0.4), rgba(64, 112, 255, 0.5));
}

.game-panel {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  padding: 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(74, 124, 255, 0.18), transparent 190px),
    linear-gradient(145deg, #081633, #0b1d3c);
  box-shadow: 0 18px 48px rgba(9, 33, 91, 0.28);
}

.olympic-hero-game {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
}

.game-topbar {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: #fff;
}

.olympic-game-frame {
  display: block;
  width: 100%;
  min-height: 248px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: #000;
}

.hero-game-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero-game-link a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  color: #10203d;
  font-weight: 950;
}

.game-topbar > div {
  display: flex;
  gap: 9px;
  align-items: center;
}

.game-topbar h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
}

.game-topbar small {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(95, 66, 255, 0.45);
  font-weight: 800;
}

.game-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.expand-button {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.expand-button::before {
  position: absolute;
  inset: 10px;
  content: "";
  border: 2px solid #fff;
  border-radius: 3px;
}

.mission {
  position: absolute;
  top: 66px;
  left: 31px;
  z-index: 4;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.space-stage {
  position: relative;
  height: 318px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 21px;
  background:
    radial-gradient(circle at 52% 50%, rgba(255, 209, 77, 0.28), transparent 80px),
    radial-gradient(circle at 35% 45%, rgba(39, 122, 255, 0.18), transparent 150px),
    linear-gradient(135deg, #091836, #0d2048 50%, #081326);
}

.starfield,
.starfield::before,
.starfield::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
  background-position: 0 0, 19px 24px;
  background-size: 74px 58px, 112px 94px;
}

.starfield::before,
.starfield::after {
  content: "";
  opacity: 0.5;
  transform: rotate(18deg) scale(1.25);
}

.sun {
  position: absolute;
  top: 135px;
  left: 48%;
  z-index: 2;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #ffe274 28%, #ffb014 65%, #f47c08);
  box-shadow: 0 0 34px #ffc845, 0 0 85px rgba(255, 186, 31, 0.6);
}

.ring {
  position: absolute;
  top: 88px;
  left: 178px;
  border-radius: 50%;
  transform: rotate(-16deg);
}

.ring-blue {
  width: 420px;
  height: 160px;
  border: 3px dashed rgba(40, 181, 255, 0.9);
}

.ring-purple {
  top: 70px;
  left: 230px;
  width: 340px;
  height: 185px;
  border: 3px solid rgba(202, 55, 255, 0.9);
  box-shadow: 0 0 18px rgba(202, 55, 255, 0.55);
}

.ring-gold {
  top: 116px;
  left: 270px;
  width: 185px;
  height: 80px;
  border: 1px solid rgba(255, 211, 112, 0.4);
}

.rocket {
  position: absolute;
  right: 245px;
  bottom: 106px;
  z-index: 3;
  width: 66px;
  height: 30px;
  border: 0;
  border-radius: 55% 10px 10px 55%;
  background: linear-gradient(90deg, #fff 0 50%, #e4ebff 51% 100%);
  transform: rotate(-32deg);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.7);
}

.rocket::before {
  position: absolute;
  top: 7px;
  left: 9px;
  width: 13px;
  height: 13px;
  content: "";
  border-radius: 50%;
  background: #3974ff;
}

.rocket::after {
  position: absolute;
  right: -15px;
  top: 8px;
  width: 24px;
  height: 13px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, #ffef77, #ff7b2e, transparent);
}

.space-stage.launched .rocket {
  animation: rocketArc 1.6s ease-in-out;
}

@keyframes rocketArc {
  0% {
    transform: translate(0, 0) rotate(-32deg);
  }
  45% {
    transform: translate(-110px, -72px) rotate(-58deg);
  }
  100% {
    transform: translate(-215px, -12px) rotate(-138deg);
  }
}

.asteroid {
  position: absolute;
  border-radius: 44% 56% 50% 42%;
  background: linear-gradient(135deg, #b9bdc9, #5d6371);
  box-shadow: inset -8px -6px 12px rgba(0, 0, 0, 0.28);
}

.a1 {
  bottom: 42px;
  right: 260px;
  width: 62px;
  height: 42px;
  transform: rotate(-12deg);
}

.a2 {
  top: 178px;
  left: 58px;
  width: 34px;
  height: 24px;
}

.a3 {
  top: 192px;
  left: 112px;
  width: 45px;
  height: 30px;
}

.mission-card {
  position: absolute;
  top: 69px;
  right: 26px;
  z-index: 4;
  width: 190px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 12px;
  background: rgba(16, 28, 55, 0.86);
  color: #fff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.mission-card strong {
  display: block;
  margin-bottom: 9px;
}

.mission-card ul {
  padding: 0 0 10px;
  margin: 0 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  list-style: none;
}

.mission-card li {
  margin: 7px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.mission-card li::before {
  margin-right: 6px;
  color: var(--yellow);
  content: "★";
}

.mission-card label {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.progress {
  height: 7px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #52de72;
}

.progress.blue span {
  background: #3a91ff;
}

.game-tools {
  position: absolute;
  bottom: 18px;
  left: 22px;
  z-index: 4;
  display: flex;
  gap: 9px;
}

.game-tools button {
  min-width: 45px;
  height: 45px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 18px;
}

.launch-row {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 14px;
  align-items: center;
  margin-top: 13px;
}

.slider-field {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

input[type="range"] {
  accent-color: var(--yellow);
}

.challenge-button {
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe66d, #ffc126);
  color: #1e2436;
  font-size: 19px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(255, 196, 38, 0.35);
}

.game-feedback {
  min-height: 21px;
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.games-page {
  width: min(1260px, calc(100% - 70px));
  padding: 22px 0 38px;
}

.games-hub {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(173, 203, 246, 0.64);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 255, 0.9)),
    linear-gradient(135deg, rgba(36, 87, 255, 0.12), rgba(34, 184, 106, 0.08));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.games-hub::before {
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  content: "";
  border: 22px solid rgba(36, 87, 255, 0.08);
  border-radius: 50%;
}

.games-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.games-header p {
  margin-bottom: 6px;
  color: #2457ff;
  font-size: 13px;
  font-weight: 900;
}

.games-header h1 {
  margin-bottom: 8px;
  color: #10204d;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.08;
}

.games-header span {
  display: block;
  max-width: 760px;
  color: #5f6f89;
  line-height: 1.75;
}

.olympic-rings {
  position: relative;
  flex: 0 0 146px;
  width: 146px;
  height: 66px;
  margin-bottom: 4px;
}

.olympic-rings i {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 5px solid #0085c7;
  border-radius: 50%;
  background: transparent;
}

.olympic-rings i:nth-child(2) {
  left: 51px;
  border-color: #000;
}

.olympic-rings i:nth-child(3) {
  left: 102px;
  border-color: #df0024;
}

.olympic-rings i:nth-child(4) {
  top: 22px;
  left: 26px;
  border-color: #f4c300;
}

.olympic-rings i:nth-child(5) {
  top: 22px;
  left: 77px;
  border-color: #009f3d;
}

.mini-games-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.mini-games-grid .pong-game,
.mini-games-grid .penalty-game {
  min-height: 100%;
  margin-top: 0;
  padding: 14px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 10% 0%, rgba(82, 154, 255, 0.2), transparent 180px),
    linear-gradient(145deg, #07152f, #102448);
  box-shadow: 0 18px 44px rgba(11, 32, 81, 0.28);
}

.mini-games-grid .pong-head {
  margin-bottom: 8px;
}

.mini-games-grid .pong-head h2 {
  font-size: 19px;
}

.mini-games-grid .pong-score {
  min-width: 82px;
  padding: 6px 10px;
}

.mini-games-grid .pong-score strong {
  font-size: 21px;
}

.mini-games-grid #pongCanvas {
  aspect-ratio: 16 / 8.6;
  border-radius: 10px;
}

.mini-games-grid .pong-controls,
.mini-games-grid .penalty-controls {
  gap: 8px;
  margin-top: 8px;
}

.mini-games-grid .pong-controls button,
.mini-games-grid .penalty-controls button {
  min-height: 34px;
  border-radius: 8px;
}

.mini-games-grid .pong-controls p,
.mini-games-grid .penalty-hint {
  font-size: 12px;
}

.olympic-games-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.olympic-game-card {
  position: relative;
  display: grid;
  min-height: 300px;
  align-content: space-between;
  gap: 18px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.16), transparent 130px),
    linear-gradient(160deg, #081633, #12244a);
  color: #fff;
  box-shadow: 0 18px 44px rgba(11, 32, 81, 0.24);
}

.olympic-game-card::before {
  position: absolute;
  inset: auto -36px -48px auto;
  width: 134px;
  height: 134px;
  content: "";
  border: 14px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.olympic-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px rgba(11, 32, 81, 0.3);
}

.game-medal {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 950;
}

.olympic-game-card > strong {
  font-size: 54px;
  line-height: 1;
}

.olympic-game-card p {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.olympic-game-card h2 {
  margin-bottom: 8px;
  color: #fff;
  font-size: 22px;
  line-height: 1.12;
}

.olympic-game-card small {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.olympic-game-card b {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #10203d;
  font-size: 13px;
}

.olympic-game-card.football {
  background:
    radial-gradient(circle at 50% 0%, rgba(82, 222, 114, 0.2), transparent 140px),
    linear-gradient(160deg, #082213, #0f5630);
}

.olympic-game-card.goalkeeper {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 206, 46, 0.22), transparent 140px),
    linear-gradient(160deg, #102032, #164b35);
}

.olympic-game-card.penalty {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 90, 64, 0.22), transparent 140px),
    linear-gradient(160deg, #1d1525, #51221e);
}

.olympic-game-card.pingpong {
  background:
    radial-gradient(circle at 50% 0%, rgba(21, 151, 255, 0.24), transparent 140px),
    linear-gradient(160deg, #07152f, #123a6a);
}

.olympic-game-card.swimming {
  background:
    radial-gradient(circle at 50% 0%, rgba(72, 224, 255, 0.25), transparent 140px),
    linear-gradient(160deg, #061d35, #0a6a84);
}

.olympic-leaderboard {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(16, 32, 61, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 36px rgba(11, 32, 81, 0.12);
}

.leaderboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.leaderboard-head p {
  margin-bottom: 5px;
  color: #315fbd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-head h2 {
  margin: 0;
  color: #10203d;
  font-size: 24px;
}

.leaderboard-head span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  background: #eef4ff;
  color: #315fbd;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.leaderboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.leaderboard-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(16, 32, 61, 0.12);
  border-radius: 8px;
  background: #fff;
  color: #42526d;
  font-weight: 850;
}

.leaderboard-tabs button.active,
.leaderboard-tabs button:hover {
  border-color: #2457ff;
  background: #2457ff;
  color: #fff;
}

.leaderboard-table {
  display: grid;
  gap: 8px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 38px minmax(160px, 1fr) minmax(90px, 120px) minmax(130px, auto);
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 32, 61, 0.08);
  border-radius: 8px;
  background: #fff;
}

.leaderboard-row > strong {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #10203d;
  color: #fff;
  font-size: 14px;
}

.leaderboard-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.leaderboard-player img,
.leaderboard-player > span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #eef4ff;
  color: #2457ff;
  font-weight: 900;
  object-fit: cover;
}

.leaderboard-player b,
.leaderboard-score b {
  display: block;
  color: #10203d;
  font-size: 15px;
}

.leaderboard-player small,
.leaderboard-score small,
.leaderboard-row time {
  color: #6c788d;
  font-size: 12px;
}

.leaderboard-score {
  text-align: right;
}

.leaderboard-row time {
  text-align: right;
}

.leaderboard-empty {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(16, 32, 61, 0.18);
  border-radius: 8px;
  background: rgba(245, 248, 255, 0.8);
  color: #52627a;
  text-align: center;
}

.admin-page {
  padding: 26px 0 44px;
}

.hidden {
  display: none !important;
}

.admin-login-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 24px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(16, 32, 61, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 31, 58, 0.08);
}

.admin-login-card p,
.admin-login-card label span {
  color: #315fbd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-login-card h1 {
  margin: 6px 0 8px;
  color: #10203d;
  font-size: 34px;
}

.admin-login-card > div > span {
  color: #6c788d;
  line-height: 1.7;
}

.admin-login-card form {
  display: grid;
  gap: 12px;
}

.admin-login-card label {
  display: grid;
  gap: 7px;
}

.admin-login-card input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(16, 32, 61, 0.14);
  border-radius: 8px;
  background: #f8fbff;
}

.admin-login-card button,
.admin-logout {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: #2457ff;
  color: #fff;
  font-weight: 900;
}

.admin-login-message {
  min-height: 22px;
  color: #6c788d;
  font-size: 13px;
}

.admin-login-message.success {
  color: #16845f;
}

.admin-login-message.error {
  color: #d64545;
}

.admin-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 22px;
  border: 1px solid rgba(16, 32, 61, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 31, 58, 0.08);
}

.admin-hero p,
.admin-panel-head span {
  color: #315fbd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-hero h1 {
  margin: 4px 0 0;
  color: #10203d;
  font-size: 34px;
}

.admin-hero > span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  background: #eef4ff;
  color: #315fbd;
  font-weight: 850;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-metric-card,
.admin-panel {
  border: 1px solid rgba(16, 32, 61, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 31, 58, 0.07);
}

.admin-metric-card {
  padding: 14px;
}

.admin-metric-card span {
  display: block;
  margin-bottom: 8px;
  color: #6c788d;
  font-size: 13px;
  font-weight: 800;
}

.admin-metric-card strong {
  color: #10203d;
  font-size: 28px;
  line-height: 1;
}

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

.admin-panel {
  padding: 16px;
}

.admin-panel-wide {
  grid-column: 1 / -1;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-panel-head h2 {
  margin: 0;
  color: #10203d;
  font-size: 20px;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid rgba(16, 32, 61, 0.08);
  border-radius: 8px;
  background: #f8fbff;
}

.admin-list-row b {
  display: block;
  color: #10203d;
  font-size: 14px;
}

.admin-list-row small {
  display: block;
  margin-top: 4px;
  color: #6c788d;
}

.admin-list-row > span {
  flex: 0 0 auto;
  color: #315fbd;
  font-weight: 900;
}

.admin-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.admin-review-actions {
  display: flex;
  gap: 7px;
}

.admin-review-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(36, 87, 255, 0.2);
  border-radius: 8px;
  background: #fff;
  color: #2457ff;
  font-weight: 900;
}

.admin-review-actions button:first-child {
  border-color: #2457ff;
  background: #2457ff;
  color: #fff;
}

.admin-content-head {
  align-items: flex-end;
}

.admin-content-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-content-tools select,
.admin-content-tools button,
.admin-content-row input,
.admin-content-row textarea,
.admin-content-row select {
  border: 1px solid rgba(16, 32, 61, 0.14);
  border-radius: 8px;
  background: #f8fbff;
}

.admin-content-tools select,
.admin-content-tools button {
  min-height: 34px;
  padding: 0 10px;
  font-weight: 850;
}

.admin-content-tools button,
.admin-content-row button {
  border-color: #2457ff;
  background: #2457ff;
  color: #fff;
}

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

.admin-message-list,
.admin-report-list,
.admin-user-list {
  display: grid;
  gap: 12px;
}

.admin-message-row,
.admin-report-row,
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #d9e6f7;
  border-radius: 8px;
  background: #f8fbff;
}

.admin-report-row,
.admin-user-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-message-main b {
  display: block;
  margin-bottom: 6px;
}

.admin-message-main p {
  margin-bottom: 8px;
  color: #53627b;
  line-height: 1.55;
}

.admin-message-main small,
.admin-message-replies small {
  color: #71809a;
}

.admin-message-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2457ff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.admin-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.admin-message-actions button,
.admin-message-replies button,
.admin-report-row button,
.admin-user-row button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid #c9d8ee;
  border-radius: 8px;
  background: #fff;
  color: #2347a3;
  font-weight: 850;
}

.admin-message-replies {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #dce7f7;
}

.admin-message-replies div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto repeat(3, auto);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
}

.admin-content-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1.1fr) minmax(220px, 1.5fr) minmax(110px, 0.7fr) 72px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(16, 32, 61, 0.08);
  border-radius: 8px;
  background: #f8fbff;
}

.admin-content-meta {
  display: grid;
  gap: 5px;
  align-self: center;
}

.admin-content-meta b {
  color: #10203d;
}

.admin-content-meta span,
.admin-content-meta small,
.admin-content-row label span {
  color: #6c788d;
  font-size: 12px;
  font-weight: 800;
}

.admin-content-row label {
  display: grid;
  gap: 6px;
}

.admin-content-row input,
.admin-content-row textarea,
.admin-content-row select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
}

.admin-content-row textarea {
  resize: vertical;
}

.admin-content-row button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.admin-content-message {
  min-height: 22px;
  margin-top: 10px;
  color: #6c788d;
  font-size: 13px;
}

.admin-content-message.success {
  color: #16845f;
}

.admin-content-message.error {
  color: #d64545;
}

.admin-tool-button,
.admin-job-card button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #2457ff;
  color: #fff;
  font-weight: 900;
}

.admin-job-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-job-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(16, 32, 61, 0.08);
  border-radius: 8px;
  background: #f8fbff;
}

.admin-job-card b {
  color: #10203d;
}

.admin-job-card p {
  margin: 6px 0;
  color: #52627a;
  line-height: 1.55;
}

.admin-job-card small {
  color: #315fbd;
  font-weight: 850;
}

.admin-job-card button {
  align-self: center;
  flex: 0 0 auto;
}

.admin-job-runs {
  margin-top: 8px;
}

.admin-empty {
  padding: 18px;
  border: 1px dashed rgba(16, 32, 61, 0.16);
  border-radius: 8px;
  color: #6c788d;
  text-align: center;
}

.pong-game {
  margin-top: 74px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.game-panel .pong-game {
  margin-top: 60px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.pong-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #fff;
}

.pong-head span {
  display: inline-flex;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 900;
}

.pong-head h2,
.pong-head h3 {
  margin: 0;
  font-size: 21px;
}

.pong-score {
  display: inline-flex;
  min-width: 96px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.pong-score strong {
  min-width: 24px;
  text-align: center;
  font-size: 24px;
}

#pongCanvas {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 28 / 15;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: #071327;
}

.game-panel #pongCanvas {
  aspect-ratio: 21 / 10;
  border-radius: 10px;
}

.game-panel .pong-head {
  margin-bottom: 8px;
}

.game-panel .pong-head h3 {
  font-size: 19px;
}

.game-panel .pong-score {
  min-width: 80px;
  padding: 6px 10px;
  border-radius: 10px;
}

.game-panel .pong-score strong {
  font-size: 21px;
}

.game-panel .pong-controls {
  gap: 8px;
  margin-top: 8px;
}

.game-panel .pong-controls button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
}

.game-panel .pong-controls p {
  font-size: 12px;
}

.pong-controls {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.pong-controls button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #10203d;
  font-weight: 950;
}

.pong-controls p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.penalty-game {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.penalty-field {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.12) 2px, transparent 2px) 0 58px / 100% 58px,
    radial-gradient(ellipse at 50% 112%, transparent 0 102px, rgba(255, 255, 255, 0.22) 103px 106px, transparent 107px),
    linear-gradient(180deg, #0e8b55, #08683e);
}

.mini-games-grid .penalty-field {
  min-height: 214px;
  border-radius: 10px;
}

.mini-games-grid .goal-frame {
  top: 18px;
  right: 34px;
  left: 34px;
  height: 96px;
  border-width: 4px;
  border-bottom-width: 3px;
}

.mini-games-grid .keeper {
  width: 36px;
  height: 50px;
  left: calc(50% - 18px);
}

.mini-games-grid .keeper[data-save="left"] {
  transform: translateX(-96px) rotate(-18deg);
}

.mini-games-grid .keeper[data-save="right"] {
  transform: translateX(96px) rotate(18deg);
}

.mini-games-grid .penalty-ball {
  bottom: 24px;
  width: 24px;
  height: 24px;
}

.mini-games-grid .penalty-ball[data-shot="left"] {
  transform: translate(-116px, -118px) scale(0.72);
}

.mini-games-grid .penalty-ball[data-shot="center"] {
  transform: translate(0, -126px) scale(0.72);
}

.mini-games-grid .penalty-ball[data-shot="right"] {
  transform: translate(116px, -118px) scale(0.72);
}

.goal-frame {
  position: absolute;
  top: 22px;
  right: 42px;
  left: 42px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 108px;
  border: 5px solid rgba(255, 255, 255, 0.88);
  border-bottom-width: 3px;
  border-radius: 8px 8px 3px 3px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 22px);
}

.goal-zone {
  display: grid;
  place-items: start center;
  padding-top: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  font-weight: 900;
}

.goal-zone:last-child {
  border-right: 0;
}

.keeper {
  position: absolute;
  bottom: 8px;
  left: calc(50% - 20px);
  width: 40px;
  height: 56px;
  border-radius: 18px 18px 12px 12px;
  background: linear-gradient(180deg, #ffdd75, #2563eb 42%);
  transition: transform 0.32s ease;
}

.keeper::before,
.keeper::after {
  position: absolute;
  top: 23px;
  width: 30px;
  height: 8px;
  content: "";
  border-radius: 999px;
  background: #2563eb;
}

.keeper::before {
  left: -24px;
  transform: rotate(-20deg);
}

.keeper::after {
  right: -24px;
  transform: rotate(20deg);
}

.keeper[data-save="left"] {
  transform: translateX(-112px) rotate(-18deg);
}

.keeper[data-save="right"] {
  transform: translateX(112px) rotate(18deg);
}

.penalty-ball {
  position: absolute;
  bottom: 28px;
  left: calc(50% - 14px);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #111 0 4px, transparent 5px),
    radial-gradient(circle at 30% 35%, #111 0 3px, transparent 4px),
    radial-gradient(circle at 68% 33%, #111 0 3px, transparent 4px),
    #fff;
  box-shadow: 0 9px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.42s cubic-bezier(0.18, 0.8, 0.32, 1);
}

.penalty-ball[data-shot="left"] {
  transform: translate(-138px, -130px) scale(0.72);
}

.penalty-ball[data-shot="center"] {
  transform: translate(0, -138px) scale(0.72);
}

.penalty-ball[data-shot="right"] {
  transform: translate(138px, -130px) scale(0.72);
}

.penalty-field[data-result="goal"] {
  box-shadow: inset 0 0 0 3px rgba(82, 222, 114, 0.45);
}

.penalty-field[data-result="saved"] {
  box-shadow: inset 0 0 0 3px rgba(255, 210, 90, 0.45);
}

.penalty-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-top: 10px;
}

.penalty-controls button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #10203d;
  font-weight: 950;
}

.penalty-controls button:disabled {
  opacity: 0.55;
}

.penalty-hint {
  min-height: 19px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.feature-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.feature-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr 34px;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  overflow: hidden;
  padding: 18px 12px 18px 18px;
  border-radius: 14px;
}

.feature-card h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.feature-card p {
  margin-bottom: 0;
  color: #53627b;
  font-size: 14px;
  line-height: 1.5;
}

.feature-card b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  font-weight: 500;
}

.feature-card.blue {
  background: linear-gradient(135deg, rgba(243, 249, 255, 0.95), rgba(230, 243, 255, 0.9));
}

.feature-card.violet {
  background: linear-gradient(135deg, rgba(251, 246, 255, 0.95), rgba(242, 232, 255, 0.9));
}

.feature-card.green {
  background: linear-gradient(135deg, rgba(240, 255, 250, 0.95), rgba(226, 248, 239, 0.9));
}

.feature-card.orange {
  background: linear-gradient(135deg, rgba(255, 248, 238, 0.95), rgba(255, 237, 214, 0.9));
}

.feature-card.blue b {
  background: var(--blue);
}

.feature-card.violet b {
  background: var(--purple);
}

.feature-card.green b {
  background: var(--green);
}

.feature-card.orange b {
  background: var(--orange);
}

.feature-visual {
  display: grid;
  width: 86px;
  height: 76px;
  place-items: center;
  border-radius: 18px;
}

.book {
  position: relative;
  background: linear-gradient(135deg, #5bb7ff, #1f64ff);
}

.book::before,
.book::after {
  position: absolute;
  top: 15px;
  width: 29px;
  height: 45px;
  content: "";
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
}

.book::before {
  left: 15px;
  transform: skewY(-9deg);
}

.book::after {
  right: 15px;
  transform: skewY(9deg);
}

.brain {
  background: linear-gradient(135deg, #8b60ff, #b48aff);
  color: #fff;
  font-size: 25px;
  font-weight: 950;
}

.controller {
  position: relative;
  background: linear-gradient(135deg, #22c98a, #2c8d81);
}

.controller::before {
  position: absolute;
  inset: 22px 13px;
  content: "";
  border-radius: 24px 24px 17px 17px;
  background: rgba(255, 255, 255, 0.9);
}

.controller::after {
  position: absolute;
  top: 34px;
  left: 29px;
  color: #24766d;
  content: "+";
  font-size: 28px;
  font-weight: 950;
}

.bust {
  position: relative;
  background: linear-gradient(135deg, #f6dbc7, #d39f75);
}

.bust::before {
  position: absolute;
  top: 14px;
  left: 27px;
  width: 32px;
  height: 32px;
  content: "";
  border-radius: 50%;
  background: #efe1d0;
}

.bust::after {
  position: absolute;
  right: 19px;
  bottom: 14px;
  left: 19px;
  height: 26px;
  content: "";
  border-radius: 42% 42% 8px 8px;
  background: #e1c7aa;
}

.content-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.content-grid-wide {
  grid-template-columns: 1fr;
}

.profile-card,
.profile-popover,
.recommend-area,
.activity-box,
.frontier-box,
.map-box,
.extra-grid article {
  border-radius: 14px;
}

.profile-card,
.profile-popover {
  padding: 18px;
}

.student-avatar {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  margin-bottom: 13px;
  border: 5px solid #e5f2ff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 30%, #ffd7ba 0 29%, transparent 30%),
    linear-gradient(135deg, #54b4ff, #d6ecff);
  color: #102454;
  font-size: 25px;
  font-weight: 950;
}

.student-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.student-head h2 {
  margin-bottom: 4px;
  font-size: 20px;
  line-height: 1.25;
}

.student-head strong {
  font-size: 14px;
}

.xp-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8f6;
}

.xp-bar span {
  display: block;
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd33d, #ff9d2e);
}

.xp-text {
  margin: 6px 0 12px;
  color: #5d6980;
  font-size: 13px;
  text-align: right;
}

.badge-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(177, 203, 238, 0.56);
}

.badge-row span {
  display: grid;
  min-height: 29px;
  place-items: center;
  border: 1px solid #d7e4f6;
  border-radius: 999px;
  color: #42607f;
  font-size: 12px;
  font-weight: 800;
}

.profile-list {
  margin: 14px 0 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  margin: 11px 0;
  color: #4e5c75;
  font-size: 14px;
  line-height: 1.45;
}

.profile-list dt {
  color: #273b63;
  font-weight: 900;
}

.profile-list dd {
  margin: 0;
}

.recommend-area {
  padding: 20px;
}

.section-title,
.box-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title p {
  margin-bottom: 3px;
  color: #1644db;
  font-size: 16px;
  font-weight: 950;
}

.section-title h2,
.box-heading h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.filter-chips {
  display: flex;
  gap: 8px;
}

.filter-chips button {
  min-height: 31px;
  padding: 0 13px;
  border: 1px solid #d5e4f7;
  border-radius: 999px;
  background: #fff;
  color: #506079;
  font-weight: 800;
}

.filter-chips button.active {
  border-color: #b8d4ff;
  background: #eaf3ff;
  color: var(--blue);
}

.backend-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 9px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eef4ff;
  color: #2457ff;
  font-size: 12px;
  font-weight: 850;
}

.backend-status.live {
  background: #eaf9f1;
  color: #168451;
}

.backend-status.demo {
  background: #fff5df;
  color: #9a6200;
}

.backend-status.offline {
  background: #fff0f0;
  color: #b33a3a;
}

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

.lesson-card {
  display: grid;
  min-height: 178px;
  overflow: hidden;
  padding: 16px 14px 13px;
  border: 2px solid transparent;
  border-radius: 12px;
}

.lesson-card span {
  display: inline-flex;
  width: max-content;
  margin-bottom: 9px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.lesson-card h3 {
  margin-bottom: 5px;
  font-size: 23px;
}

.lesson-card p {
  margin-bottom: 0;
  color: #4e5c74;
  font-size: 14px;
  line-height: 1.45;
}

.blue-card {
  border-color: #65a7ff;
  background: linear-gradient(135deg, #eff8ff, #ddecff);
}

.purple-card {
  border-color: #b391ff;
  background: linear-gradient(135deg, #fbf7ff, #efe6ff);
}

.amber-card {
  border-color: #ffbc7a;
  background: linear-gradient(135deg, #fff9ef, #ffe9d1);
}

.sky-card {
  border-color: #7bc7ff;
  background: linear-gradient(135deg, #f2fbff, #dff1ff);
}

.card-visual {
  min-height: 58px;
  margin-top: -5px;
}

.chart-visual {
  background:
    linear-gradient(135deg, transparent 46%, rgba(255, 210, 51, 0.9) 47% 50%, transparent 51%),
    linear-gradient(rgba(36, 87, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 87, 255, 0.12) 1px, transparent 1px);
  background-size: 100% 100%, 19px 19px, 19px 19px;
}

.detective-visual {
  background:
    radial-gradient(circle at 58% 46%, rgba(126, 79, 255, 0.38), transparent 35px),
    radial-gradient(circle at 73% 60%, rgba(255, 77, 112, 0.42), transparent 27px);
}

.scientist-visual {
  background:
    radial-gradient(circle at 70% 48%, rgba(90, 145, 120, 0.45), transparent 34px),
    linear-gradient(90deg, transparent 42%, rgba(105, 80, 56, 0.12));
}

.laptop-visual {
  background:
    linear-gradient(155deg, transparent 0 39%, #1a2a52 40% 61%, transparent 62%),
    radial-gradient(circle at 70% 48%, rgba(36, 87, 255, 0.26), transparent 34px);
}

.lesson-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.lesson-card small {
  color: #5b6680;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.lesson-card button {
  min-height: 30px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2457ff, #118cff);
  color: #fff;
  font-weight: 900;
}

.card-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2457ff, #118cff);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.lesson-card .favorite-card {
  border: 1px solid rgba(36, 87, 255, 0.18);
  background: #fff;
  color: #2457ff;
}

.amber-card button {
  background: linear-gradient(135deg, #ff9b20, #ff7b18);
}

.purple-card button {
  background: linear-gradient(135deg, #8a55ff, #6f43e8);
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  margin-top: 16px;
}

.activity-box,
.frontier-box,
.map-box {
  padding: 20px;
}

.map-box {
  grid-column: 1 / -1;
}

.box-heading a {
  color: #526078;
  font-size: 14px;
  font-weight: 800;
}

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

.news-card {
  min-height: 132px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #c4daf9;
  border-radius: 11px;
}

.news-card span {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.news-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.35;
}

.news-card p {
  margin-bottom: 0;
  color: #42607a;
  font-size: 12px;
  line-height: 1.45;
}

.ai-news {
  background:
    radial-gradient(circle at 78% 62%, rgba(36, 87, 255, 0.2), transparent 42px),
    linear-gradient(135deg, #eaf4ff, #d7eaff);
}

.robot-news {
  background:
    radial-gradient(circle at 70% 60%, rgba(0, 177, 255, 0.24), transparent 46px),
    linear-gradient(135deg, #d8f3ff, #6cc6ff);
}

.space-news {
  background:
    radial-gradient(circle at 68% 52%, rgba(255, 207, 58, 0.22), transparent 48px),
    linear-gradient(135deg, #0e2148, #173264);
  color: #fff;
}

.space-news p,
.space-news h3 {
  color: #fff;
}

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

.activity-item {
  display: flex;
  min-height: 74px;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(20, 38, 70, 0.08);
  border-radius: 8px;
  background: #f8fbff;
  color: inherit;
}

.activity-item:hover {
  border-color: rgba(36, 87, 255, 0.22);
  background: #f2f6ff;
}

.activity-item > span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #10203d;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.activity-item h3 {
  margin: 0 0 5px;
  color: #10203d;
  font-size: 16px;
}

.activity-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.activity-item small {
  display: inline-flex;
  margin-top: 7px;
  color: #315fbd;
  font-weight: 800;
}

.frontier-daily {
  padding: 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.frontier-page {
  padding-top: 26px;
}

.ai-learning-page {
  padding: 26px 0 44px;
}

.ai-learning-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 24px;
  border: 1px solid rgba(173, 203, 246, 0.64);
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 18%, rgba(125, 69, 255, 0.16), transparent 260px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 247, 255, 0.9));
  box-shadow: var(--shadow);
}

.ai-learning-hero p,
.ai-book-guide > p,
.reader-head p {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 950;
}

.ai-learning-hero h1 {
  margin-bottom: 8px;
  color: #10204d;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.08;
}

.ai-learning-hero span {
  display: block;
  max-width: 780px;
  color: #526078;
  line-height: 1.7;
}

.ai-learning-hero a,
.book-card a,
.reader-head a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 13px;
  border: 1px solid #c9d8ee;
  border-radius: 8px;
  background: #fff;
  color: #2347a3;
  font-size: 14px;
  font-weight: 900;
}

.ai-learning-hero a {
  align-self: center;
}

.book-shelf {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, minmax(0, 0.82fr));
  gap: 12px;
  margin-bottom: 14px;
}

.book-card {
  min-height: 172px;
  padding: 18px;
  border: 1px solid #c9dcf7;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.book-card.featured {
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 206, 46, 0.2), transparent 190px),
    linear-gradient(145deg, #081633, #142a58);
  color: #fff;
}

.book-card span {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.book-card.featured span,
.book-card.featured small {
  color: rgba(255, 255, 255, 0.72);
}

.book-card h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.book-card p {
  margin-bottom: 10px;
  color: #526078;
  font-weight: 800;
}

.book-card.featured p {
  color: rgba(255, 255, 255, 0.82);
}

.book-card small {
  display: block;
  margin-bottom: 16px;
  color: #6b7890;
  line-height: 1.55;
}

.book-card.placeholder {
  display: grid;
  align-content: center;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.72);
}

.book-card.is-active {
  outline: 2px solid rgba(79, 121, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(79, 121, 255, 0.08);
}

.ai-book-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  margin-bottom: 14px;
}

.ai-book-guide,
.ai-study-path,
.book-reader {
  padding: 20px;
  border: 1px solid #c9dcf7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.ai-book-guide h2,
.reader-head h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

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

.guide-grid section {
  min-height: 146px;
  padding: 16px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: #fff;
}

.book-overview {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.book-overview img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: #fff;
}

.book-overview span {
  display: block;
  color: #526078;
  line-height: 1.6;
}

.guide-grid h3 {
  margin-bottom: 8px;
  color: #10204d;
  font-size: 18px;
}

.guide-grid p,
.ai-study-path li {
  color: #526078;
  line-height: 1.68;
}

.ai-study-path h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.ai-study-path ol {
  display: grid;
  gap: 12px;
  padding-left: 20px;
  margin: 0;
}

.study-progress-card {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: #fff;
}

.study-progress-card span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.study-progress-card strong {
  color: #10204d;
  font-size: 20px;
}

.study-progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e8effc;
}

.study-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2457ff, #7d45ff);
}

.study-progress-card button {
  justify-self: start;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid #c9d8ee;
  border-radius: 8px;
  background: #f9fbff;
  color: #2347a3;
  font-weight: 900;
}

.study-progress-card small {
  color: #6b7890;
  line-height: 1.5;
}

.reader-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.book-reader iframe {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 1px solid #d7e5f8;
  border-radius: 8px;
  background: #fff;
}

.frontier-page .frontier-daily {
  min-height: calc(100vh - 118px);
}

.frontier-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.frontier-header p {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 950;
}

.frontier-header h1,
.frontier-header h2 {
  margin-bottom: 6px;
  font-size: 30px;
}

.frontier-header span {
  display: block;
  max-width: 760px;
  color: #526078;
  font-size: 15px;
  line-height: 1.6;
}

.frontier-header a {
  flex: 0 0 auto;
  color: #526078;
  font-size: 14px;
  font-weight: 900;
}

.frontier-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.frontier-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #cfe0f8;
  border-radius: 999px;
  background: #fff;
  color: #526078;
  font-size: 14px;
  font-weight: 900;
}

.frontier-tabs button.active {
  border-color: #9fc3ff;
  background: #eaf3ff;
  color: var(--blue);
}

.frontier-news-today {
  margin-bottom: 16px;
  padding: 17px;
  border: 1px solid #c9dcf7;
  border-radius: 12px;
  background: #f7fbff;
}

.frontier-news-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.frontier-news-heading p {
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 950;
}

.frontier-news-heading h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.frontier-news-heading span {
  color: #526078;
  font-size: 13px;
  font-weight: 900;
}

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

.frontier-news-grid article {
  min-height: 150px;
  padding: 15px;
  border: 1px solid #d1e0f6;
  border-radius: 10px;
  background: #fff;
}

.frontier-news-grid span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.frontier-news-grid h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.35;
}

.frontier-news-grid p {
  margin-bottom: 0;
  color: #536178;
  font-size: 14px;
  line-height: 1.55;
}

.frontier-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.14fr);
  gap: 14px;
}

.frontier-lead,
.frontier-item {
  border: 1px solid #c9dcf7;
  border-radius: 12px;
}

.frontier-lead {
  min-height: 310px;
  padding: 22px;
  background:
    radial-gradient(circle at 82% 20%, rgba(255, 206, 46, 0.28), transparent 86px),
    radial-gradient(circle at 76% 76%, rgba(36, 87, 255, 0.22), transparent 112px),
    linear-gradient(135deg, #eef7ff, #d9ecff);
}

.frontier-lead span,
.frontier-item span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.frontier-lead h2,
.frontier-lead h3 {
  max-width: 640px;
  margin-bottom: 10px;
  font-size: 27px;
  line-height: 1.25;
}

.frontier-lead p {
  max-width: 680px;
  color: #40536d;
  font-size: 15px;
  line-height: 1.7;
}

.frontier-lead dl {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
}

.frontier-lead dl div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  color: #41516d;
  font-size: 14px;
}

.frontier-lead dt {
  font-weight: 950;
}

.frontier-lead dd {
  margin: 0;
}

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

.frontier-item {
  min-height: 149px;
  padding: 16px;
  background: #fff;
}

.frontier-item h2,
.frontier-item h3 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.35;
}

.frontier-item p {
  margin-bottom: 12px;
  color: #536178;
  font-size: 14px;
  line-height: 1.55;
}

.frontier-item small {
  color: #2f4770;
  font-weight: 850;
}

.frontier-item.is-hidden,
.frontier-lead.is-hidden {
  display: none;
}

.projects-page {
  padding-top: 26px;
}

.project-radar {
  min-height: calc(100vh - 118px);
  padding: 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.project-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-header p,
.project-history p {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 950;
}

.project-header h1 {
  margin-bottom: 6px;
  font-size: 30px;
}

.project-header span {
  display: block;
  max-width: 780px;
  color: #526078;
  font-size: 15px;
  line-height: 1.6;
}

.project-header a {
  flex: 0 0 auto;
  color: #526078;
  font-size: 14px;
  font-weight: 900;
}

.project-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.project-toolbar button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #cfe0f8;
  border-radius: 999px;
  background: #fff;
  color: #526078;
  font-size: 14px;
  font-weight: 900;
}

.project-toolbar button.active {
  border-color: #9fc3ff;
  background: #eaf3ff;
  color: var(--blue);
}

.project-top-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  position: relative;
  min-height: 164px;
  padding: 16px 16px 15px;
  border: 1px solid #c9dcf7;
  border-radius: 12px;
  background: #fff;
}

.project-card.lead {
  grid-column: span 2;
  min-height: 238px;
  background:
    radial-gradient(circle at 80% 28%, rgba(34, 184, 106, 0.22), transparent 92px),
    radial-gradient(circle at 76% 76%, rgba(36, 87, 255, 0.18), transparent 120px),
    linear-gradient(135deg, #eef7ff, #dff3ea);
}

.project-card strong {
  display: inline-grid;
  width: 42px;
  height: 32px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 14px;
}

.project-card span {
  display: inline-flex;
  margin-left: 7px;
  color: #168451;
  font-size: 13px;
  font-weight: 950;
}

.project-card h2 {
  margin-bottom: 8px;
  font-size: 21px;
  line-height: 1.3;
}

.project-card.lead h2 {
  max-width: 620px;
  font-size: 31px;
}

.project-card p {
  margin-bottom: 0;
  color: #536178;
  font-size: 14px;
  line-height: 1.58;
}

.project-card.lead p {
  max-width: 690px;
  font-size: 15px;
  line-height: 1.7;
}

.project-card dl {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
}

.project-card dl div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  color: #41516d;
  font-size: 14px;
}

.project-card dt {
  font-weight: 950;
}

.project-card dd {
  margin: 0;
}

.project-repo-link {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 950;
  text-decoration: none;
}

.project-card.is-hidden {
  display: none;
}

.knowledge-page {
  padding-top: 26px;
}

.knowledge-hub {
  min-height: calc(100vh - 118px);
  padding: 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.knowledge-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.knowledge-header p {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 950;
}

.knowledge-header h1 {
  margin-bottom: 6px;
  font-size: 30px;
}

.knowledge-header span {
  display: block;
  max-width: 880px;
  color: #526078;
  font-size: 15px;
  line-height: 1.6;
}

.knowledge-header a {
  flex: 0 0 auto;
  color: #526078;
  font-size: 14px;
  font-weight: 900;
}

.knowledge-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.knowledge-stage-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 12px;
}

.knowledge-stage-bar button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d7e4f6;
  border-radius: 999px;
  background: #f7fbff;
  color: #526078;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-stage-bar button.active {
  border-color: #9fc3ff;
  background: #eaf3ff;
  color: var(--blue);
}

.knowledge-controls button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #cfe0f8;
  border-radius: 999px;
  background: #fff;
  color: #526078;
  font-size: 14px;
  font-weight: 900;
}

.knowledge-controls button.active {
  border-color: #9fc3ff;
  background: #eaf3ff;
  color: var(--blue);
}

.knowledge-daily {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.knowledge-daily-single {
  grid-template-columns: 1fr;
}

.knowledge-daily-card {
  padding: 17px;
  border: 1px solid #c9dcf7;
  border-radius: 12px;
}

.knowledge-daily-card.video {
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 138, 24, 0.18), transparent 86px),
    linear-gradient(135deg, #fff8ec, #f8fbff);
}

.daily-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.daily-head span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.daily-head a {
  color: #526078;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-daily-card h2 {
  margin-bottom: 8px;
  font-size: 22px;
}

.knowledge-daily-card p {
  color: #536178;
  font-size: 14px;
  line-height: 1.58;
}

.knowledge-daily-card ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding-left: 19px;
  color: #41516d;
  font-size: 14px;
  line-height: 1.5;
}

.knowledge-learning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

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

.knowledge-block {
  min-height: 168px;
  padding: 17px;
  border: 1px solid #c9dcf7;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.knowledge-block:hover,
.knowledge-block.is-active {
  border-color: #9fc3ff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(36, 87, 255, 0.12);
}

.knowledge-block.lead {
  grid-column: span 2;
  min-height: 264px;
  background:
    radial-gradient(circle at 82% 26%, rgba(255, 206, 46, 0.22), transparent 96px),
    radial-gradient(circle at 78% 82%, rgba(36, 87, 255, 0.18), transparent 120px),
    linear-gradient(135deg, #eef7ff, #eaf1ff);
}

.knowledge-block span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.knowledge-block h2 {
  margin-bottom: 8px;
  font-size: 21px;
  line-height: 1.32;
}

.knowledge-block.lead h2 {
  max-width: 680px;
  font-size: 31px;
}

.knowledge-block p {
  color: #536178;
  font-size: 14px;
  line-height: 1.58;
}

.knowledge-block small {
  display: block;
  margin-top: 12px;
  color: #6b7890;
  font-weight: 850;
}

.knowledge-block.lead p {
  max-width: 780px;
  font-size: 15px;
  line-height: 1.7;
}

.knowledge-block ul {
  display: grid;
  gap: 8px;
  margin: 15px 0 0;
  padding-left: 19px;
  color: #41516d;
  font-size: 14px;
  line-height: 1.5;
}

.knowledge-block.is-hidden {
  display: none;
}

.knowledge-detail-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #c9dcf7;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.knowledge-detail-panel > span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.knowledge-detail-panel h2 {
  margin: 0;
  color: #10204d;
  font-size: 24px;
  line-height: 1.28;
}

.knowledge-detail-panel p {
  margin: 0;
  color: #536178;
  font-size: 14px;
  line-height: 1.62;
}

.knowledge-detail-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #f7fbff;
}

.knowledge-detail-panel dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  font-size: 14px;
}

.knowledge-detail-panel dt {
  color: #10204d;
  font-weight: 950;
}

.knowledge-detail-panel dd {
  margin: 0;
  color: #526078;
}

.knowledge-detail-panel h3 {
  margin-bottom: 8px;
  color: #10204d;
  font-size: 17px;
}

.knowledge-detail-panel ol,
.knowledge-detail-panel ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
  color: #526078;
  font-size: 14px;
  line-height: 1.55;
}

.knowledge-detail-panel button {
  min-height: 40px;
  border: 1px solid #9fc3ff;
  border-radius: 8px;
  background: #2457ff;
  color: #fff;
  font-weight: 950;
}

.knowledge-detail-panel button:disabled {
  border-color: #d7e4f6;
  background: #edf3fb;
  color: #8a96aa;
}

.knowledge-detail-panel small {
  color: #6b7890;
  line-height: 1.5;
}

.scientists-page {
  padding-top: 26px;
}

.scientists-hub {
  min-height: calc(100vh - 118px);
  padding: 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.scientists-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.scientists-header p {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 950;
}

.scientists-header h1 {
  margin-bottom: 6px;
  font-size: 30px;
}

.scientists-header span {
  display: block;
  max-width: 860px;
  color: #526078;
  font-size: 15px;
  line-height: 1.6;
}

.scientists-header a {
  flex: 0 0 auto;
  color: #526078;
  font-size: 14px;
  font-weight: 900;
}

.scientist-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.scientist-controls button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #cfe0f8;
  border-radius: 999px;
  background: #fff;
  color: #526078;
  font-size: 14px;
  font-weight: 900;
}

.scientist-controls button.active {
  border-color: #9fc3ff;
  background: #eaf3ff;
  color: var(--blue);
}

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

.scientist-card {
  display: block;
  min-height: 172px;
  padding: 17px;
  border: 1px solid #c9dcf7;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.scientist-card:hover,
.scientist-card:focus-visible {
  border-color: #9fc3ff;
  box-shadow: 0 18px 34px rgba(31, 64, 111, 0.14);
  transform: translateY(-2px);
  outline: none;
}

.scientist-card.lead {
  grid-column: span 2;
  min-height: 264px;
  background:
    radial-gradient(circle at 82% 26%, rgba(255, 138, 24, 0.22), transparent 98px),
    radial-gradient(circle at 78% 82%, rgba(36, 87, 255, 0.16), transparent 120px),
    linear-gradient(135deg, #fff7ed, #eef7ff);
}

.scientist-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.scientist-avatar {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(29, 55, 94, 0.16);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.scientist-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scientist-avatar b {
  position: relative;
  z-index: 0;
}

.scientist-card.lead .scientist-avatar {
  width: 68px;
  height: 68px;
  font-size: 27px;
}

.avatar-newton { background: linear-gradient(135deg, #2446a8, #f59e0b); }
.avatar-einstein { background: linear-gradient(135deg, #2457ff, #14b8a6); }
.avatar-curie { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.avatar-euclid { background: linear-gradient(135deg, #0f766e, #84cc16); }
.avatar-gauss { background: linear-gradient(135deg, #2563eb, #8b5cf6); }
.avatar-hua { background: linear-gradient(135deg, #dc2626, #f97316); }
.avatar-turing { background: linear-gradient(135deg, #111827, #38bdf8); }
.avatar-mccarthy { background: linear-gradient(135deg, #475569, #22c55e); }
.avatar-hinton { background: linear-gradient(135deg, #4338ca, #06b6d4); }

.scientist-card span {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff2df;
  color: #df6c0d;
  font-size: 13px;
  font-weight: 950;
}

.scientist-card h2 {
  margin-bottom: 8px;
  font-size: 21px;
  line-height: 1.32;
}

.scientist-card.lead h2 {
  max-width: 700px;
  font-size: 31px;
}

.scientist-card p {
  color: #536178;
  font-size: 14px;
  line-height: 1.58;
}

.scientist-card.lead p {
  max-width: 780px;
  font-size: 15px;
  line-height: 1.7;
}

.scientist-card dl {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
}

.scientist-card dl div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  color: #41516d;
  font-size: 14px;
}

.scientist-card dt {
  font-weight: 950;
}

.scientist-card dd {
  margin: 0;
}

.scientist-card small {
  color: #2f4770;
  font-weight: 850;
}

.scientist-photo-credit {
  margin-top: 12px;
  color: #7a879c;
  font-size: 12px;
  line-height: 1.5;
}

.scientist-card.is-hidden {
  display: none;
}

.scientist-detail {
  min-height: calc(100vh - 118px);
  padding: 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.scientist-detail-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid #c9dcf7;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #fff7ed);
}

.scientist-detail-photo {
  width: 128px;
  height: 128px;
  font-size: 44px;
}

.scientist-detail-hero p {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 950;
}

.scientist-detail-hero h1 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.2;
}

.scientist-detail-hero span {
  display: block;
  max-width: 780px;
  color: #526078;
  font-size: 16px;
  line-height: 1.65;
}

.scientist-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
}

.scientist-detail-main,
.scientist-detail-side {
  display: grid;
  gap: 14px;
  align-content: start;
}

.scientist-detail-main section,
.scientist-detail-side section {
  padding: 18px;
  border: 1px solid #d6e5f8;
  border-radius: 12px;
  background: #fff;
}

.scientist-detail h2 {
  margin-bottom: 10px;
  font-size: 21px;
}

.scientist-detail p,
.scientist-detail li {
  color: #536178;
  font-size: 15px;
  line-height: 1.72;
}

.scientist-detail ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.hermes-page {
  padding: 26px 0 44px;
}

.hermes-chat-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
  min-height: calc(100vh - 126px);
}

.hermes-side,
.hermes-chat {
  border: 1px solid #c9dcf7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--soft-shadow);
}

.hermes-side {
  padding: 22px;
}

.hermes-side > p {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 950;
}

.hermes-side h1 {
  margin-bottom: 10px;
  color: #10204d;
  font-size: 34px;
}

.hermes-side span {
  display: block;
  color: #526078;
  line-height: 1.7;
}

.hermes-side dl {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.hermes-side dl div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
}

.hermes-side dt {
  color: #6b7890;
  font-weight: 900;
}

.hermes-side dd {
  margin: 0;
  color: #14234f;
  font-weight: 850;
  word-break: break-word;
}

.hermes-side button,
.hermes-composer button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #c9d8ee;
  border-radius: 8px;
  background: #fff;
  color: #2347a3;
  font-weight: 900;
}

.hermes-chat {
  display: grid;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto;
}

.hermes-messages {
  display: flex;
  overflow-y: auto;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.hermes-message {
  max-width: min(760px, 86%);
  padding: 13px 14px;
  border: 1px solid #d8e6f8;
  border-radius: 8px;
  background: #fff;
}

.hermes-message.user {
  align-self: flex-end;
  border-color: #b9d0ff;
  background: #eef4ff;
}

.hermes-message.assistant {
  align-self: flex-start;
}

.hermes-message strong {
  display: block;
  margin-bottom: 6px;
  color: #17307c;
}

.hermes-message p {
  margin: 0;
  color: #35445f;
  line-height: 1.7;
  white-space: pre-wrap;
}

.hermes-composer {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid #d8e6f8;
  background: #f8fbff;
}

.hermes-composer textarea {
  width: 100%;
  min-height: 82px;
  padding: 12px;
  border: 1px solid #c9d8ee;
  border-radius: 8px;
  color: #14234f;
  font: inherit;
  resize: vertical;
}

.hermes-composer div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hermes-composer button[type="submit"] {
  border-color: #2457ff;
  background: #2457ff;
  color: #fff;
}

.project-history {
  display: flex;
  gap: 18px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #c9dcf7;
  border-radius: 12px;
  background: #f7fbff;
}

.project-history h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.history-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.history-form label {
  display: grid;
  gap: 6px;
  color: #526078;
  font-size: 13px;
  font-weight: 900;
}

.history-form select {
  min-height: 38px;
  padding: 0 36px 0 12px;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  background: #fff;
  color: #273047;
  font: inherit;
}

.history-form button {
  min-height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #2457ff, #118cff);
  color: #fff;
  font-weight: 900;
}

.map-legend {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin: -6px 0 13px;
  color: #647087;
  font-size: 12px;
  font-weight: 800;
}

.map-legend span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  content: "";
}

.map-legend .mastered::before {
  background: #5ad36d;
}

.map-legend .doing::before {
  background: var(--blue);
}

.map-legend .waiting::before {
  background: #c7cfda;
}

.learning-path {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.learning-path::before {
  position: absolute;
  top: 46px;
  right: 9%;
  left: 9%;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--blue) 0 58%, #cfd9e8 58% 100%);
}

.path-node {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.path-node > span {
  z-index: 2;
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 8px solid #e5f3ff;
  border-radius: 50%;
  background: linear-gradient(135deg, #2d8dff, #2457ff);
  color: #fff;
  font-size: 25px;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(36, 87, 255, 0.18);
}

.path-node.locked > span {
  background: linear-gradient(135deg, #c5ccd8, #aeb7c5);
}

.path-node strong {
  margin-top: 4px;
  font-size: 16px;
}

.path-node small {
  color: #68748a;
  font-weight: 800;
}

.path-node button {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid #cfe2f4;
  border-radius: 999px;
  background: #f8fbff;
  color: #578068;
  font-size: 12px;
  font-weight: 900;
}

.extra-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 14px 0 28px;
}

.extra-grid article {
  min-height: 150px;
  padding: 22px;
}

.extra-grid span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9f3ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.extra-grid h2 {
  margin-bottom: 9px;
  font-size: 22px;
}

.extra-grid p {
  margin-bottom: 0;
  color: var(--body);
  line-height: 1.7;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(360px, 460px);
  gap: 28px;
  margin: 16px auto 28px;
  padding: 28px;
  border: 1px solid #c9dcf7;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.contact-page {
  padding-top: 26px;
}

.contact-page-section {
  width: min(100%, 1160px);
  min-height: 0;
  align-items: center;
}

.contact-intro p {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 950;
}

.contact-intro h2 {
  max-width: 680px;
  margin-bottom: 9px;
  font-size: 28px;
  line-height: 1.25;
}

.contact-intro h1 {
  max-width: 560px;
  margin-bottom: 8px;
  font-size: 32px;
  line-height: 1.2;
}

.contact-intro span {
  display: block;
  max-width: 540px;
  color: #536178;
  line-height: 1.7;
}

.primary-email {
  display: grid;
  width: min(100%, 520px);
  gap: 4px;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid #9fc3ff;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  color: #12315f;
  text-decoration: none;
  box-shadow: 0 16px 30px rgba(36, 87, 255, 0.12);
}

.primary-email small {
  color: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.primary-email strong {
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.22;
}

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.contact-methods.compact {
  margin-top: 12px;
}

.contact-methods a,
.contact-methods span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #d6e5f8;
  border-radius: 999px;
  background: #f8fbff;
  color: #41516d;
  font-size: 13px;
  font-weight: 850;
}

.contact-form {
  display: grid;
  gap: 11px;
  padding: 16px;
  border: 1px solid #d6e5f8;
  border-radius: 12px;
  background: #fff;
}

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

.contact-form label span {
  color: #536178;
  font-size: 13px;
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cfe0f8;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--ink);
  font: inherit;
}

.contact-form input {
  min-height: 42px;
  padding: 0 12px;
}

.contact-form textarea {
  min-height: 112px;
  padding: 11px 12px;
  resize: vertical;
}

.contact-form button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #2457ff, #118cff);
  color: #fff;
  font-weight: 950;
}

.contact-message {
  margin: 0;
  color: #6b7588;
  font-size: 13px;
  line-height: 1.45;
}

.contact-message.success {
  color: #137a4b;
}

.contact-message.error {
  color: #c2410c;
}

.site-footer {
  padding: 24px;
  border-top: 1px solid rgba(174, 201, 238, 0.56);
  color: #5f6d83;
  text-align: center;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(14, 24, 48, 0.45);
  backdrop-filter: blur(10px);
  z-index: 60;
}

.auth-modal.open {
  display: grid;
}

.auth-panel {
  width: min(420px, 100%);
  padding: 20px 20px 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 56px rgba(22, 44, 104, 0.22);
}

.auth-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.auth-topbar p {
  margin-bottom: 4px;
  color: #5e6c87;
  font-size: 13px;
  font-weight: 700;
}

.auth-topbar h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.icon-close {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid #d8e4f7;
  border-radius: 8px;
  background: #fff;
}

.icon-close::before,
.icon-close::after {
  position: absolute;
  top: 17px;
  left: 10px;
  width: 16px;
  height: 2px;
  content: "";
  background: #25436b;
}

.icon-close::before {
  transform: rotate(45deg);
}

.icon-close::after {
  transform: rotate(-45deg);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form.hidden {
  display: none;
}

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

.auth-form span {
  color: #4b5b76;
  font-size: 13px;
  font-weight: 700;
}

.auth-form input,
.auth-form select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d6e1f2;
  border-radius: 8px;
  background: #fff;
  color: #14213d;
}

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

.auth-submit {
  min-height: 44px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #1f64ff, #1187ff);
  color: #fff;
  font-weight: 900;
}

.auth-switch {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #2457ff;
  font-size: 13px;
  font-weight: 800;
}

.auth-message {
  min-height: 20px;
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.auth-message.success {
  color: #1e8d58;
}

.auth-message.error {
  color: #ba3a3a;
}

@media (max-width: 1320px) {
  .site-header {
    grid-template-columns: auto 1fr;
    height: auto;
    min-height: 66px;
    padding: 10px 24px;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }

  .main-nav a {
    padding: 9px 0 12px;
  }

  .main-nav a.active::after {
    bottom: 2px;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .hero-grid,
  .lower-grid,
  .frontier-layout,
  .frontier-news-grid,
  .project-top-list,
  .olympic-games-grid,
  .leaderboard-row,
  .admin-metrics,
  .admin-grid,
  .book-shelf,
  .knowledge-daily,
  .knowledge-map,
  .scientist-grid,
  .scientist-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-grid,
  .lower-grid,
  .frontier-layout,
  .knowledge-learning-layout,
  .frontier-news-grid,
  .project-top-list,
  .ai-book-layout,
  .knowledge-daily,
  .knowledge-map,
  .scientist-grid,
  .scientist-detail-grid {
    grid-template-columns: 1fr;
  }

  .project-card.lead,
  .knowledge-block.lead,
  .scientist-card.lead {
    grid-column: auto;
  }

  .knowledge-detail-panel {
    position: static;
  }

  .feature-ribbon,
  .recommend-cards,
  .frontier-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 28px, 1480px);
  }

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

  .book-hero-panel {
    grid-template-columns: 180px minmax(0, 1fr);
    padding: 22px;
  }

  .book-cover-promo {
    min-height: 236px;
  }

  .hero-copy {
    margin-left: 0;
    padding: 34px 20px 190px;
  }

  .hero-robot {
    transform: scale(0.8);
    transform-origin: bottom left;
  }

  .stats-strip,
  .content-grid,
  .extra-grid,
  .contact-section,
  .frontier-layout {
    grid-template-columns: 1fr;
  }

  .contact-section {
    width: 100%;
    padding: 20px;
  }

  .primary-email strong {
    font-size: 20px;
  }

  .frontier-header {
    display: block;
  }

  .project-header,
  .ai-learning-hero,
  .reader-head,
  .knowledge-header,
  .scientists-header,
  .project-history {
    display: block;
  }

  .frontier-header a {
    display: inline-flex;
    margin-top: 10px;
  }

  .project-header a,
  .knowledge-header a,
  .scientists-header a,
  .history-form {
    display: inline-flex;
    margin-top: 10px;
  }

  .games-header {
    display: block;
  }

  .mini-games-grid {
    grid-template-columns: 1fr;
  }

  .scientist-detail-hero {
    grid-template-columns: 1fr;
  }

  .scientist-detail-photo {
    width: 102px;
    height: 102px;
    font-size: 36px;
  }

  .profile-card:not(.profile-popover) {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px 18px;
    align-items: start;
  }

  .profile-card:not(.profile-popover) .student-avatar {
    grid-row: span 4;
  }

  .profile-card:not(.profile-popover) .profile-list,
  .profile-card:not(.profile-popover) .badge-row {
    grid-column: 1 / -1;
  }

  .space-stage {
    height: 360px;
  }

  .mission-card {
    top: auto;
    right: 18px;
    bottom: 76px;
  }
}

@media (max-width: 680px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 14px;
  }

  .brand {
    min-width: 0;
    font-size: 19px;
  }

  .brand-logo {
    width: 190px;
    height: 54px;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    padding: 8px 0 4px;
    white-space: normal;
  }

  .site-header.nav-open .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .main-nav a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(92, 122, 185, 0.16);
    border-radius: 8px;
    background: #f8fbff;
    font-size: 14px;
  }

  .main-nav a.active::after {
    display: none;
  }

  .header-actions {
    display: none;
  }

  .hero-copy h1 {
    font-size: 46px;
  }

  .hero-copy h2 {
    font-size: 26px;
  }

  .feature-ribbon,
  .recommend-cards,
  .news-row,
  .frontier-list,
  .olympic-games-grid,
  .leaderboard-row,
  .admin-metrics,
  .admin-grid,
  .book-shelf,
  .guide-grid,
  .mini-games-grid,
  .learning-path {
    grid-template-columns: 1fr;
  }

  .games-page {
    width: min(100% - 28px, 1260px);
    padding-top: 16px;
  }

  .games-hub {
    padding: 14px;
  }

  .games-header h1 {
    font-size: 30px;
  }

  .leaderboard-head {
    display: grid;
  }

  .admin-login-card {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    display: grid;
  }

  .admin-content-row {
    grid-template-columns: 1fr;
  }

  .admin-review-row {
    grid-template-columns: 1fr;
  }

  .admin-job-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-row,
  .leaderboard-score,
  .leaderboard-row time {
    text-align: left;
  }

  .olympic-rings {
    margin-top: 12px;
    transform: scale(0.86);
    transform-origin: left center;
  }

  .feature-card {
    grid-template-columns: 76px 1fr 30px;
  }

  .feature-visual {
    width: 72px;
    height: 66px;
  }

  .game-panel {
    padding: 12px;
    border-radius: 16px;
  }

  .book-hero-panel {
    grid-template-columns: 1fr;
  }

  .book-cover-promo {
    min-height: 220px;
  }

  .book-hero-copy h1 {
    font-size: 42px;
  }

  .book-hero-copy h2 {
    font-size: 24px;
  }

  .hero-game-link {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-topbar {
    margin: 4px 4px 8px;
  }

  .game-topbar h2 {
    font-size: 23px;
  }

  .mission {
    position: static;
    margin-left: 5px;
  }

  .space-stage {
    height: 430px;
  }

  .mission-card {
    right: 14px;
    bottom: 70px;
    left: 14px;
    width: auto;
  }

  .ring {
    left: 60px;
  }

  .ring-purple {
    left: 82px;
  }

  .ring-gold {
    left: 120px;
  }

  .rocket {
    right: 80px;
  }

  .launch-row {
    grid-template-columns: 1fr;
  }

  .pong-game {
    margin-top: 12px;
  }

  .pong-controls {
    grid-template-columns: 1fr 1fr;
  }

  .pong-controls p {
    grid-column: 1 / -1;
  }

  .penalty-controls {
    grid-template-columns: 1fr 1fr;
  }

  .section-title,
  .box-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-chips {
    flex-wrap: wrap;
  }

  .learning-path::before {
    display: none;
  }

  .profile-card {
    display: block;
  }
}

/* AI星火少年轻量视觉覆盖：保留原布局，只降低视觉重量。 */
:root {
  --ink: #172033;
  --body: #4d5b70;
  --muted: #7a8798;
  --blue: #2563eb;
  --blue-2: #38bdf8;
  --purple: #7c3aed;
  --green: #18a86b;
  --orange: #ff7a1a;
  --yellow: #facc15;
  --card: rgba(255, 255, 255, 0.94);
  --line: rgba(137, 157, 185, 0.28);
  --shadow: 0 14px 34px rgba(23, 32, 51, 0.08);
  --soft-shadow: 0 8px 22px rgba(23, 32, 51, 0.07);
}

body {
  background:
    linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #f8fafc 0%, #eef6ff 52%, #f8fbff 100%);
  background-size: 46px 46px, 46px 46px, 100% 100%;
}

body::before,
body::after {
  display: none;
}

.site-header {
  min-height: 64px;
  height: auto;
  padding: 8px 28px;
  border-bottom-color: rgba(137, 157, 185, 0.22);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  min-width: 260px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.brand-logo {
  width: 260px;
  height: 72px;
  box-shadow: none;
}

.brand-star {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--orange), var(--blue));
  font-size: 19px;
  text-shadow: none;
}

.brand-star::before {
  display: none;
}

.main-nav {
  gap: 6px;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: #465365;
  font-size: 14px;
  font-weight: 750;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--blue);
  background: #eef5ff;
}

.main-nav a.active::after {
  display: none;
}

.page-shell {
  width: min(1320px, calc(100% - 48px));
}

.hero-grid {
  gap: 16px;
  padding-top: 22px;
}

.hero-panel,
.game-panel,
.feature-card,
.profile-card,
.recommend-area,
.activity-box,
.frontier-box,
.map-box,
.extra-grid article {
  border-color: var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-panel,
.book-hero-panel,
.feature-card,
.profile-card,
.profile-popover,
.recommend-area,
.activity-box,
.frontier-box,
.map-box,
.extra-grid article {
  border-radius: 8px;
}

.book-hero-panel {
  background:
    linear-gradient(135deg, rgba(255, 122, 26, 0.08), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.92));
}

.book-cover-promo {
  box-shadow: 0 18px 34px rgba(27, 75, 177, 0.18);
}

.book-hero-copy > p {
  color: var(--orange);
  font-weight: 900;
}

.book-hero-copy h1 {
  color: var(--ink);
}

.book-hero-copy h2 {
  color: #24324a;
}

.book-hero-copy span {
  color: var(--body);
}

.book-hero-actions a {
  border-color: #d8e2f0;
  color: #31445f;
}

.book-hero-actions a:first-child,
.home-button,
.auth-submit {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 122, 26, 0.18);
}

.game-panel {
  border-color: rgba(37, 99, 235, 0.24);
  background:
    linear-gradient(145deg, rgba(8, 22, 51, 0.96), rgba(20, 42, 88, 0.96));
  box-shadow: 0 16px 36px rgba(9, 33, 91, 0.22);
}

.game-icon {
  background: rgba(255, 255, 255, 0.1);
}

.feature-card {
  grid-template-columns: 64px 1fr 28px;
  min-height: 102px;
  padding: 16px;
}

.feature-card h2 {
  margin-bottom: 6px;
  font-size: 19px;
}

.feature-card p {
  font-size: 13px;
}

.feature-card b {
  width: 28px;
  height: 28px;
  font-size: 24px;
}

.feature-card.blue,
.feature-card.violet,
.feature-card.green,
.feature-card.orange {
  background: #fff;
}

.feature-card.blue {
  border-top: 3px solid var(--blue);
}

.feature-card.violet {
  border-top: 3px solid var(--purple);
}

.feature-card.green {
  border-top: 3px solid var(--green);
}

.feature-card.orange {
  border-top: 3px solid var(--orange);
}

.feature-visual {
  width: 56px;
  height: 56px;
  border-radius: 8px;
}

.feature-card .book::before,
.feature-card .book::after {
  top: 12px;
  width: 18px;
  height: 30px;
}

.feature-card .book::before {
  left: 10px;
}

.feature-card .book::after {
  right: 10px;
}

.brain {
  font-size: 20px;
}

.controller::before {
  inset: 18px 10px;
}

.controller::after {
  top: 24px;
  left: 21px;
  font-size: 22px;
}

.bust::before {
  top: 11px;
  left: 18px;
  width: 21px;
  height: 21px;
}

.bust::after {
  right: 13px;
  bottom: 12px;
  left: 13px;
  height: 18px;
}

.recommend-area,
.activity-box,
.frontier-box,
.map-box {
  background: #fff;
}

.section-title p {
  color: var(--orange);
  font-size: 14px;
  font-weight: 900;
}

.section-title h2,
.box-heading h2 {
  font-size: 21px;
}

.filter-chips button {
  border-color: #d8e2f0;
}

.filter-chips button.active {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.lesson-card {
  min-height: 166px;
  border-width: 1px;
  border-radius: 8px;
  background: #fff;
}

.lesson-card h3 {
  font-size: 20px;
}

.blue-card,
.purple-card,
.amber-card,
.sky-card {
  background: #fff;
}

.blue-card {
  border-top: 3px solid var(--blue);
}

.purple-card {
  border-top: 3px solid var(--purple);
}

.amber-card {
  border-top: 3px solid var(--orange);
}

.sky-card {
  border-top: 3px solid var(--blue-2);
}

.card-visual {
  min-height: 38px;
  opacity: 0.58;
}

.card-button,
.lesson-card button {
  background: var(--blue);
}

.amber-card button,
.purple-card button {
  background: var(--blue);
}

.news-card,
.activity-item {
  border-radius: 8px;
}

.ai-learning-hero,
.frontier-daily,
.project-radar,
.knowledge-hub,
.games-hub,
.scientists-hub,
.contact-section,
.admin-login-card,
.admin-hero,
.admin-panel {
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

@media (max-width: 1320px) {
  .main-nav a {
    padding: 8px 10px;
  }
}

@media (max-width: 680px) {
  .page-shell {
    width: min(100% - 24px, 1320px);
  }

  .brand {
    min-width: 0;
    font-size: 20px;
  }

  .brand-logo {
    width: 198px;
    height: 56px;
  }

  .feature-card {
    grid-template-columns: 52px 1fr 26px;
  }
}

.message-page {
  padding: 28px 0 46px;
}

.message-hero,
.message-composer,
.message-side,
.message-card {
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.message-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 24px;
  align-items: stretch;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 28px;
  border-color: rgba(79, 70, 229, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(239, 246, 255, 0.94) 44%, rgba(240, 253, 244, 0.92)),
    #fff;
}

.message-hero::before {
  position: absolute;
  top: 18px;
  right: 28px;
  width: 148px;
  height: 86px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(20, 184, 166, 0.18) 50%, transparent 50%),
    linear-gradient(rgba(37, 99, 235, 0.12) 50%, transparent 50%);
  background-size: 18px 18px;
  content: "";
  opacity: 0.75;
  transform: rotate(4deg);
}

.message-hero > div {
  position: relative;
  z-index: 1;
}

.message-hero p,
.message-side-head p {
  margin-bottom: 6px;
  color: #ef4444;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.message-hero h1 {
  max-width: 760px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.05;
}

.message-hero span,
.message-notice {
  color: var(--body);
  line-height: 1.65;
}

.message-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.message-hero-stats span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.message-notice {
  display: grid;
  max-width: 290px;
  min-height: 130px;
  align-content: end;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.68);
  color: #334155;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.12);
  backdrop-filter: blur(10px);
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.message-main {
  display: grid;
  gap: 14px;
}

.message-composer {
  display: grid;
  gap: 16px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), #fff 38%),
    #fff;
}

.message-composer-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.message-composer-head p {
  margin: 0 0 3px;
  color: #4f46e5;
  font-size: 13px;
  font-weight: 950;
}

.message-composer-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}

.message-composer-head > span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 12px;
  font-weight: 900;
}

.community-type-toggle {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 4px;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #eef2ff;
}

.community-type-toggle label {
  display: inline-flex;
  align-items: center;
}

.community-type-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.community-type-toggle span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: #475569;
  font-weight: 900;
}

.community-type-toggle input:checked + span {
  background: #111827;
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.message-form-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
}

.message-composer label {
  display: grid;
  gap: 6px;
}

.message-composer label span {
  color: #4b5b76;
  font-size: 13px;
  font-weight: 800;
}

.message-composer input,
.message-composer select,
.message-composer textarea,
.message-reply-form input {
  width: 100%;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #14213d;
}

.message-composer input:focus,
.message-composer select:focus,
.message-composer textarea:focus,
.message-reply-form input:focus {
  border-color: #818cf8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
  outline: 0;
}

.message-composer input,
.message-composer select,
.message-reply-form input {
  min-height: 42px;
  padding: 0 12px;
}

.message-composer textarea {
  min-height: 116px;
  padding: 12px;
  resize: vertical;
}

.message-composer-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.message-composer-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.message-composer-actions button,
.message-reply-form button,
.message-side-head button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.message-composer-actions button {
  min-width: 108px;
  background: linear-gradient(135deg, #111827, #4f46e5);
  box-shadow: 0 12px 22px rgba(79, 70, 229, 0.22);
}

.message-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}

.message-tabs button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-weight: 800;
}

.message-tabs button.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.message-list {
  display: grid;
  gap: 12px;
}

.message-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-left: 4px solid #38bdf8;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.message-card.question {
  border-left-color: #f97316;
}

.message-card.status {
  border-left-color: #14b8a6;
}

.message-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.11);
}

.message-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.message-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #f97316, #22c55e 52%, #2563eb);
  color: #fff;
  font-weight: 950;
}

.message-card-head strong {
  display: block;
  color: var(--ink);
}

.message-card-head span,
.message-card p,
.message-reply span,
.notification-item p,
.notification-item span {
  color: var(--body);
}

.message-card-head span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
  font-size: 13px;
}

.message-card-head span b,
.message-card-head span i {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.message-card-head span b {
  background: #eef2ff;
  color: #4f46e5;
}

.message-card-head span i {
  background: #f0fdf4;
  color: #15803d;
}

.message-card h2 {
  margin-bottom: 8px;
  color: #111827;
  font-size: 21px;
  line-height: 1.32;
}

.message-card p {
  margin-bottom: 12px;
  line-height: 1.7;
}

.message-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.message-card-actions button,
.message-reply button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-weight: 800;
}

.message-card-actions button:first-child {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.message-card-actions button:nth-child(2) {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.message-replies {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.message-reply {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.message-reply-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

.message-side {
  position: sticky;
  top: 92px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255, 247, 237, 0.72), #fff 46%),
    #fff;
}

.message-side-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.message-side-head h2 {
  margin: 0;
  font-size: 20px;
}

.message-side-head h2 span {
  color: #4f46e5;
}

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

.community-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e3ebf7;
}

.community-topics h2 {
  flex: 0 0 100%;
  margin: 0 0 2px;
  font-size: 18px;
}

.community-topics span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.community-topics span:nth-child(2) {
  background: #eef2ff;
  color: #4f46e5;
}

.community-topics span:nth-child(3) {
  background: #fff7ed;
  color: #c2410c;
}

.community-topics span:nth-child(4) {
  background: #ecfeff;
  color: #0e7490;
}

.community-topics span:nth-child(5) {
  background: #f0fdf4;
  color: #15803d;
}

.notification-item {
  padding: 12px;
  border: 1px solid #e3ebf7;
  border-radius: 8px;
  background: #fff;
}

.notification-item.unread {
  border-color: #a5b4fc;
  background: #eef2ff;
}

.notification-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.notification-item p {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.5;
}

.message-empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(240, 253, 244, 0.82)),
    #f8fafc;
  color: var(--muted);
}

@media (max-width: 980px) {
  .message-layout,
  .message-form-row {
    grid-template-columns: 1fr;
  }

  .message-side {
    position: static;
  }
}

@media (max-width: 680px) {
  .message-hero,
  .message-composer-actions {
    display: grid;
  }

  .message-hero {
    padding: 22px;
  }

  .message-hero::before {
    display: none;
  }

  .message-notice {
    max-width: none;
    min-height: auto;
  }

  .message-composer-head,
  .message-card-head span {
    display: grid;
  }

  .message-reply,
  .message-reply-form {
    grid-template-columns: 1fr;
  }
}
