/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2563eb;
  --primary-light: #dbeafe;
  --primary-dark: #1d4ed8;
  --secondary-color: #f59e0b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --purple-color: #8b5cf6;
  --purple-light: #ede9fe;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg-primary: #f3f7fc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 顶部导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  height: 60px;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.navbar-menu {
  display: flex;
  gap: 8px;
}

.nav-item {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.nav-item.active {
  background-color: var(--primary-color);
  color: white;
}

.navbar-user {
  cursor: pointer;
}

.user-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
}

.user-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-primary);
}

/* 主内容区域 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px 100px;
  min-height: 100vh;
}

/* 底部导航栏（移动端） */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  padding: 8px 0;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
}

.bottom-nav-item.active {
  color: var(--primary-color);
}

.bottom-nav-icon {
  font-size: 22px;
}

.bottom-nav-text {
  font-size: 12px;
  font-weight: 500;
}

/* 弹窗通用样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-content {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.modal-large {
  max-width: 640px;
}

.modal-small {
  max-width: 360px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-icon {
  font-size: 24px;
  margin-right: 8px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
}

.modal-footer .btn {
  flex: 1;
}

/* 表单样式 */
.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-label .required {
  color: var(--danger-color);
}

.form-tip {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: normal;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  transition: all 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:disabled {
  background-color: var(--bg-primary);
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Toast提示 */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background-color: var(--success-color);
}

.toast.error {
  background-color: var(--danger-color);
}

/* 加载遮罩 */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 2500;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-desc,
.empty-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* 首页样式 */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  border-radius: var(--radius-xl);
  padding: 40px;
  color: white;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 15px;
  opacity: 0.9;
  max-width: 500px;
}

