/* ================= 全局变量 ================= */
:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --border-radius: 5px;
  --spacing-sm: 4px;
  --spacing-md: 8px;
  --spacing-lg: 16px;
}

/* ================= 通用基础样式 ================= */
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f9f9f9;
  width: 100%;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

/* 轻微改善游戏页面的行间距 */
.game-info p {
  margin-bottom: 0.35rem; /* 从Bootstrap默认0.25rem轻微增加到0.35rem */
}

/* 改善段落和文本间距 */
p, div {
  line-height: 1.4;
}

/* 改善列表项间距 */
.links-area p, .game-info p {
  margin-bottom: 0.4rem;
}

/* 改善按钮和链接的可点击区域 */
a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
}

/* 按钮专门样式 - 文字居中 */
.btn, button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
}

/* ================= 容器样式 ================= */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--spacing-md);
  padding-bottom: 15px;
  background-color: #fff;
  box-shadow: 0px 4px 8px var(--shadow-color);
  border-radius: var(--border-radius);
  /* 使用动态视口高度，避免移动端 100vh 留白 */
  min-height: 100vh;
  min-height: 100dvh;
  height: auto;
  display: flex;
  flex-direction: column;
}

/* 仅在动态页使用：更贴底的内边距，避免尾部空白 */
.container.jl-no-bottom {
  padding-bottom: max(4px, env(safe-area-inset-bottom)) !important;
}

/* 中等屏幕及以上样式 */
@media screen and (min-width: 768px) {
  body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
  }

  .container {
    max-width: 800px;
    border-radius: 0px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  }
}

/* 小屏幕样式调整 */
@media (max-width: 576px) {
  .container {
    padding: var(--spacing-sm);
    padding-bottom: 15px;
  }
}

/* ================= 通用链接样式 ================= */
a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* ================= 信息卡片组件 ================= */
.info-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
}

.info-card-header {
  background: #f8f9fa;
  padding: var(--spacing-lg);
  border-bottom: 1px solid #e0e0e0;
}

.info-card-header h5 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.info-card-body {
  padding: var(--spacing-lg);
}

/* 功能按钮悬停效果 */
.info-card-body .border:hover {
  border-color: var(--primary-color) !important;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* 响应式调整 */
@media (max-width: 576px) {
  .info-card-body .d-flex.gap-2 {
    gap: 0.5rem !important;
  }

  .info-card-body .p-3 {
    padding: 0.75rem !important;
  }

  .info-card-body .fs-4 {
    font-size: 1.2rem !important;
  }

  .info-card-body .fw-bold {
    font-size: 0.85rem;
  }
}
/* ================= 创意首页增强样式 ================= */
.home-page {
  background: linear-gradient(135deg, #f1f5f9 0%, #f5f3ff 40%, #fef2f2 100%);
  position: relative;
}

.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(125, 211, 252, 0.28), transparent 58%),
    radial-gradient(circle at 80% 15%, rgba(244, 114, 182, 0.25), transparent 55%),
    radial-gradient(circle at 50% 80%, rgba(167, 139, 250, 0.23), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.home-page .container.creative-home {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 60px -35px rgba(30, 64, 175, 0.55);
  backdrop-filter: blur(14px);
}

@supports not (backdrop-filter: blur(1px)) {
  .home-page .container.creative-home {
    background: #ffffff;
  }
}

.auth-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.info-card--hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #1e1b4b 0%, #1e3a8a 50%, #0f172a 100%);
  color: #f8fafc;
  box-shadow: 0 24px 48px -28px rgba(30, 58, 138, 0.7);
}

.info-card--hero .info-card-body {
  position: relative;
  padding: clamp(2rem, 5vw, 3rem);
  z-index: 1;
}

.hero-body .hero-canvas {
  position: absolute;
  inset: -40% -20%;
  background:
    radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.6), transparent 55%),
    radial-gradient(circle at 80% 20%, rgba(244, 114, 182, 0.45), transparent 60%),
    radial-gradient(circle at 30% 80%, rgba(52, 211, 153, 0.35), transparent 60%);
  filter: blur(0);
  opacity: 0.75;
  z-index: 0;
  animation: heroPulse 12s ease-in-out infinite;
}

.hero-layout {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  z-index: 1;
}

.hero-text {
  max-width: 520px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.85);
}

