/* 
 * 新的主要样式表
 * 基于YIKE时光的设计风格
 */

/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 主色调 */
  --primary-color: #3498db;
  --secondary-color: #f8bbd0;
  --accent-color: #a2d2ff;

  /* 中性色 */
  --dark-color: #1a1a1a;
  --light-color: #ffffff;
  --gray-color: #95a5a6;

  /* 文本颜色 */
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --text-gray: #7f8c8d;

  /* 背景颜色 */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --bg-card: #ffffff;

  /* 字体 */
  --font-sans: 'Noto Sans SC', sans-serif;

  /* 间距 */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* 边框 */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  --border-radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);

  /* 过渡 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* 深色模式 */
body.dark-mode {
  --primary-color: #5dade2;
  --secondary-color: #ff9eb6;
  --accent-color: #b8e0ff;

  --dark-color: #f5f5f5;
  --light-color: #1a1a1a;
  --gray-color: #7f8c8d;

  --text-dark: #ffffff;
  --text-light: #ffffff;
  --text-gray: #bdc3c7;

  --bg-primary: #1a1a1a;
  --bg-secondary: #2c2c2c;
  --bg-card: #2c2c2c;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-secondary);
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-color);
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

/* 顶部导航栏样式 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-right: 0.5rem;
}

.logo-text-outline {
  font-size: 2.5rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-dark);
}

.nav-menu ul {
  display: flex;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-dark);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

/* 添加夜间模式下导航菜单的文字颜色 */
body.dark-mode .nav-menu a {
  color: var(--text-light);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-normal);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a.active {
  color: var(--primary-color);
}

.search-toggle {
  display: flex;
  align-items: center;
  position: relative;
}

.search-toggle input {
  padding: 0.5rem 2rem 0.5rem 1rem;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--gray-color);
  outline: none;
  background-color: transparent;
  color: var(--text-dark);
  width: 250px;
}

.search-toggle i {
  position: absolute;
  right: 10px;
  color: var(--gray-color);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
  margin-left: 1rem;
  transition: background-color var(--transition-fast);
}

.theme-toggle:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.theme-toggle i {
  font-size: 1.2rem;
  color: var(--text-dark);
}

body:not(.dark-mode) .theme-toggle i.fa-sun {
  display: none;
}

body.dark-mode .theme-toggle i.fa-moon {
  display: none;
}

body.dark-mode .theme-toggle i {
  color: var(--text-light);
}

body.dark-mode .theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 主要内容区域样式 */
.main-content {
  display: flex;
  min-height: 100vh;
  padding-top: 80px;
}

.left-content {
  flex: 1;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4rem;
}

.title-line {
  margin-bottom: 1rem;
}

.scroll-indicator {
  margin-top: auto;
  margin-bottom: 2rem;
}

.scroll-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
}

.scroll-button:hover {
  transform: translateY(5px);
}

.scroll-button i {
  color: var(--text-light);
  font-size: 1.2rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.social-link {
  color: var(--text-dark);
  font-size: 1rem;
  transition: color var(--transition-fast);
}

.social-link:hover {
  color: var(--primary-color);
}

.right-content {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.character-image img {
  max-height: 90vh;
  max-width: 100%;
  object-fit: contain;
}

.floating-cards {
  position: absolute;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  padding: 1rem;
  transition: transform var(--transition-normal);
}

.card:hover {
  transform: translateX(-5px);
}

.card i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.card span {
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-dark);
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .main-title {
    font-size: 3rem;
  }
}

@media (max-width: 992px) {
  .main-content {
    flex-direction: column;
  }

  .left-content,
  .right-content {
    padding: 2rem;
  }

  .floating-cards {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }

  .nav-menu {
    display: none;
  }

  .search-toggle input {
    width: 180px;
  }

  .main-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {

  .logo-text,
  .logo-text-outline {
    font-size: 2rem;
  }

  .search-toggle {
    display: none;
  }

  .left-content {
    padding: 1.5rem;
  }

  .main-title {
    font-size: 2rem;
  }
}

/* 夜间模式下的logo颜色 */
body.dark-mode .logo-text {
  color: var(--text-light);
}

body.dark-mode .logo-text-outline {
  -webkit-text-stroke: 1px var(--text-light);
}

/* 夜间模式下的搜索框 */
body.dark-mode .search-toggle input {
  color: var(--text-light);
  border-color: var(--text-gray);
}

body.dark-mode .search-toggle i {
  color: var(--text-gray);
}

/* 夜间模式下的社交链接 */
body.dark-mode .social-link {
  color: var(--text-light);
}

/* 夜间模式下的卡片文字 */
body.dark-mode .card span {
  color: var(--text-light);
}

/* 夜间模式下的标题 */
body.dark-mode .main-title {
  color: var(--text-light);
}

/* 夜间模式下的导航栏背景 */
body.dark-mode .header {
  background-color: rgba(26, 26, 26, 0.95);
}