.section-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.section {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-action {
  font-size: 14px;
  color: var(--primary-color);
  cursor: pointer;
  text-decoration: none;
}

.section-action:hover {
  text-decoration: underline;
}

/* 公告样式 */
.announcement-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.announcement-item:hover {
  background-color: var(--primary-light);
}

.announcement-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.announcement-content {
  flex: 1;
  min-width: 0;
}

.announcement-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.announcement-text {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-modal .modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

.modal-announcement-title {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal-announcement-date {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 16px 0;
}

.modal-announcement-text {
  display: block;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.modal-images {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.modal-image {
  width: 100%;
  border-radius: var(--radius-md);
  cursor: pointer;
}

/* 猫咪预览网格 */
.cat-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.cat-preview-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.cat-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cat-preview-image {
  width: 100%;
  height: 140px;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cat-preview-image .cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-placeholder {
  font-size: 48px;
  opacity: 0.3;
}

.cat-preview-info {
  padding: 12px;
}

.cat-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.cat-preview-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.cat-preview-health {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
}

.cat-preview-health.healthy {
  background-color: #d1fae5;
  color: var(--success-color);
}

.cat-preview-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.location-icon {
  width: 14px;
  height: 14px;
}

/* 帖子列表 */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card,
.post-item {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.post-card:hover,
.post-item:hover {
  box-shadow: var(--shadow-md);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-avatar,
.detail-post-avatar,
.author-avatar,
.reply-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.post-avatar img,
.detail-post-avatar-img,
.author-avatar-img,
.reply-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-meta,
.post-header-info,
.author-info {
  flex: 1;
  min-width: 0;
}

.post-author,
.post-creator,
.author-name,
.reply-author {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.post-time,
.discussion-time,
.reply-time {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.post-text {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.post-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.post-images .post-image {
  max-height: 150px;
}

.post-delete-btn {
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.post-delete-btn:hover {
  background-color: #fee2e2;
}

.post-delete-btn img {
  width: 18px;
  height: 18px;
}

/* 猫咪列表页 */
.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.cat-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.cat-card-image {
  width: 100%;
  height: 160px;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.cat-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-card-top-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cat-card-info {
  padding: 14px;
}

.cat-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.cat-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 猫咪详情页 */
.detail-container {
  max-width: 800px;
  margin: 0 auto;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
  cursor: pointer;
}

.detail-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.detail-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.detail-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-avatar-emoji {
  width: 36px;
  height: 36px;
  opacity: 0.5;
}

.detail-name {
  flex: 1;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.detail-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.detail-action-btn:hover {
  background-color: var(--primary-light);
}

.detail-action-btn.delete:hover {
  background-color: #fee2e2;
}

.detail-action-btn img {
  width: 20px;
  height: 20px;
}

.detail-image-wrap {
  padding: 0 24px 24px;
}

.detail-image {
  width: 100%;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.detail-image-placeholder {
  margin: 0 24px 24px;
  padding: 60px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  text-align: center;
}

.placeholder-emoji {
  width: 64px;
  height: 64px;
  opacity: 0.3;
  margin-bottom: 12px;
}

.placeholder-text {
  font-size: 14px;
  color: var(--text-muted);
}

.detail-info-bar {
  padding: 0 24px 20px;
}

.info-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.info-breed {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.info-gender-icon {
  width: 20px;
  height: 20px;
}

.info-neutered {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.info-neutered.neutered-yes {
  background-color: #d1fae5;
  color: var(--success-color);
}

.info-neutered.neutered-no {
  background-color: #fee2e2;
  color: var(--danger-color);
}

.info-health {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.info-health.health-healthy {
  background-color: #d1fae5;
  color: var(--success-color);
}

.info-health.health-good {
  background-color: #dbeafe;
  color: var(--primary-color);
}

.info-health.health-normal {
  background-color: #fef3c7;
  color: var(--warning-color);
}

.info-health.health-treatment {
  background-color: #fee2e2;
  color: var(--danger-color);
}

.info-health.health-unknown {
  background-color: var(--bg-primary);
  color: var(--text-muted);
}

/* 标签页 */
.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
}

.tab-item {
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.tab-item:hover {
  color: var(--text-primary);
}

.tab-item.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  padding: 24px;
}

/* 信息标签页 */
.info-content .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.title-bar {
  width: 4px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 2px;
}

.title-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.edit-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-btn:hover {
  background-color: var(--primary-light);
}

.edit-btn img {
  width: 18px;
  height: 18px;
}

.info-item-text {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.info-label-text {
  width: 120px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.info-value-text {
  flex: 1;
  color: var(--text-primary);
  word-break: break-all;
}

/* 编辑表单 */
.edit-form-item {
  margin-bottom: 16px;
}

.edit-form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.edit-form-input,
.edit-form-picker,
.edit-form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  outline: none;
  transition: all 0.2s;
}

.edit-form-input:focus,
.edit-form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.edit-form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.edit-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.edit-action-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.edit-action-btn.cancel {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.edit-action-btn.save {
  background-color: var(--primary-color);
  color: white;
}

/* 动态和评论标签页 */
.dynamic-content,
.comment-content {
  min-height: 300px;
}

.selected-images-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.selected-image-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.selected-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.selected-image-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

/* 底部发布栏 */
.bottom-publish-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-lg);
  margin-top: 16px;
}

.publish-input-wrapper {
  flex: 1;
}

.publish-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.publish-input:focus {
  border-color: var(--primary-color);
}

.publish-image-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.publish-image-btn:hover {
  background-color: var(--purple-color);
}

.publish-image-icon-img {
  width: 20px;
  height: 20px;
}

.publish-send-btn {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.publish-send-btn:hover {
  background-color: var(--primary-dark);
}

/* 投喂页面 */
.feed-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.feed-stat-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.feed-stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.feed-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.feed-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feed-item {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 16px;
}

.feed-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}

.feed-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feed-content {
  flex: 1;
  min-width: 0;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.feed-cat-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.feed-time {
  font-size: 12px;
  color: var(--text-muted);
}

.feed-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.feed-detail-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-user {
  font-size: 12px;
  color: var(--text-muted);
}

.feed-delete-btn {
  color: var(--danger-color);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.feed-delete-btn:hover {
  background-color: #fee2e2;
}

.fab-button {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s;
  z-index: 100;
}

.fab-button:hover {
  transform: scale(1.1);
}

/* 图片上传区域 */
.image-upload-area {
  width: 100%;
  min-height: 120px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}

.image-upload-area:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.upload-preview-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

.upload-placeholder {
  text-align: center;
  padding: 20px;
}

.upload-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.upload-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* 图片列表 */
.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.image-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.image-item .image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.image-item .delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.add-image-btn {
  width: 80px;
  height: 80px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  gap: 4px;
}

.add-image-btn:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.add-icon {
  font-size: 24px;
}

.add-text {
  font-size: 11px;
  color: var(--text-muted);
}

/* 讨论列表页 */
.discuss-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discuss-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.discuss-card:hover {
  box-shadow: var(--shadow-md);
}

.discuss-top-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.discuss-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.author-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

.author-badge.admin {
  background-color: #fef3c7;
  color: var(--warning-color);
}

.discussion-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.discussion-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.image-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.image-wrap.single-image {
  max-width: 300px;
}

.discussion-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  cursor: pointer;
}

.discussion-actions {
  display: flex;
  gap: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.action-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.action-item:hover {
  color: var(--primary-color);
}

.action-item.active {
  color: var(--primary-color);
}

.action-icon-img {
  width: 20px;
  height: 20px;
}

.action-count {
  font-size: 13px;
  font-weight: 500;
}

/* 讨论详情页 */
.discussion-detail {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.top-btn,
.delete-btn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.top-btn:hover {
  background-color: var(--primary-light);
}

.delete-btn-icon:hover {
  background-color: #fee2e2;
}

.top-icon-img,
.delete-icon-img {
  width: 18px;
  height: 18px;
}

.top-icon-img.top-active {
  transform: rotate(180deg);
}

/* 评论区 */
.reply-section {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.reply-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.reply-item {
  display: flex;
  gap: 12px;
}

.reply-content-wrapper {
  flex: 1;
  min-width: 0;
}

.reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.reply-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

.reply-badge.admin {
  background-color: #fef3c7;
  color: var(--warning-color);
}

.reply-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.reply-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.reply-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.reply-actions {
  margin-top: 4px;
}

.delete-reply-btn {
  font-size: 12px;
  color: var(--danger-color);
  cursor: pointer;
}

.empty-reply {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* 底部评论输入栏 */
.bottom-reply-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 900;
}

.reply-input-wrapper {
  flex: 1;
}

.reply-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.reply-input:focus {
  border-color: var(--primary-color);
}

.reply-image-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.reply-image-btn:hover {
  background-color: var(--purple-color);
}

.reply-add-image-icon {
  width: 20px;
  height: 20px;
}

.reply-send-btn {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.reply-send-btn:hover {
  background-color: var(--primary-dark);
}

/* 个人中心页面 */
.profile-header {
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  border-radius: var(--radius-xl);
  padding: 40px;
  color: white;
  margin-bottom: 24px;
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  font-weight: 600;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-role {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 8px;
}

.profile-student-id {
  font-size: 14px;
  opacity: 0.9;
}

.profile-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.profile-action-btn {
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.profile-menu {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.profile-menu-section {
  padding: 8px 0;
}

.profile-menu-section-title {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.profile-menu-item:hover {
  background-color: var(--bg-primary);
}

.profile-menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.profile-menu-text {
  flex: 1;
  font-size: 15px;
  color: var(--text-primary);
}

.profile-menu-arrow {
  color: var(--text-muted);
  font-size: 18px;
}

/* 编辑头像 */
.edit-avatar-section {
  text-align: center;
  margin-bottom: 24px;
}

.edit-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto;
  cursor: pointer;
  overflow: hidden;
  border: 3px solid var(--primary-light);
}

.edit-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-avatar-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 6px;
  font-size: 11px;
  text-align: center;
}

/* 用户管理页面 */
.search-bar {
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 0 16px;
  box-shadow: var(--shadow-sm);
}

.search-icon {
  font-size: 18px;
  color: var(--text-muted);
}

.search-input {
  flex: 1;
  padding: 12px 0;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
}

.search-clear {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px;
}

.search-result {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.user-info {
  margin-bottom: 16px;
}

.user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.admin-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--purple-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-user-avatar-text {
  font-size: 18px;
}

.user-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.user-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 500;
}

.user-badge.super-admin {
  background-color: #fef3c7;
  color: var(--warning-color);
}

.user-badge.admin {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.user-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.merged-badge {
  background-color: #d1fae5;
  color: var(--success-color);
  padding: 2px 8px;
  border-radius: 8px;
}

.user-password {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
  padding: 8px 12px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-sm);
}

.password-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.password-value {
  color: var(--text-primary);
  font-family: monospace;
}

.user-openid {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
}

.openid-label {
  color: var(--text-secondary);
}

.user-actions {
  display: flex;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.action-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn.add {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.action-btn.add:hover {
  background-color: var(--primary-color);
  color: white;
}

.action-btn.remove {
  background-color: #fef3c7;
  color: var(--warning-color);
}

.action-btn.remove:hover {
  background-color: var(--warning-color);
  color: white;
}

.action-btn.delete {
  background-color: #fee2e2;
  color: var(--danger-color);
}

.action-btn.delete:hover {
  background-color: var(--danger-color);
  color: white;
}

.super-admin-actions {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.super-admin-tip {
  font-size: 13px;
  color: var(--text-muted);
}

.permission-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background-color: #fef3c7;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.tip-icon {
  font-size: 24px;
}

.tip-text {
  font-size: 14px;
  color: #92400e;
}

/* 公告管理页面 */
.form-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.form-actions {
  margin-top: 24px;
}

.save-btn {
  width: 100%;
  padding: 14px;
  background-color: #fee2e2;
  color: var(--danger-color);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.save-btn:hover:not(:disabled) {
  background-color: var(--danger-color);
  color: white;
}

.save-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.save-btn.saving {
  opacity: 0.8;
}

.tip {
  margin-top: 16px;
  text-align: center;
}

.tip-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* 公告列表页 */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.announcement-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.announcement-card:hover {
  box-shadow: var(--shadow-md);
}

.announcement-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.announcement-card-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announcement-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* 课表查询页面 */
.schedule-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.schedule-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.schedule-stat {
  text-align: center;
  padding: 16px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
}

.schedule-stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.schedule-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.schedule-table th,
.schedule-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.schedule-table th {
  background-color: var(--bg-primary);
  font-weight: 600;
  color: var(--text-primary);
}

.schedule-table tr:hover {
  background-color: var(--bg-primary);
}

/* 物流查询页面 */
.logistics-container {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.logistics-query-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.logistics-query-bar .form-group {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

.logistics-result {
  margin-top: 24px;
}

.logistics-timeline {
  position: relative;
  padding-left: 30px;
}

.logistics-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.logistics-item {
  position: relative;
  padding-bottom: 24px;
}

.logistics-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.logistics-item:first-child::before {
  background-color: var(--success-color);
  box-shadow: 0 0 0 2px var(--success-color);
}

.logistics-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.logistics-content {
  font-size: 14px;
  color: var(--text-primary);
}

/* 图片预览弹窗 */
.image-preview-modal {
  background-color: rgba(0, 0, 0, 0.9);
  padding: 0;
}

.image-preview-content {
  max-width: 90vw;
  max-height: 90vh;
}

.image-preview-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .navbar-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    padding: 16px;
    box-shadow: var(--shadow-md);
    gap: 8px;
  }

  .bottom-nav {
    display: flex;
  }

  .main-content {
    padding: 70px 16px 90px;
  }

  .hero-section {
    padding: 24px;
  }

  .hero-title {
    font-size: 24px;
  }

  .cat-preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .detail-header {
    padding: 16px;
  }

  .detail-image-wrap {
    padding: 0 16px 16px;
  }

  .detail-info-bar {
    padding: 0 16px 16px;
  }

  .detail-tabs {
    padding: 0 16px;
  }

  .tab-content {
    padding: 16px;
  }

  .info-label-text {
    width: 90px;
  }

  .fab-button {
    bottom: 100px;
    right: 20px;
    width: 52px;
    height: 52px;
    font-size: 26px;
    z-index: 9999;
  }

  .profile-header {
    padding: 24px;
  }

  .discussion-detail,
  .reply-section {
    padding: 16px;
  }

  .bottom-reply-bar {
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .cat-preview-grid {
    grid-template-columns: 1fr;
  }

  .cats-grid {
    grid-template-columns: 1fr;
  }

  .feed-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== 课表查询页面样式 ========== */
.schedule-page {
  padding: 16px;
  max-width: 900px;
  margin: 0 auto;
}

/* 顶部信息栏 */
.schedule-header {
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.schedule-school-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.schedule-class-info {
  font-size: 13px;
  opacity: 0.9;
}

.schedule-header-week {
  text-align: right;
}

.schedule-week-number {
  font-size: 24px;
  font-weight: 700;
}

.schedule-current-time {
  font-size: 13px;
  opacity: 0.9;
}

/* 登录状态栏 */
.schedule-login-bar {
  background: white;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-login-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.schedule-login-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.schedule-login-badge.cloud {
  background: #DBEAFE;
  color: #2563EB;
}

.schedule-login-badge.local {
  background: #FEF3C7;
  color: #D97706;
}

.schedule-login-user {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.schedule-login-desc {
  font-size: 13px;
  color: #6B7280;
  flex: 1;
}

.schedule-login-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.schedule-switch-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #6B7280;
  cursor: pointer;
}

.schedule-switch {
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.schedule-action-btn {
  padding: 4px 10px;
  border: none;
  background: #F3F4F6;
  color: #374151;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.schedule-action-btn:hover {
  background: #E5E7EB;
}

.schedule-action-btn.logout {
  color: #EF4444;
}

.schedule-login-btn {
  padding: 6px 16px;
  border: none;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-left: auto;
}

/* 登录表单 */
.schedule-login-form {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-form-title {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 16px;
  text-align: center;
}

.schedule-form-item {
  margin-bottom: 12px;
}

.schedule-form-label {
  display: block;
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
  font-weight: 500;
}

.schedule-form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.schedule-form-input:focus {
  outline: none;
  border-color: #3B82F6;
}

.schedule-form-tip {
  font-size: 12px;
  color: #9CA3AF;
  text-align: center;
  margin-bottom: 16px;
}

.schedule-form-actions {
  display: flex;
  gap: 12px;
}

.schedule-form-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.schedule-form-btn.cancel {
  background: #F3F4F6;
  color: #374151;
}

.schedule-form-btn.submit {
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
}

/* 未登录提示 */
.schedule-login-prompt {
  background: white;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-prompt-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.schedule-prompt-title {
  font-size: 18px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 8px;
}

.schedule-prompt-desc {
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 20px;
}

.schedule-prompt-btn {
  padding: 10px 32px;
  border: none;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* 下一节课提醒 */
.schedule-next-course {
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border-left: 4px solid #F59E0B;
}

.next-course-label {
  font-size: 12px;
  color: #92400E;
  font-weight: 500;
  margin-bottom: 4px;
}

.next-course-name {
  font-size: 18px;
  font-weight: 700;
  color: #78350F;
  margin-bottom: 8px;
}

.next-course-info {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.next-info-item {
  font-size: 13px;
  color: #92400E;
}

.next-info-item.countdown {
  font-weight: 600;
  color: #DC2626;
}

/* 视图切换 */
.schedule-view-switch {
  display: flex;
  background: white;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-switch-item {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 14px;
  color: #6B7280;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.schedule-switch-item.active {
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: white;
}

/* 今日课程视图 */
.schedule-today-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.schedule-today-title {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
}

.schedule-today-count {
  font-size: 13px;
  color: #6B7280;
}

.schedule-empty {
  background: white;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 16px;
}

.schedule-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.schedule-empty-text {
  font-size: 14px;
  color: #6B7280;
}

.schedule-course-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.schedule-course-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-course-time {
  min-width: 80px;
  text-align: center;
}

.schedule-section-badge {
  background: #EFF6FF;
  color: #2563EB;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 4px;
}

.schedule-time-range {
  font-size: 12px;
  color: #6B7280;
}

.schedule-course-content {
  flex: 1;
  border-left: 3px solid #3B82F6;
  padding-left: 12px;
}

.schedule-course-name {
  font-size: 15px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 4px;
}

.schedule-course-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
}

.schedule-meta-item {
  font-size: 12px;
  color: #6B7280;
}

.schedule-course-weeks {
  font-size: 11px;
  color: #9CA3AF;
}

/* 本周课表视图 */
.schedule-week-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  background: white;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-week-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #F3F4F6;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-week-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 13px;
  background: white;
}

.schedule-back-btn {
  padding: 6px 12px;
  border: none;
  background: #DBEAFE;
  color: #2563EB;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.schedule-table-wrapper {
  overflow-x: auto;
  margin-bottom: 16px;
  background: white;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-table {
  min-width: 700px;
}

.schedule-table-header {
  display: flex;
  border-bottom: 2px solid #E5E7EB;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.schedule-table-row {
  display: flex;
  margin-bottom: 4px;
  min-height: 60px;
}

.schedule-time-col {
  width: 70px;
  min-width: 70px;
  text-align: center;
  padding: 4px;
}

.schedule-section-num {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}

.schedule-section-time {
  font-size: 10px;
  color: #9CA3AF;
}

.schedule-day-col {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  padding: 4px;
  position: relative;
}

.schedule-course-cell {
  border-radius: 6px;
  padding: 4px;
  color: white;
  font-size: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.schedule-course-cell:hover {
  transform: scale(1.02);
}

.schedule-cell-name {
  font-weight: 600;
  margin-bottom: 2px;
  font-size: 11px;
}

.schedule-cell-teacher,
.schedule-cell-location {
  font-size: 9px;
  opacity: 0.9;
}

/* 日期查询视图 */
.schedule-date-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  background: white;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-date-label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.schedule-date-picker {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 14px;
}

.schedule-date-course-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.schedule-date-course-title {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
}

.schedule-date-course-count {
  font-size: 13px;
  color: #6B7280;
}

/* 全部课表视图 */
.schedule-all-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.schedule-all-title {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
}

.schedule-all-count {
  font-size: 13px;
  color: #6B7280;
}

.schedule-all-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.schedule-all-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-all-color {
  width: 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.schedule-all-info {
  flex: 1;
}

.schedule-all-name {
  font-size: 15px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 4px;
}

.schedule-all-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}

.schedule-all-meta-item {
  font-size: 12px;
  color: #6B7280;
}

.schedule-all-detail {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.schedule-detail-tag {
  background: #F3F4F6;
  color: #6B7280;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.schedule-detail-tag.weeks {
  background: #DBEAFE;
  color: #2563EB;
}

/* 推送设置 */
.schedule-push-section {
  margin-top: 24px;
}

.schedule-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 12px;
}

.schedule-push-card,
.schedule-showdoc-card,
.schedule-semester-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.schedule-push-row,
.schedule-showdoc-row,
.schedule-semester-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.schedule-push-label,
.schedule-showdoc-label,
.schedule-semester-label {
  flex: 1;
}

.schedule-push-name,
.schedule-showdoc-name,
.schedule-semester-name {
  font-size: 14px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 2px;
}

.schedule-push-desc,
.schedule-showdoc-tip,
.schedule-semester-desc {
  font-size: 12px;
  color: #6B7280;
}

.schedule-before-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #F3F4F6;
  margin-bottom: 12px;
}

.schedule-before-label {
  font-size: 13px;
  color: #374151;
}

.schedule-before-picker {
  padding: 6px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 13px;
  background: white;
}

.schedule-push-schedule {
  background: #F9FAFB;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.schedule-schedule-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
}

.schedule-schedule-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
  color: #6B7280;
}

.schedule-test-btn {
  width: 100%;
  padding: 10px;
  border: none;
  background: linear-gradient(135deg, #F59E0B, #EF4444);
  color: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* ShowDoc设置 */
.schedule-showdoc-title {
  font-size: 15px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 4px;
}

.schedule-showdoc-desc {
  font-size: 12px;
  color: #6B7280;
  margin-bottom: 16px;
}

.schedule-url-setting {
  border-top: 1px solid #F3F4F6;
  padding-top: 16px;
}

.schedule-url-label {
  font-size: 13px;
  color: #374151;
  margin-bottom: 8px;
  font-weight: 500;
}

.schedule-url-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 13px;
  box-sizing: border-box;
  margin-bottom: 12px;
}

.schedule-url-actions {
  display: flex;
  gap: 12px;
}

.schedule-url-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.schedule-url-btn.save {
  background: #DBEAFE;
  color: #2563EB;
}

.schedule-url-btn.test {
  background: #D1FAE5;
  color: #059669;
}

.schedule-showdoc-help {
  margin-top: 12px;
  font-size: 11px;
  color: #9CA3AF;
  line-height: 1.5;
}

/* 学期设置 */
.schedule-semester-title {
  font-size: 15px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 16px;
}

.schedule-semester-date {
  padding: 8px 12px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  font-size: 13px;
}

.schedule-semester-info {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid #F3F4F6;
  font-size: 13px;
  color: #2563EB;
  font-weight: 500;
}

/* 底部 */
.schedule-footer {
  text-align: center;
  padding: 24px 0;
}

.schedule-footer-text {
  font-size: 12px;
  color: #9CA3AF;
}

/* 响应式 */
@media (max-width: 600px) {
  .schedule-page {
    padding: 12px;
  }
  
  .schedule-header {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .schedule-header-week {
    text-align: center;
  }
  
  .schedule-login-info {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .schedule-login-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
  
  .next-course-info {
    flex-direction: column;
    gap: 4px;
  }
  
  .schedule-course-card {
    flex-direction: column;
  }
  
  .schedule-course-time {
    display: flex;
    gap: 8px;
    align-items: center;
  }
  
  .schedule-push-row,
  .schedule-showdoc-row,
  .schedule-semester-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
