/* 福大人工智能研究中心 - 浅色科技风 */
:root {
  --blue-50: #eef5ff;
  --blue-100: #d9e8ff;
  --blue-200: #b8d4ff;
  --blue-500: #2b6ef6;
  --blue-600: #1f57d8;
  --blue-700: #1744ad;
  --cyan-400: #38bdf8;
  --slate-50: #f7f9fc;
  --slate-100: #eef2f7;
  --slate-200: #dde5f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 10px 32px rgba(31, 87, 216, 0.08);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 72px;
  --container: min(1180px, calc(100% - 40px));
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--slate-700);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(43, 110, 246, 0.11), transparent 60%),
    radial-gradient(700px 360px at 92% 4%, rgba(56, 189, 248, 0.1), transparent 55%),
    linear-gradient(180deg, #f4f8ff 0%, var(--slate-50) 38%, #f8fafc 100%);
  line-height: 1.65;
  min-height: 100dvh;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font: inherit;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  padding-block: 64px;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(43, 110, 246, 0.1);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, var(--blue-500), #0ea5e9 70%);
  box-shadow: 0 6px 16px rgba(43, 110, 246, 0.35);
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  border-right-color: transparent;
  transform: rotate(45deg);
}

.logo-text {
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  font-weight: 700;
  color: var(--slate-900);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--slate-500);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--blue-600);
  background: var(--blue-50);
}

.nav-link.is-active {
  color: var(--blue-600);
  background: transparent;
  font-weight: 600;
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-500), var(--cyan-400));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--slate-200);
}

.btn {
  border: none;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, filter 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  color: var(--white);
  box-shadow: 0 8px 18px rgba(43, 110, 246, 0.28);
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 22px rgba(43, 110, 246, 0.34);
}

.btn-round {
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.btn-block {
  width: 100%;
  padding: 12px 20px;
  border-radius: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--slate-700);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Hero */
.hero {
  padding-top: 28px;
  padding-bottom: 80px;
}

.hero-wrap {
  position: relative;
}

.hero-banner {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(43, 110, 246, 0.12);
}

.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.35) 0%, rgba(31, 87, 216, 0.18) 45%, transparent 70%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.2), transparent 40%);
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: clamp(240px, 40vw, 420px);
  object-fit: cover;
}

.hero-entries {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -48px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(43, 110, 246, 0.12);
  overflow: hidden;
}

.entry-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 18px;
  border-right: 1px solid var(--slate-100);
  transition: background 0.2s;
}

.entry-item:hover {
  background: var(--blue-50);
}

.entry-item:last-child {
  border-right: none;
}

.entry-text h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--slate-900);
  font-weight: 700;
}

.entry-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--slate-500);
}

.entry-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(43, 110, 246, 0.2);
}

.entry-icon--originality {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.entry-icon--python {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
}

.entry-icon--hardware {
  background: linear-gradient(135deg, #818cf8, #4f46e5);
}

.entry-icon--ai {
  background: linear-gradient(135deg, #22d3ee, #0891b2);
}

/* Recommends */
.recommends {
  padding-top: 40px;
}

.recommends-panel {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 260px;
  gap: 28px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(43, 110, 246, 0.1);
}

.recommend-tab {
  width: 100%;
  border: 1px solid transparent;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 14px;
  padding: 0;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.recommend-tab:last-child {
  margin-bottom: 0;
}

.recommend-tab img {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.recommend-tab span {
  display: block;
  padding: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(31, 87, 216, 0.9));
  text-align: center;
}

.recommend-tab:hover {
  transform: translateY(-2px);
}

.recommend-tab.is-active {
  transform: translateX(3px);
  border-color: var(--blue-500);
  box-shadow: 0 10px 24px rgba(43, 110, 246, 0.22);
}

.recommends-main {
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.recommend-pane h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
  color: var(--slate-900);
}

.recommend-pane img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--slate-50);
  border: 1px solid var(--slate-100);
}

.recommend-desc p {
  margin: 0 0 22px;
  font-size: 0.95rem;
  color: var(--slate-500);
  line-height: 1.75;
}

.recommends-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0;
}

/* Cases */
.cases {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.95));
}

.cases-grid {
  display: grid;
  gap: 22px;
}

.cases-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.case-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--slate-100);
  transition: transform 0.22s, box-shadow 0.22s;
}

.case-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(43, 110, 246, 0.14);
}

