/* ============================
   海镜 SeaIn — 官网样式表
   ============================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 颜色系统 */
  --color-bg: #0a0e17;
  --color-bg-alt: #0f172a;
  --color-bg-card: #131c31;
  --color-bg-elevated: #1a2744;

  --color-primary: #38bdf8;
  --color-primary-light: #7dd4fc;
  --color-primary-dark: #0284c7;
  --color-primary-glow: rgba(56, 189, 248, 0.25);

  --color-accent: #818cf8;
  --color-accent-light: #a5b4fc;

  --color-text: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;

  --color-border: rgba(148, 163, 184, 0.12);
  --color-border-light: rgba(148, 163, 184, 0.20);

  /* 字体 */
  --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* 间距 */
  --section-padding: 100px 0;
  --container-width: 1140px;

  /* 动画 */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* --- Container --- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section {
  padding: var(--section-padding);
  position: relative;
}

.section__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section__tag {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 16px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section__desc {
  color: var(--color-text-secondary);
  font-size: 1.0625rem;
  line-height: 1.8;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: #fff;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.4);
}

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border-light);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(56, 189, 248, 0.05);
}

.btn--lg {
  padding: 16px 40px;
  font-size: 1.0625rem;
}

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

/* ============================
   Header / Navigation
   ============================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header--scrolled {
  background: rgba(10, 14, 23, 0.95);
  border-bottom-color: var(--color-border);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo__icon {
  flex-shrink: 0;
}

.logo__text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text);
}

.logo__sub {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-left: 4px;
}

/* Nav */
.nav__list {
  display: flex;
  gap: 32px;
}

.nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-text);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger--active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger--active span:nth-child(2) {
  opacity: 0;
}

.hamburger--active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================
   Hero
   ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(129, 140, 248, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 0;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  animation: bounceScroll 2s ease-in-out infinite;
}

.hero__scroll-arrow {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-text-muted), transparent);
}

@keyframes bounceScroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================
   About Section
   ============================ */
.about {
  background: var(--color-bg-alt);
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.about__card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
}

.about__card:hover {
  border-color: rgba(56, 189, 248, 0.25);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.about__icon {
  margin-bottom: 16px;
}

.about__card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text);
}

.about__card p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================
   Games Section
   ============================ */
.games {
  background: var(--color-bg);
}

.games__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.game-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.game-card__img {
  height: 200px;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 16px;
  overflow: hidden;
}

/* Game card art via design images */
.game-card__img--1 {
  background:
    linear-gradient(135deg, rgba(10,14,23,0.6) 0%, rgba(15,39,74,0.3) 100%),
    url('../images/game-time-echo.svg');
  background-size: auto, cover;
  background-position: center, center;
}

.game-card__img--1::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
  pointer-events: none;
}

.game-card__img--2 {
  background:
    linear-gradient(135deg, rgba(10,14,23,0.5) 0%, rgba(45,27,105,0.3) 100%),
    url('../images/game-star-traveler.svg');
  background-size: auto, cover;
  background-position: center, center;
}

.game-card__img--2::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
}

.game-card__img--3 {
  background:
    linear-gradient(135deg, rgba(10,14,23,0.5) 0%, rgba(11,42,56,0.3) 100%),
    url('../images/game-deep-sea.svg');
  background-size: auto, cover;
  background-position: center, center;
}

.game-card__img--3::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 8px, rgba(255,255,255,0.015) 8px, rgba(255,255,255,0.015) 10px);
  pointer-events: none;
}

.game-card__status {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
  backdrop-filter: blur(12px);
}

.game-card__status--dev {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.game-card__status--soon {
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-primary-light);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.game-card__body {
  padding: 24px;
}

.game-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.game-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.game-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-card__tags span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: rgba(148, 163, 184, 0.08);
  padding: 3px 12px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
}

/* ============================
   Stats Section
   ============================ */
.stats {
  padding: 80px 0;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

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

.stats__item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats__number {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stats__suffix {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.stats__label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 8px;
}

/* ============================
   Culture Section
   ============================ */
.culture {
  background: var(--color-bg);
}

.culture__content {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.culture__item {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.culture__num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
  min-width: 60px;
}

.culture__text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.culture__text p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ============================
   Join Section
   ============================ */
.join {
  background: var(--color-bg-alt);
  text-align: center;
}

.join__inner {
  max-width: 640px;
  margin: 0 auto;
}

.join__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
}

.join__desc {
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  line-height: 1.8;
}

/* ============================
   Contact Section
   ============================ */
.contact {
  background: var(--color-bg);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact__item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact__item svg {
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 4px;
}

.contact__item h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact__item p,
.contact__item a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.contact__item a:hover {
  color: var(--color-primary);
}

/* Form */
.contact__form {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.form__group {
  margin-bottom: 16px;
}

.form__input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  padding: 14px 18px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  transition: var(--transition);
  outline: none;
}

.form__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.form__input::placeholder {
  color: var(--color-text-muted);
}

.form__textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================
   Footer
   ============================ */
.footer {
  padding: 60px 0 24px;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
}

.footer__brand {
  max-width: 280px;
}

.footer__desc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-top: 12px;
  line-height: 1.7;
}

.footer__links {
  display: flex;
  gap: 48px;
}

.footer__col h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__col a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.footer__col a:hover {
  color: var(--color-primary);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.footer__bottom a:hover {
  color: var(--color-primary);
}

/* ============================
   Animations
   ============================ */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease forwards;
}

.animate-in:nth-child(2) { animation-delay: 0.15s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 1024px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

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

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    height: 0;
    overflow: hidden;
    transition: var(--transition-slow);
  }

  .nav--open {
    height: calc(100vh - 72px);
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 40px 24px;
  }

  .nav__link {
    display: block;
    padding: 16px 0;
    font-size: 1.125rem;
  }

  .hamburger {
    display: flex;
  }

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

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

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .culture__item {
    flex-direction: column;
    gap: 12px;
  }

  .culture__num {
    font-size: 2rem;
    min-width: auto;
  }

  .footer__inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer__links {
    flex-direction: column;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .br--mobile {
    display: block;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .contact__form {
    padding: 24px 20px;
  }

  .stats__grid {
    gap: 24px;
  }
}

/* ============================
   Selection
   ============================ */
::selection {
  background: rgba(56, 189, 248, 0.3);
  color: var(--color-text);
}

/* ============================
   Scrollbar
   ============================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-bg-elevated);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}
