/* 全局重置与基础变量 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

:root {
  --primary: #3498db;
  --secondary: #8e44ad;
  --light-bg: rgba(255, 255, 255, 0.7);
  --dark-bg: rgba(45, 50, 65, 0.7);
  --text-main: #2c3e50;
  --text-light: #7f8c8d;
  --shadow-light: 0 2px 10px rgba(0,0,0,0.05);
  --shadow-normal: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 20px rgba(0,0,0,0.12);
}

/* 基础布局与背景 */
body {
  background: linear-gradient(120deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  color: var(--text-main);
  transition: all 0.3s ease;
  overflow-x: hidden;
}

body.dark {
  background: linear-gradient(120deg, #1a1c23 0%, #2d3241 100%);
  --text-main: #f5f7fa;
  --text-light: #d1d5db;
  --light-bg: rgba(45, 50, 65, 0.7);
}

/* 背景装饰元素 */
body::before {
  content: "";
  position: fixed;
  top: 20%;
  left: 10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.05);
  z-index: -1;
}

body::after {
  content: "";
  position: fixed;
  bottom: 20%;
  right: 10%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(142, 68, 173, 0.05);
  z-index: -1;
}

body.dark::before {
  background: rgba(100, 181, 246, 0.05);
}

body.dark::after {
  background: rgba(186, 104, 200, 0.05);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部固定导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--light-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-light);
  z-index: 999;
  transition: all 0.3s ease;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 20px;
}

/* 将当前时间和导航操作按钮靠右 */
.current-time {
  margin-left: auto;
}

.nav-actions {
  margin-left: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}

.logo-text {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}

.nav-menu-desktop {
  display: flex;
  gap: 30px;
}

.nav-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  background: var(--light-bg);
  backdrop-filter: blur(10px);
  flex-direction: column;
  padding: 20px;
  gap: 15px;
  box-shadow: var(--shadow-normal);
}

.nav-item {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item:hover {
  color: var(--text-main);
}

.nav-item::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.3s ease;
}

.nav-item:hover::after {
  width: 100%;
}

.nav-item.active {
  color: var(--text-main);
}

.nav-item.active::after {
  width: 100%;
}

.current-time {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
}



.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: 15px;
}

#themeToggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  border-radius: 50%;
  color: var(--text-main);
  transition: background 0.2s ease;
}

#themeToggle:hover {
  background: rgba(0,0,0,0.05);
}

body.dark #themeToggle:hover {
  background: rgba(255,255,255,0.1);
}

/* 移动端导航菜单 */
.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: var(--text-main);
  cursor: pointer;
}

/* 页脚 */
.footer {
  padding: 40px 0 20px;
  border-top: 1px solid rgba(0,0,0,0.05);
  margin-top: 40px;
}

body.dark .footer {
  border-top-color: rgba(255,255,255,0.05);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  color: transparent;
}

.footer-nav {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

.footer-copyright {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* 响应式适配 */
@media (max-width: 768px) {
  .nav-menu-desktop {
    display: none;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: var(--light-bg);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    box-shadow: var(--shadow-normal);
  }

  .nav-menu.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  body::before {
    width: 150px;
    height: 150px;
  }

  body::after {
    width: 100px;
    height: 100px;
  }
}