.case-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.case-card h3 {
  margin: 0;
  padding: 16px 12px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--slate-900);
  background: var(--white);
}

/* Functions */
.functions {
  text-align: center;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  color: var(--slate-900);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.section-extra {
  margin: 0;
  color: var(--slate-500);
  font-size: 0.98rem;
}

.functions .section-extra {
  margin-bottom: 36px;
}

.functions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.function-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(43, 110, 246, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.function-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(43, 110, 246, 0.14);
}

.function-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(43, 110, 246, 0.18);
}

.function-icon--courseware {
  background: linear-gradient(135deg, #93c5fd, #3b82f6);
}

.function-icon--homework {
  background: linear-gradient(135deg, #67e8f9, #06b6d4);
}

.function-icon--user {
  background: linear-gradient(135deg, #a5b4fc, #6366f1);
}

.function-icon--data {
  background: linear-gradient(135deg, #7dd3fc, #0ea5e9);
}

.function-item p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--slate-700);
}

/* Schools */
.schools {
  background: var(--white);
  border-top: 1px solid var(--slate-100);
}

.schools .section-extra {
  margin-bottom: 36px;
}

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

.school-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid var(--slate-100);
  background: var(--white);
  transition: transform 0.2s, box-shadow 0.2s;
}

.school-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(43, 110, 246, 0.12);
}

.school-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.school-card h3 {
  margin: 0;
  padding: 22px 16px;
  text-align: center;
  font-size: 1.02rem;
  color: var(--slate-900);
}

/* Footer */
.site-footer {
  background:
    radial-gradient(600px 200px at 20% 0%, rgba(43, 110, 246, 0.25), transparent 60%),
    linear-gradient(180deg, #0f172a, #152238);
  color: rgba(255, 255, 255, 0.86);
  padding: 40px 0 28px;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: 0.875rem;
  margin-bottom: 18px;
}

.footer-contact label {
  color: rgba(255, 255, 255, 0.5);
  margin-right: 6px;
}

.footer-copy {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
}

.footer-copy a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-copy a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* Modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
}

.modal-dialog {
  position: relative;
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 16px;
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(43, 110, 246, 0.1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: var(--slate-50);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--slate-500);
}

.modal-dialog h2 {
  margin: 0 0 20px;
  font-size: 1.25rem;
  color: var(--slate-900);
}

.login-form label {
  display: block;
  margin-bottom: 14px;
}

.login-form label span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  color: var(--slate-700);
  font-weight: 500;
}

.login-form input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  font: inherit;
  background: var(--slate-50);
}

.login-form input:focus {
  outline: 2px solid rgba(43, 110, 246, 0.28);
  border-color: var(--blue-500);
  background: var(--white);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 10px;
}

.captcha-box {
  display: grid;
  place-items: center;
  background: var(--blue-50);
  border: 1px dashed var(--blue-500);
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--blue-700);
  user-select: none;
}

/* Responsive */
@media (max-width: 1100px) {
  .site-nav ul {
    gap: 2px;
  }

  .nav-link {
    padding: 8px 10px;
    font-size: 0.88rem;
  }

  .logo-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 1024px) {
  .recommends-panel {
    grid-template-columns: 1fr;
  }

  .recommends-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .recommend-tab {
    margin-bottom: 0;
  }

  .recommend-tab.is-active {
    transform: none;
  }

  .cases-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .header-actions {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px 20px 20px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 4px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 14px;
  }

  .nav-link.is-active::after {
    display: none;
  }

  .nav-link.is-active {
    background: var(--blue-50);
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-login {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .section {
    padding-block: 48px;
  }

  .hero {
    padding-bottom: 32px;
  }

  .hero-entries {
    position: static;
    grid-template-columns: 1fr 1fr;
    margin-top: 16px;
  }

  .entry-item {
    border-right: 1px solid var(--slate-100);
    border-bottom: 1px solid var(--slate-100);
  }

  .entry-item:nth-child(2n) {
    border-right: none;
  }

  .entry-item:nth-child(n + 3) {
    border-bottom: none;
  }

  .recommends-list {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-contact {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 520px) {
  .hero-entries {
    grid-template-columns: 1fr;
  }

  .entry-item {
    border-right: none;
  }

  .entry-item:nth-child(n + 3) {
    border-bottom: 1px solid var(--slate-100);
  }

  .entry-item:last-child {
    border-bottom: none;
  }

  .cases-row,
  .functions-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
