/* 移动端优先响应式样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
}

body {
  background: #f8fafc;
  color: #1e293b;
  min-height: 100vh;
  padding-bottom: 60px;
  position: relative;
  overflow-x: hidden;
}

/* 背景效果 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 50%, rgba(66, 153, 225, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  z-index: -1;
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.8;
  }
}

/* 导航栏 */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(66, 153, 225, 0.2);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.nav a {
  text-decoration: none;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  transition: all 0.3s ease;
  position: relative;
}

.nav a::before {
  content: '';
  position: absolute;
  top: -5px;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #4299e1, #7c3aed);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav a.active {
  color: #4299e1;
  transform: translateY(-2px);
}

.nav a.active::before {
  transform: scaleX(1);
}

.nav i {
  font-size: 20px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.nav a:hover i {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(66, 153, 225, 0.6));
}

/* 容器 */
.container {
  max-width: 750px;
  margin: 0 auto;
  padding: 15px;
  position: relative;
}

/* 卡片样式 */
.card {
  background: #ffffff;
  border: 1px solid rgba(66, 153, 225, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(66, 153, 225, 0.1), transparent);
  transition: left 0.5s ease;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.4);
}

/* 标题样式 */
h1 {
  font-size: 20px;
  margin: 16px 0;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

h1 i {
  font-size: 24px;
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 英雄区域 */
.hero-section {
  margin-bottom: 30px;
  text-align: center;
}

.hero-content h2 {
  font-size: 20px;
  margin: 8px 0;
  color: #1e293b;
}

.hero-content p {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 16px;
  line-height: 1.5;
}

.hero-image {
  margin: 20px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(66, 153, 225, 0.3);
  border: 1px solid rgba(66, 153, 225, 0.3);
  transition: all 0.3s ease;
}

.hero-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(66, 153, 225, 0.4);
}

h2 {
  font-size: 18px;
  margin: 12px 0;
  color: #1e293b;
  position: relative;
  padding-bottom: 6px;
}

h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #4299e1, #7c3aed);
  border-radius: 2px;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid rgba(66, 153, 225, 0.3);
  border-radius: 10px;
  font-size: 13px;
  color: #1e293b;
  outline: none;
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: #4299e1;
  box-shadow: 0 0 15px rgba(66, 153, 225, 0.3);
  transform: translateY(-1px);
}

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

/* 按钮样式 */
.btn {
  display: inline-block;
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #4299e1, #7c3aed);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, #64748b, #334155);
}

.btn-secondary:hover {
  box-shadow: 0 8px 25px rgba(100, 116, 139, 0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  width: auto;
}

.delete-comment {
  margin-top: 8px;
  align-self: flex-start;
}

/* 活动列表 */
.activity-item {
  margin-bottom: 16px;
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(66, 153, 225, 0.2);
  transition: all 0.3s ease;
}

.activity-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.4);
}

.activity-item .title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #4299e1;
}

.activity-item .time {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  }

.activity-item .time i {
  font-size: 11px;
  color: #7c3aed;
}

.activity-item .desc {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.5;
}

.activity-item .desc img {
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border-radius: 8px;
}

/* 活动卡片 */
.activity-card {
  margin-bottom: 16px;
  padding: 16px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(66, 153, 225, 0.2);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.4);
}

.activity-card .activity-content {
  flex: 1;
  min-width: 0;
}

.activity-card .activity-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #4299e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-card .activity-time {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.activity-card .activity-time i {
  font-size: 11px;
  color: #7c3aed;
}

.activity-card .activity-desc {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-card .activity-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}

.activity-card .activity-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 视频容器 */
.video-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #ffffff;
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid rgba(66, 153, 225, 0.3);
  position: relative;
}

.video-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(66, 153, 225, 0.1), rgba(124, 58, 237, 0.1));
  z-index: 1;
  pointer-events: none;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: relative;
  z-index: 0;
}

/* 视频卡片 */
.video-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(66, 153, 225, 0.2);
  padding: 16px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.4);
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-title {
  font-size: 14px;
  font-weight: 600;
  color: #4299e1;
  margin: 0;
  line-height: 1.4;
}

.video-description {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: #64748b;
  align-items: center;
}

.video-author,
.video-views {
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-button {
  margin-top: 8px;
  align-self: flex-start;
}

/* 留言区 */
.comment-list {
  margin: 20px 0;
}

.comment-item {
  padding: 16px;
  margin-bottom: 12px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(66, 153, 225, 0.2);
  transition: all 0.3s ease;
}

.comment-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.4);
}

.comment-item .username {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  color: #4299e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-item .username::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #4299e1;
  border-radius: 50%;
}

.comment-item .time {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.comment-item .content {
  font-size: 13px;
  line-height: 1.5;
  color: #1e293b;
}

/* 资料列表 */
.material-item {
  padding: 16px;
  margin-bottom: 12px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(66, 153, 225, 0.2);
  transition: all 0.3s ease;
}

.material-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(66, 153, 225, 0.2);
  border-color: rgba(66, 153, 225, 0.4);
}

