/* ========================================
   教务管理系统 - 现代学校风格样式
   ======================================== */

/* CSS 变量定义 */
:root {
  /* 主色调 - 学校蓝 */
  --primary-color: #1e5aa8;
  --primary-light: #4a8bd4;
  --primary-dark: #14407a;
  
  /* 辅助色 - 学术绿 */
  --accent-color: #2d8659;
  --accent-light: #4ab57a;
  
  /* 中性色 */
  --text-dark: #1a1a2e;
  --text-medium: #4a4a5a;
  --text-light: #7a7a8a;
  --bg-light: #f5f7fa;
  --bg-white: #ffffff;
  --border-color: #e8ecf0;
  
  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(30, 90, 168, 0.08);
  --shadow-md: 0 4px 16px rgba(30, 90, 168, 0.12);
  --shadow-lg: 0 8px 32px rgba(30, 90, 168, 0.16);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* 过渡 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  
  /* 侧边栏宽度 */
  --sidebar-width: 260px;
}

/* 重置与基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-medium);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   主容器布局
   ======================================== */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   顶部导航栏
   ======================================== */
.top-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.school-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.school-icon svg {
  width: 28px;
  height: 28px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.logo-text .subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition-fast);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   主内容区布局
   ======================================== */
.main-wrapper {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  padding: 24px;
  gap: 24px;
}

/* ========================================
   侧边栏
   ======================================== */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 16px;
  height: fit-content;
  position: sticky;
  top: 94px;
  transition: transform var(--transition-normal);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-medium);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--primary-color);
  border-radius: 0 2px 2px 0;
  transition: height var(--transition-fast);
}

.nav-item:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(30, 90, 168, 0.1) 0%, transparent 100%);
  color: var(--primary-color);
}

.nav-item.active::before {
  height: 24px;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

/* ========================================
   主内容卡片
   ======================================== */
.main-content {
  flex: 1;
  min-width: 0;
}

.content-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  padding: 24px 32px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.card-body {
  padding: 32px;
}

/* ========================================
   简介区域
   ======================================== */
.intro-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(30, 90, 168, 0.05) 0%, rgba(45, 134, 89, 0.05) 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  border: 1px solid rgba(30, 90, 168, 0.1);
}

.hero-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}

.hero-icon svg {
  width: 40px;
  height: 40px;
}

.hero-text h3 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.hero-text p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.intro-desc p {
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.8;
  margin-bottom: 16px;
}

.intro-desc p:last-child {
  margin-bottom: 0;
}

/* ========================================
   加入我们区域
   ======================================== */
.join-section {
  margin-top: 32px;
}

.join-section h3 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 4px solid var(--accent-color);
}

.join-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.join-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  transition: var(--transition-normal);
}

.join-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.join-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(30, 90, 168, 0.1) 0%, rgba(45, 134, 89, 0.1) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--primary-color);
}

.join-icon svg {
  width: 28px;
  height: 28px;
}

.join-info h4 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.join-info p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.join-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-fast);
}

.join-btn:hover {
  box-shadow: 0 4px 12px rgba(30, 90, 168, 0.3);
  color: white;
}

/* ========================================
   分隔线
   ======================================== */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
  margin: 40px 0;
}

/* ========================================
   功能特点区域
   ======================================== */
.features-section {
  margin-top: 32px;
}

.features-section h3 {
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 24px;
  padding-left: 16px;
  border-left: 4px solid var(--primary-color);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-normal);
}

.feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h4 {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.feature-card > p {
  font-size: 0.95rem;
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: 12px;
}

.feature-card ul {
  list-style: none;
  padding: 0;
}

.feature-card ul li {
  font-size: 0.85rem;
  color: var(--text-light);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.feature-card ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
}

/* ========================================
   导航按钮
   ======================================== */
.nav-section {
  margin-top: 40px;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.home-btn {
  background: var(--bg-light);
  color: var(--text-medium);
}

.home-btn:hover {
  background: var(--primary-color);
  color: white;
}

.home-btn svg {
  width: 20px;
  height: 20px;
}

.next-btn {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: white;
}

.next-btn:hover {
  box-shadow: 0 4px 12px rgba(30, 90, 168, 0.3);
}

.next-btn svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   页脚
   ======================================== */
.footer {
  background: var(--text-dark);
  padding: 24px;
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.copyright {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.icp-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icp-info a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.icp-info a:hover {
  color: white;
}

.icp-icon {
  width: 12px;
  height: 12px;
}

/* ========================================
   响应式设计 - 平板
   ======================================== */
@media (max-width: 1024px) {
  .main-wrapper {
    padding: 16px;
    gap: 16px;
  }
  
  .card-body {
    padding: 24px;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
  }
  
  .join-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   响应式设计 - 移动端
   ======================================== */
@media (max-width: 768px) {
  .header-content {
    height: 60px;
    padding: 0 16px;
  }
  
  .logo-text h1 {
    font-size: 1.1rem;
  }
  
  .logo-text .subtitle {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .main-wrapper {
    flex-direction: column;
    padding: 0;
    gap: 0;
  }
  
  /* 侧边栏移动端样式 */
  .sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 280px;
    z-index: 95;
    border-radius: 0;
    transform: translateX(-100%);
    overflow-y: auto;
    background: var(--bg-white);
  }
  
  .sidebar.active {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  
  .sidebar-overlay {
    display: none;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  body.menu-open {
    overflow: hidden;
  }
  
  /* 主内容区 */
  .main-content {
    padding: 16px;
  }
  
  .content-card {
    border-radius: var(--radius-md);
  }
  
  .card-header {
    padding: 20px 24px;
  }
  
  .page-title {
    font-size: 1.25rem;
  }
  
  .card-body {
    padding: 20px;
  }
  
  /* 简介区域 */
  .intro-hero {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
  
  .hero-icon {
    width: 64px;
    height: 64px;
  }
  
  .hero-icon svg {
    width: 32px;
    height: 32px;
  }
  
  /* 加入我们 */
  .join-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .join-card {
    padding: 20px;
  }
  
  /* 导航按钮 */
  .nav-buttons {
    flex-direction: column;
  }
  
  .nav-btn {
    justify-content: center;
  }
  
  /* 页脚 */
  .footer {
    padding: 20px 16px;
  }
  
  .icp-info {
    flex-direction: column;
    gap: 8px;
  }
}

/* ========================================
   响应式设计 - 小屏手机
   ======================================== */
@media (max-width: 480px) {
  :root {
    --sidebar-width: 85%;
  }
  
  .logo-section {
    gap: 12px;
  }
  
  .school-icon {
    width: 40px;
    height: 40px;
  }
  
  .school-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .feature-card {
    padding: 16px;
  }
  
  .nav-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-card {
  animation: fadeInUp 0.5s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* ========================================
   打印样式
   ======================================== */
@media print {
  .top-header,
  .sidebar,
  .sidebar-overlay,
  .footer,
  .nav-section {
    display: none !important;
  }
  
  .main-wrapper {
    display: block;
    padding: 0;
  }
  
  .main-content {
    padding: 0;
  }
  
  .content-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
