/* 糖心校园生活与学生社区 - 主样式表 */
:root {
  --primary: #2196F3;
  --secondary: #BBDEFB;
  --bg: #F5F9FF;
  --card: #FFFFFF;
  --accent: #FF5722;
  --text: #37474F;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(33, 150, 243, 0.1);
  --font-title: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

/* 容器 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部导航 */
.site-header {
  background: var(--card);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo svg {
  width: 32px;
  height: 32px;
}

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

.main-nav a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--secondary);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* 首屏英雄区 */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #1976D2 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  transform: rotate(-15deg);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
}

.hero-content h1 {
  color: #fff;
  font-size: 2.8rem;
  margin-bottom: 16px;
  animation: fadeInDown 0.8s ease;
}

.hero-content .subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 32px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-search {
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-search form {
  display: flex;
  background: var(--card);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.hero-search input {
  flex: 1;
  padding: 16px 24px;
  border: none;
  font-size: 1rem;
  outline: none;
  color: var(--text);
}

.hero-search button {
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.hero-search button:hover {
  background: #E64A19;
}

/* 栏目区块 */
.section {
  padding: 60px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-header h2 {
  position: relative;
  padding-left: 16px;
}

.section-header h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-header .more-link {
  font-size: 0.9rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(33, 150, 243, 0.15);
}

.card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
  font-weight: 600;
}

.card-desc {
  font-size: 0.9rem;
  color: #607D8B;
  margin-bottom: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #90A4AE;
}

.card-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* 课程表组件 */
.timetable {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.timetable th {
  background: var(--primary);
  color: #fff;
  padding: 12px 8px;
  text-align: center;
  font-weight: 500;
}

.timetable td {
  padding: 10px 8px;
  text-align: center;
  border: 1px solid #E3F2FD;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timetable td:hover {
  background: var(--secondary);
  transform: scale(1.02);
}

.timetable td.active {
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
}

/* 社团卡片 */
.club-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.club-card:hover {
  transform: translateX(4px);
}

.club-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.club-info h4 {
  margin-bottom: 4px;
}

.club-info p {
  font-size: 0.85rem;
  color: #90A4AE;
}

.club-status {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.club-status.recruiting {
  background: #E8F5E9;
  color: #4CAF50;
}

.club-status.full {
  background: #FFF3E0;
  color: #FF9800;
}

/* 活动日历 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.calendar-day:hover {
  background: var(--secondary);
}

.calendar-day.has-event {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.calendar-day.today {
  border: 2px solid var(--accent);
}

/* 二手交易卡片 */
.trade-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.trade-image {
  width: 80px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.trade-info {
  flex: 1;
}

.trade-price {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
}

.trade-condition {
  display: inline-block;
  padding: 2px 8px;
  background: #E8F5E9;
  color: #4CAF50;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* 倒计时组件 */
.countdown-box {
  background: linear-gradient(135deg, var(--primary), #1565C0);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.countdown-numbers {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
}

.countdown-digit {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  animation: flipIn 0.6s ease;
}

/* APP下载区 */
.app-section {
  background: linear-gradient(135deg, #1976D2, #0D47A1);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}

.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.app-feature-item {
  padding: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
}

.app-feature-item .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.download-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--card);
  color: var(--text);
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: var(--primary);
}

/* 页脚 */
.site-footer {
  background: #263238;
  color: #B0BEC5;
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-col a {
  display: block;
  color: #B0BEC5;
  padding: 4px 0;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--secondary);
}

.footer-bottom {
  border-top: 1px solid #37474F;
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: #B0BEC5;
  margin: 0 8px;
}

/* 面包屑 */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #90A4AE;
}

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

.breadcrumb .separator {
  margin: 0 8px;
  color: #CFD8DC;
}

/* 页面标题区 */
.page-hero {
  background: linear-gradient(135deg, var(--primary), #1976D2);
  padding: 48px 0;
  color: #fff;
  text-align: center;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 12px;
}

.page-hero p {
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  padding: 20px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: var(--bg);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 24px 20px;
  max-height: 500px;
}

/* 标签 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 4px 14px;
  background: var(--secondary);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tag:hover {
  background: var(--primary);
  color: #fff;
}

/* 搜索页 */
.search-box {
  max-width: 700px;
  margin: 32px auto;
}

.search-box form {
  display: flex;
  border: 2px solid var(--primary);
  border-radius: 50px;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  padding: 14px 24px;
  border: none;
  outline: none;
  font-size: 1rem;
}

.search-box button {
  padding: 14px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.search-results {
  max-width: 800px;
  margin: 0 auto;
}

.search-result-item {
  padding: 20px 0;
  border-bottom: 1px solid #E3F2FD;
}

.search-result-item h3 a {
  color: var(--text);
}

.search-result-item h3 a:hover {
  color: var(--primary);
}

.search-result-item p {
  font-size: 0.9rem;
  color: #607D8B;
  margin-top: 4px;
}

/* 合规页面 */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.legal-content h2 {
  margin-top: 32px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--secondary);
}

.legal-content p {
  margin-bottom: 16px;
  line-height: 1.8;
}

.legal-content ul {
  margin: 16px 0;
  padding-left: 24px;
  list-style: disc;
}

.legal-content li {
  margin-bottom: 8px;
}

/* 404页面 */
.error-page {
  text-align: center;
  padding: 100px 20px;
}

.error-code {
  font-size: 8rem;
  font-weight: 900;
  color: var(--secondary);
  line-height: 1;
}

.error-page h2 {
  margin: 16px 0;
}

.error-page p {
  color: #90A4AE;
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #1976D2;
  color: #fff;
  transform: translateY(-2px);
}

/* 动画 */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes flipIn {
  from { opacity: 0; transform: rotateX(-90deg); }
  to { opacity: 1; transform: rotateX(0); }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

.animate-bounce-in {
  animation: bounceIn 0.6s ease;
}

/* 响应式 */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  
  .hero-content h1 { font-size: 2rem; }
  .hero-section { padding: 60px 0 40px; }
  
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow);
  }
  
  .main-nav.active {
    display: flex;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .app-features {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .download-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-search form {
    flex-direction: column;
    border-radius: var(--radius);
  }
  
  .hero-search button {
    border-radius: 0 0 var(--radius) var(--radius);
  }
  
  .countdown-digit {
    font-size: 1.5rem;
    padding: 8px 12px;
  }
  
  .section { padding: 40px 0; }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .app-features {
    grid-template-columns: 1fr;
  }
}

/* 兼职信息 */
.job-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.job-item:hover {
  transform: translateX(4px);
}

.job-info h4 {
  margin-bottom: 4px;
}

.job-info p {
  font-size: 0.85rem;
  color: #90A4AE;
}

.job-salary {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}

/* 资源列表 */
.resource-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.resource-icon {
  width: 48px;
  height: 48px;
  background: var(--secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.resource-info {
  flex: 1;
}

.resource-stats {
  display: flex;
  gap: 12px;
  font-size: 0.8rem;
  color: #90A4AE;
  margin-top: 4px;
}

/* 通知横幅 */
.notice-bar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.85rem;
}

.notice-bar a {
  color: #fff;
  text-decoration: underline;
}

/* 内容区域 */
.content-area {
  padding: 40px 0;
  min-height: 60vh;
}

/* 联系表单 */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #E3F2FD;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* 列表页筛选 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 6px 16px;
  background: var(--card);
  border: 1px solid #E3F2FD;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 评分星星 */
.rating {
  color: #FFC107;
  font-size: 0.9rem;
}

/* 进度条 */
.progress-bar {
  height: 6px;
  background: #E3F2FD;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.5s ease;
}
