/* ========================================
   Jack's AI Tools - 全局样式
   设计风格：精致极简 + 玻璃拟态
   ======================================== */

/* CSS 变量定义 */
:root {
  /* 主色调 - 深邃优雅的蓝色系 */
  --color-accent: #3B5BFE;
  --color-accent-light: #5C7BFF;
  --color-accent-dark: #2541E3;
  
  /* 背景色系 - 微妙的渐变 */
  --color-bg: #FAFBFC;
  --color-bg-gradient-start: #F0F4F8;
  --color-bg-gradient-end: #FAFBFC;
  --color-bg-secondary: rgba(255, 255, 255, 0.8);
  --color-bg-glass: rgba(255, 255, 255, 0.7);
  
  /* 文字色系 - 增加层次 */
  --color-text: #0F172A;
  --color-text-secondary: #64748B;
  --color-text-muted: #94A3B8;
  
  /* 边框和分割 */
  --color-border: rgba(226, 232, 240, 0.8);
  --color-border-light: rgba(241, 245, 249, 0.6);
  
  /* 字体 */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  
  /* 圆角 - 更柔和 */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* 阴影 - 更精致的多层阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
  --shadow-xl: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 30px rgba(59, 91, 254, 0.15);
  
  /* 动画曲线 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: all 0.15s var(--ease-out);
  --transition-base: all 0.25s var(--ease-out);
  --transition-slow: all 0.4s var(--ease-out);
}

/* 引入 Inter 字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* 重置样式 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(180deg, var(--color-bg-gradient-start) 0%, var(--color-bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========================================
   装饰背景元素
   ======================================== */

body::before {
  content: '';
  position: fixed;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(59, 91, 254, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ========================================
   布局容器
   ======================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 48px;
  }
}

/* ========================================
   Header 导航 - 玻璃拟态
   ======================================== */

.header {
  position: sticky;
  top: 0;
  background: var(--color-bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  border-radius: var(--radius-md);
  color: white;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(59, 91, 254, 0.25);
  transition: var(--transition-base);
}

.logo:hover .logo-icon {
  transform: scale(1.05) rotate(-5deg);
  box-shadow: 0 6px 20px rgba(59, 91, 254, 0.35);
}

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

.nav-link {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  opacity: 0;
  transition: var(--transition-fast);
  border-radius: var(--radius-full);
}

.nav-link:hover {
  color: var(--color-text);
  background: rgba(15, 23, 42, 0.04);
}

.nav-link.active {
  color: var(--color-accent);
  background: rgba(59, 91, 254, 0.08);
  font-weight: 600;
}

/* ========================================
   Footer 页脚
   ======================================== */

.footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
  margin-top: auto;
  background: rgba(255, 255, 255, 0.5);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-link {
  color: var(--color-text-secondary);
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-email {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
  font-size: 14px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--color-border);
  transition: var(--transition-base);
  cursor: pointer;
}

.footer-email:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.footer-copyright {
  color: var(--color-text-muted);
  font-size: 13px;
}

/* ========================================
   通用组件
   ======================================== */

/* 按钮 - 精致渐变 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 91, 254, 0.35), 0 2px 4px rgba(59, 91, 254, 0.2);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent) 100%);
  opacity: 0;
  transition: var(--transition-base);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 91, 254, 0.4), 0 4px 8px rgba(59, 91, 254, 0.2);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary span,
.btn-primary svg {
  position: relative;
  z-index: 1;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: white;
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 卡片 - 悬浮效果 */
.card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.card:hover {
  border-color: rgba(59, 91, 254, 0.3);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 91, 254, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-radius: var(--radius-lg);
  font-size: 26px;
  margin-bottom: 20px;
  transition: var(--transition-base);
}

.card:hover .card-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(59, 91, 254, 0.12) 0%, rgba(99, 102, 241, 0.08) 100%);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-tag {
  padding: 5px 12px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: var(--transition-fast);
}

.card:hover .card-tag {
  background: rgba(59, 91, 254, 0.08);
  color: var(--color-accent);
}

/* 页面标题 */
.page-header {
  text-align: center;
  padding: 80px 0 56px;
}

.page-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 640px) {
  .page-title {
    font-size: 44px;
  }
}

.page-subtitle {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* 网格布局 */
.grid-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 80px;
  align-items: stretch;
}

@media (min-width: 640px) {
  .grid-tools {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-tools {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--color-text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ========================================
   主页特有样式 - Hero 区域
   ======================================== */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px 80px;
  position: relative;
}

/* 头像光环效果 */
.hero-avatar-wrapper {
  position: relative;
  margin-bottom: 28px;
}

.hero-avatar-wrapper::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 50%, transparent 100%);
  border-radius: var(--radius-full);
  opacity: 0.2;
  filter: blur(12px);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.25;
    transform: scale(1.05);
  }
}

.hero-avatar {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: white;
  box-shadow: 0 8px 32px rgba(59, 91, 254, 0.3);
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}

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