.material-item .filename {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #4299e1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.material-item .filename i {
  color: #7c3aed;
}

.material-item .info {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.material-item .desc {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.5;
}

/* 状态标签 */
.status-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  transition: all 0.3s ease;
}

.status-tag:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.status-pending {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.status-approved {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.status-rejected {
  background: linear-gradient(135deg, #ef4444, #f87171);
}

/* 验证对话框 */
.verification-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.dialog-content {
  background: #ffffff;
  border: 1px solid rgba(66, 153, 225, 0.3);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.3s ease;
}

.dialog-content h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #1e293b;
  text-align: center;
}

.dialog-content p {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 20px;
  text-align: center;
}

.dialog-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.dialog-buttons button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dialog-buttons button:first-child {
  background: #f1f5f9;
  color: #1e293b;
}

.dialog-buttons button:first-child:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.dialog-buttons button:last-child {
  background: linear-gradient(135deg, #4299e1, #7c3aed);
  color: #fff;
}

.dialog-buttons button:last-child:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* 适配大屏 */
@media (min-width: 768px) {
  .container {
    padding: 24px;
  }
  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 20px;
  }
  .card {
    padding: 20px;
  }
  .activity-item,
  .comment-item,
  .material-item {
    padding: 16px;
  }
  .form-group {
    margin-bottom: 20px;
  }
  input, textarea, select {
    padding: 12px 16px;
    font-size: 14px;
  }
  .btn {
    padding: 14px;
    font-size: 16px;
  }
  .dialog-content {
    padding: 32px;
  }
  .dialog-content h3 {
    font-size: 20px;
  }
  .dialog-buttons button {
    padding: 12px;
    font-size: 16px;
  }
}

/* 移动端优化 - 保持与桌面端一致的布局 */
@media (max-width: 767px) {
  /* 容器和间距 */
  .container {
    padding: 15px;
    max-width: none;
    width: 100%;
  }
  
  /* 字体大小 - 保持与桌面端一致 */
  h1 {
    font-size: 20px;
  }
  h2 {
    font-size: 18px;
  }
  h3 {
    font-size: 16px;
  }
  p {
    font-size: 14px;
    line-height: 1.5;
  }
  
  /* 卡片样式 - 保持与桌面端一致 */
  .card {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  /* 网格布局 - 保持多列显示 */
  .hero-image img {
    height: 200px;
  }
  
  /* 按钮样式 - 保持与桌面端一致 */
  .btn {
    padding: 12px;
    font-size: 14px;
  }
  
  /* 表单元素 - 保持与桌面端一致 */
  input, textarea, select {
    padding: 10px 14px;
    font-size: 13px;
  }
  textarea {
    min-height: 120px;
  }
  
  /* 活动和评论项 - 保持与桌面端一致 */
  .activity-item,
  .comment-item,
  .material-item {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  /* 视频容器 */
  .video-container {
    border-radius: 16px;
  }
  
  /* 视频卡片 - 保持与桌面端一致 */
  .video-card {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  /* 导航栏 */
  .nav a {
    font-size: 12px;
  }
  .nav i {
    font-size: 20px;
  }
  
  /* 对话框 */
  .dialog-content {
    padding: 24px;
    width: 90%;
    max-width: 400px;
  }
  .dialog-content h3 {
    font-size: 18px;
  }
  .dialog-buttons button {
    padding: 10px;
    font-size: 14px;
  }
  
  /* 加入我们部分 */
  .join-section {
    gap: 24px;
  }
  
  /* AI教育问题页面 */
  .question-card {
    padding: 16px !important;
  }
  
  /* 评论区 */
  .comment-item .content {
    font-size: 13px;
    line-height: 1.5;
  }
  
  /* 保持网格布局 - 移除单列限制 */
  [style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 12px !important;
  }
  
  /* 触摸友好 */
  button, a {
    touch-action: manipulation;
  }
  
  /* 防止文本溢出 */
  .video-title,
  .activity-item .title,
  .comment-item .username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  /* 视频信息元数据 */
  .video-meta {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  
  /* 视频按钮区域 */
  .video-card .video-info div[style*="display: flex; gap: 10px;"] {
    flex-direction: row;
    gap: 10px;
  }
  
  /* 评论操作按钮 */
  .comment-item div[style*="display: flex; align-items: center; gap: 12px;"] {
    flex-wrap: nowrap;
    gap: 12px;
  }
  
  /* 确保网格布局在小屏幕上也能正常显示 */
  .question-card {
    min-width: 180px;
  }
  
  /* 首页行动倡议和行动计划网格 */
  .card [style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 12px !important;
  }
  
  /* 加入我们部分 - 保持原有布局 */
  .join-section {
    grid-template-columns: 1fr auto !important;
  }
  
  /* 确保在小屏幕上二维码部分正常显示 */
  .qr-code-section {
    min-width: 160px;
  }
}