/* ============================================================
   Hello Linda — 页面样式表
   模块划分：
     1. 基础重置与全局变量
     2. 页面布局（居中）
     3. 欢迎卡片样式
     4. 排版与字体
     5. 装饰元素
     6. 页脚
     7. 动画
     8. 响应式适配
   ============================================================ */

/* ------ 1. 基础重置与全局变量 ------ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 配色方案 */
  --color-bg-start: #667eea;
  --color-bg-end: #764ba2;
  --color-card-bg: rgba(255, 255, 255, 0.92);
  --color-title: #2d3748;
  --color-subtitle: #4a5568;
  --color-message: #718096;
  --color-accent: #667eea;
  --color-divider: #e2e8f0;
  --color-footer: rgba(255, 255, 255, 0.7);

  /* 字体 */
  --font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 圆角 */
  --radius-card: 20px;
  --radius-divider: 4px;

  /* 阴影 */
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.15);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* 渐变背景 */
  background: linear-gradient(135deg, var(--color-bg-start) 0%, var(--color-bg-end) 100%);
  color: var(--color-title);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------ 2. 页面布局（居中） ------ */
.container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ------ 3. 欢迎卡片样式 ------ */
.welcome-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 3rem 2.5rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  /* 淡入动画 */
  animation: fadeInUp 0.8s ease-out both;
}

/* ------ 4. 排版与字体 ------ */
.title {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-title);
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  /* 文字阴影 */
  text-shadow: 0 2px 8px rgba(102, 126, 234, 0.18);
  /* 标题渐变动画 */
  animation: fadeInUp 0.8s 0.15s ease-out both;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--color-subtitle);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s 0.3s ease-out both;
}

.divider {
  width: 60px;
  height: 4px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-divider);
  background: linear-gradient(90deg, var(--color-bg-start), var(--color-bg-end));
  animation: fadeInUp 0.8s 0.45s ease-out both;
}

.message {
  font-size: 1rem;
  color: var(--color-message);
  line-height: 1.6;
  animation: fadeInUp 0.8s 0.55s ease-out both;
}

/* ------ 5. 装饰元素 ------ */
.decoration {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s 0.05s ease-out both;
}

.ring {
  display: inline-block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid transparent;
  background:
    linear-gradient(var(--color-card-bg), var(--color-card-bg)) padding-box,
    linear-gradient(135deg, var(--color-bg-start), var(--color-bg-end)) border-box;
  /* 柔和脉冲动画 */
  animation: pulse 2.5s ease-in-out infinite;
}

/* ------ 6. 页脚 ------ */
.footer {
  text-align: center;
  padding: 1.25rem 1rem;
  font-size: 0.85rem;
  color: var(--color-footer);
  letter-spacing: 0.03em;
}

/* ------ 7. 动画 ------ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* ------ 8. 响应式适配 ------ */
@media (max-width: 480px) {
  .welcome-card {
    padding: 2rem 1.5rem;
  }

  .title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }
}