/* 主标语 - 更大更醒目 */
.hero-tagline {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--color-text) 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (min-width: 640px) {
  .hero-tagline {
    font-size: 48px;
  }
}

/* 个人介绍 */
.hero-bio {
  font-size: 16px;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.9;
}

.hero-bio br {
  display: block;
  content: "";
  margin-bottom: 4px;
}

/* 特点标签 */
.hero-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: var(--transition-base);
}

.feature-item:hover {
  border-color: rgba(59, 91, 254, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 16px;
}

.feature-text {
  color: var(--color-text);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 320px;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    max-width: none;
    justify-content: center;
  }
}

/* ========================================
   工具内页样式
   ======================================== */

.tool-container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  width: 100%;
}

@media (min-width: 640px) {
  .tool-container {
    padding: 40px 32px 80px;
  }
}

.tool-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.tool-header-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 91, 254, 0.08) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-radius: var(--radius-xl);
  font-size: 32px;
  transition: var(--transition-base);
}

.tool-header-icon:hover {
  transform: scale(1.05) rotate(-5deg);
}

.tool-header-info h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.tool-header-info p {
  font-size: 15px;
  color: var(--color-text-secondary);
}

.tool-content {
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 640px) {
  .tool-content {
    padding: 40px;
  }
}

/* ========================================
   工具页面面包屑
   ======================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
  font-weight: 500;
}

.breadcrumb a {
  color: var(--color-accent);
  transition: var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--color-text-muted);
}

/* ========================================
   动画
   ======================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s var(--ease-out) forwards;
}

.fade-in-scale {
  animation: fadeInScale 0.5s var(--ease-out) forwards;
}

.slide-up {
  animation: slideUp 0.7s var(--ease-out) forwards;
}

/* 交错动画延迟 */
.stagger-1 { animation-delay: 0.1s; opacity: 0; }
.stagger-2 { animation-delay: 0.2s; opacity: 0; }
.stagger-3 { animation-delay: 0.3s; opacity: 0; }
.stagger-4 { animation-delay: 0.4s; opacity: 0; }

/* 工具卡片链接 */
.tool-link {
  display: flex;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.tool-link:hover .card {
  border-color: rgba(59, 91, 254, 0.3);
}

/* 工具卡片容器动画 */
#tools-grid .tool-link {
  opacity: 0;
  animation: fadeInScale 0.5s var(--ease-out) forwards;
  height: 100%;
}

#tools-grid .tool-link:nth-child(1) { animation-delay: 0.1s; }
#tools-grid .tool-link:nth-child(2) { animation-delay: 0.2s; }
#tools-grid .tool-link:nth-child(3) { animation-delay: 0.3s; }
#tools-grid .tool-link:nth-child(4) { animation-delay: 0.4s; }
#tools-grid .tool-link:nth-child(5) { animation-delay: 0.5s; }
#tools-grid .tool-link:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   关于区域 - About Section
   ======================================== */

.about-section {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid var(--color-border);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .about-content {
    grid-template-columns: 1fr 300px;
    gap: 64px;
  }
}

.about-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.about-para {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.9;
  margin-bottom: 20px;
}

.about-para strong {
  color: var(--color-text);
  font-weight: 600;
}

.about-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.meta-tag {
  padding: 8px 14px;
  background: rgba(59, 91, 254, 0.06);
  border: 1px solid rgba(59, 91, 254, 0.15);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
}

/* 反馈卡片 */
.about-feedback {
  display: flex;
  align-items: flex-start;
}

.feedback-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
  transition: var(--transition-base);
  width: 100%;
}

.feedback-card:hover {
  border-color: rgba(59, 91, 254, 0.3);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feedback-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 91, 254, 0.1) 0%, rgba(99, 102, 241, 0.05) 100%);
  border-radius: var(--radius-lg);
  font-size: 28px;
  margin: 0 auto 16px;
}

.feedback-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text);
}

.feedback-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-text);
  color: white;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition-base);
}

.feedback-btn:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========================================
   响应式优化
   ======================================== */

@media (max-width: 639px) {
  .header-content {
    height: 64px;
  }
  
  .logo span {
    display: none;
  }
  
  .hero {
    padding: 48px 20px 64px;
  }
  
  .hero-avatar {
    width: 80px;
    height: 80px;
    font-size: 36px;
  }
  
  .hero-tagline {
    font-size: 28px;
    line-height: 1.25;
  }
  
  .hero-tagline br {
    display: none;
  }
  
  .hero-bio {
    font-size: 15px;
    line-height: 1.8;
  }
  
  .hero-bio br {
    display: none;
  }
  
  .hero-features {
    gap: 8px;
  }
  
  .feature-item {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .btn {
    padding: 12px 24px;
  }
  
  .card {
    padding: 22px;
  }
  
  .page-header {
    padding: 60px 0 40px;
  }
  
  .page-title {
    font-size: 28px;
  }
  
  .about-section {
    padding: 60px 0;
  }
  
  .about-content {
    gap: 40px;
  }
  
  .about-para {
    font-size: 15px;
  }
  
  .about-meta {
    justify-content: center;
  }
}