.hero-title {
  margin: 0.75rem 0 0.5rem;
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 700;
  color: #f8fafc;
}

.hero-subtitle {
  margin: 0;
  font-size: 1rem;
  color: rgba(226, 232, 240, 0.85);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.hero-tag {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: #e0f2fe;
  backdrop-filter: blur(6px);
}

.hero-auth {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.hero-button--primary {
  background: linear-gradient(130deg, #60a5fa, #a855f7);
  color: #fff;
  box-shadow: 0 16px 30px -18px rgba(129, 140, 248, 0.8);
}

.hero-button--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -16px rgba(129, 140, 248, 0.95);
}

.hero-button--ghost {
  background: rgba(15, 23, 42, 0.25);
  color: #e0f2fe;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

.hero-button--ghost:hover {
  background: rgba(15, 23, 42, 0.4);
}

.hero-user {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: rgba(226, 232, 240, 0.85);
}

.hero-user__profile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.hero-user__profile img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 6px rgba(15, 23, 42, 0.35);
  object-fit: cover;
}

.hero-user__name {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
}

.hero-user__greeting {
  display: block;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.7);
  margin-top: 0.15rem;
}

.hero-user__stats {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(224, 231, 255, 0.9);
}

.info-card--section {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  --section-accent: #60a5fa;
  --section-accent-soft: rgba(96, 165, 250, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 255, 0.94));
  box-shadow: 0 18px 32px -26px rgba(15, 23, 42, 0.45);
}

.section-personal {
  --section-accent: #60a5fa;
  --section-accent-soft: rgba(96, 165, 250, 0.18);
}

.section-social {
  --section-accent: #f472b6;
  --section-accent-soft: rgba(244, 114, 182, 0.18);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(254, 235, 241, 0.94));
}

.section-entertainment {
  --section-accent: #a855f7;
  --section-accent-soft: rgba(168, 85, 247, 0.18);
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.95), rgba(237, 233, 254, 0.94));
}

.info-card--section::before {
  content: "";
  position: absolute;
  inset: -60% -10% 50% 40%;
  background: radial-gradient(circle, var(--section-accent-soft), transparent 60%);
  opacity: 0.75;
  pointer-events: none;
}

.info-card--section::after {
  content: "";
  position: absolute;
  height: 4px;
  left: 0;
  right: 0;
  top: 0;
  background: linear-gradient(120deg, transparent, var(--section-accent), transparent);
  opacity: 0.55;
}

.info-card--section .info-card-header {
  background: transparent;
  border-bottom: 0;
  padding: clamp(1.4rem, 4vw, 1.8rem) clamp(1.4rem, 4vw, 2rem) 0.5rem;
  position: relative;
  z-index: 1;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.9rem;
  background: var(--section-accent-soft);
  font-size: 1.2rem;
}

.section-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.section-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #475569;
  letter-spacing: 0.03em;
}

.info-card--section .info-card-body {
  position: relative;
  z-index: 1;
  padding: clamp(1.4rem, 4vw, 2rem);
  padding-top: clamp(0.8rem, 3vw, 1.2rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.1rem;
}

.feature-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.2rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a;
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 12px 24px -22px rgba(15, 23, 42, 0.45);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  isolation: isolate;
}

.feature-tile::before {
  content: "";
  position: absolute;
  inset: -40% 30% 30% -40%;
  background: radial-gradient(circle, var(--section-accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 0;
}

.feature-tile > * {
  position: relative;
  z-index: 1;
}

.feature-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 34px -20px rgba(59, 130, 246, 0.55);
}

.feature-tile:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 1.85rem;
}

.feature-title {
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
}

.feature-hint {
  font-size: 0.78rem;
  color: #64748b;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .hero-layout {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .hero-auth {
    align-items: flex-end;
    text-align: right;
  }
}

@media (max-width: 767.98px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-button {
    width: 100%;
  }

  .hero-auth {
    width: 100%;
    align-items: stretch;
  }

  .hero-user {
    align-items: flex-start;
  }
}

@media (max-width: 576px) {
  .feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-button,
  .feature-tile {
    transition: none;
  }

  .hero-button:hover,
  .feature-tile:hover {
    transform: none;
  }

  .hero-body .hero-canvas {
    animation: none;
  }
}

@keyframes heroPulse {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(2deg) scale(1.05);
  }
}
