/* ========== 字体定义 ========== */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&display=swap');

/* ========== 基础样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --accent: #ec4899;
  --accent-hover: #db2777;
  --text: #0f172a;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
  --radius: clamp(10px, 1.5vw, 12px);
  --radius-sm: clamp(6px, 1vw, 8px);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

body {
  font-family: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(14px, 1.5vw, 16px);
}

.container {
  max-width: 90%;
  margin: 0 auto;
  padding: 0 2%;
}

/* ========== 网站标题区域 ========== */
.hero-section {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/14.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  z-index: 0;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: clamp(16px, 3vh, 24px);
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
  letter-spacing: -0.02em;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

/* ========== 搜索框样式 ========== */
.search-section {
  margin: clamp(30px, 5vh, 50px) 0;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: clamp(12px, 2vh, 16px) clamp(16px, 3vw, 20px);
  padding-right: 50px;
  font-size: clamp(14px, 1.5vw, 16px);
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-light);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.clear-search:hover {
  background: var(--text);
}

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

/* ========== 导航 ========== */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: clamp(60px, 8vh, 80px);
}

.nav-logo {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: transform 0.2s;
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 16px);
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  font-weight: 500;
  padding: clamp(6px, 1vh, 8px) clamp(12px, 2vw, 16px);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
  background: var(--bg-secondary);
}

/* 通知链接 */
.nav-link-notifications {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--bg);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* 下拉菜单 */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle::after {
  content: ' ▼';
  font-size: 0.7em;
  margin-left: 4px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  display: none;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: clamp(8px, 1.5vh, 12px) clamp(16px, 2.5vw, 20px);
  color: var(--text);
  text-decoration: none;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  transition: all 0.2s;
  border-bottom: 1px solid var(--border);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--primary);
}

/* 联系作者弹窗 */
.modal-small {
  max-width: min(400px, 90%);
}

.modal-body {
  padding: clamp(24px, 4vw, 32px);
  text-align: center;
}

.contact-email {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-secondary);
  padding: clamp(16px, 3vh, 20px);
  border-radius: var(--radius);
  margin-bottom: clamp(20px, 3vh, 24px);
  word-break: break-all;
}

/* 认证表单 */
.auth-form {
  text-align: left;
}

.auth-form .form-group {
  margin-bottom: clamp(16px, 2.5vh, 20px);
}

.auth-form label {
  display: block;
  font-weight: 600;
  margin-bottom: clamp(6px, 1vh, 8px);
  color: var(--text);
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.auth-form input {
  width: 100%;
  padding: clamp(10px, 1.5vh, 12px) clamp(14px, 2vw, 16px);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-family: inherit;
  transition: all 0.3s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-block {
  width: 100%;
  margin-top: clamp(8px, 1.5vh, 12px);
}

.auth-switch {
  text-align: center;
  margin-top: clamp(16px, 2.5vh, 20px);
  font-size: clamp(0.85rem, 1.5vw, 0.9rem);
  color: var(--text-light);
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.auth-switch a:hover {
  color: var(--primary-hover);
}

/* ========== 文章列表 ========== */
.articles {
  padding: clamp(40px, 8vh, 80px) 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
}

.section-divider {
  width: 100%;
  height: clamp(3px, 0.5vh, 4px);
  background: var(--gradient-primary);
  border-radius: 2px;
  margin-bottom: clamp(32px, 5vh, 48px);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
  gap: clamp(24px, 4vw, 40px);
  max-width: 95%;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.article-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

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

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.article-card-image {
  width: 100%;
  height: clamp(180px, 25vw, 220px);
  object-fit: cover;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-image {
  transform: scale(1.05);
}

.article-card-body {
  padding: clamp(16px, 3vw, 24px);
}

.article-card-title {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  margin-bottom: clamp(8px, 1.5vh, 12px);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  color: var(--text);
}

.article-card-meta {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 12px);
  font-weight: 500;
}

.article-card-pin {
  background: var(--gradient-accent);
  color: #fff;
  font-size: clamp(0.7rem, 1.2vw, 0.75rem);
  padding: clamp(3px, 0.5vh, 4px) clamp(10px, 1.5vw, 12px);
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(236, 72, 153, 0.3);
}

/* ========== 文章详情 ========== */
.article-detail {
  padding: clamp(40px, 8vh, 80px) 0;
  max-width: 90%;
  margin: 0 auto;
}

.article-detail h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: clamp(16px, 3vh, 24px);
  line-height: 1.3;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-detail-meta {
  color: var(--text-light);
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  margin-bottom: clamp(24px, 4vh, 40px);
  padding-bottom: clamp(20px, 3vh, 32px);
  border-bottom: 2px solid var(--border);
  font-weight: 500;
}

.article-detail-cover {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: clamp(32px, 5vh, 48px);
  box-shadow: var(--shadow-md);
}

.article-detail-content {
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.9;
  color: var(--text);
}

.article-detail-content p {
  margin-bottom: 1.8em;
}

.article-detail-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: clamp(20px, 4vh, 32px) 0;
  box-shadow: var(--shadow-md);
}

/* ========== 评论区 ========== */
.comments-section {
  max-width: 90%;
  margin: 0 auto;
  padding: clamp(40px, 6vh, 60px) 0 clamp(60px, 10vh, 100px);
  border-top: 2px solid var(--border);
}

.comments-title {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  margin-bottom: clamp(20px, 3vh, 32px);
  color: var(--text);
}

.comment-form {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--radius);
  margin-bottom: clamp(24px, 4vh, 40px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.reply-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(99, 102, 241, 0.1);
  padding: clamp(8px, 1.5vh, 12px) clamp(12px, 2vw, 16px);
  border-radius: var(--radius-sm);
  margin-bottom: clamp(12px, 2vh, 16px);
  border-left: 3px solid var(--primary);
}

.reply-indicator span {
  color: var(--primary);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.btn-cancel-reply {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: clamp(1rem, 2vw, 1.2rem);
  cursor: pointer;
  padding: 0;
  width: clamp(24px, 4vw, 28px);
  height: clamp(24px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.btn-cancel-reply:hover {
  background: var(--bg-secondary);
  color: var(--text);
}

.form-group {
  margin-bottom: clamp(16px, 2.5vh, 20px);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: clamp(10px, 1.5vh, 14px) clamp(14px, 2vw, 18px);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.3s;
  background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-hint {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: var(--text-light);
  margin-top: clamp(8px, 1.5vh, 12px);
  font-weight: 500;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vh, 20px);
}

.comment-item {
  padding: clamp(16px, 3vw, 24px);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.comment-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(12px, 2vh, 16px);
}

.comment-author {
  font-weight: 700;
  color: var(--primary);
}

.comment-date {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: var(--text-light);
  font-weight: 500;
}

.comment-content {
  line-height: 1.8;
  color: var(--text);
  margin-bottom: clamp(12px, 2vh, 16px);
}

.comment-actions {
  display: flex;
  gap: clamp(8px, 1.5vw, 12px);
}

.btn-reply {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: clamp(4px, 0.8vh, 6px) clamp(12px, 2vw, 16px);
  border-radius: var(--radius-sm);
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

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

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.5vh, 12px) clamp(20px, 3vw, 24px);
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 102, 234, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(102, 102, 234, 0.4);
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background: var(--text-light);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
  transform: translateY(-2px);
}

.btn-sm {
  padding: clamp(6px, 1vh, 8px) clamp(12px, 2vw, 16px);
  font-size: clamp(0.7rem, 1.2vw, 0.8rem);
}

/* ========== 后台管理 ========== */
.admin-login {
  max-width: min(450px, 90%);
  margin: clamp(80px, 15vh, 120px) auto;
  text-align: center;
}

.admin-login h2 {
  margin-bottom: clamp(20px, 4vh, 32px);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-form {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.error {
  color: #f5576c;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  margin-top: clamp(12px, 2vh, 16px);
  font-weight: 600;
  padding: clamp(10px, 1.5vh, 12px);
  background: rgba(245, 87, 108, 0.1);
  border-radius: var(--radius-sm);
}

.admin-panel {
  padding: clamp(40px, 6vh, 60px) 0;
}

.admin-nav {
  display: flex;
  gap: clamp(8px, 1.5vw, 12px);
  margin-bottom: clamp(24px, 4vh, 40px);
  padding-bottom: clamp(16px, 3vh, 24px);
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

.admin-tab {
  padding: clamp(10px, 1.5vh, 12px) clamp(20px, 3vw, 24px);
  background: transparent;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  font-weight: 600;
  transition: all 0.3s;
  font-family: 'JetBrains Mono', monospace;
}

.admin-tab:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.admin-tab.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 102, 234, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(16px, 3vh, 24px);
}

.panel-header h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
}

/* 文章列表（后台） */
.article-list {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 16px);
}

.article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.5vh, 20px) clamp(20px, 3vw, 24px);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius);
  gap: clamp(16px, 2.5vw, 20px);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.article-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.article-item-info {
  flex: 1;
  min-width: 0;
}

.article-item-title {
  font-weight: 700;
  margin-bottom: clamp(6px, 1vh, 8px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
}

.article-item-meta {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: var(--text-light);
  font-weight: 500;
}

.article-item-actions {
  display: flex;
  gap: clamp(8px, 1.5vw, 10px);
  flex-shrink: 0;
}

/* 评论列表（后台） */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 16px);
}

.comment-item-admin {
  padding: clamp(16px, 3vw, 24px);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.comment-item-admin:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.comment-item-admin .comment-article {
  font-size: clamp(0.7rem, 1.3vw, 0.8rem);
  color: var(--primary);
  margin-bottom: clamp(8px, 1.5vh, 12px);
  font-weight: 700;
  padding: clamp(4px, 0.8vh, 6px) clamp(10px, 1.5vw, 12px);
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  display: inline-block;
}

.comment-actions {
  display: flex;
  gap: clamp(8px, 1.5vw, 10px);
  margin-top: clamp(12px, 2vh, 16px);
}

/* 上传 */
.upload-form {
  max-width: 90%;
}

.upload-area {
  border: 3px dashed var(--border);
  border-radius: var(--radius);
  padding: clamp(40px, 8vh, 80px) clamp(20px, 4vw, 32px);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: clamp(16px, 3vh, 24px);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  transform: scale(1.02);
}

.upload-preview {
  margin-bottom: clamp(16px, 3vh, 24px);
}

.upload-preview img {
  max-width: 100%;
  max-height: clamp(300px, 50vh, 400px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.uploaded-images {
  margin-top: clamp(40px, 6vh, 60px);
}

.uploaded-images h4 {
  margin-bottom: clamp(16px, 3vh, 24px);
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-weight: 700;
  color: var(--text);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: clamp(16px, 2.5vw, 20px);
}

.image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all 0.3s;
}

.image-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-item-actions {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1vh, 8px);
  opacity: 0;
  transition: opacity 0.3s;
  padding: clamp(8px, 1.5vw, 12px);
}

.image-item:hover .image-item-actions {
  opacity: 1;
}

.image-copy-btn,
.image-delete-btn {
  padding: clamp(6px, 1vh, 8px) clamp(12px, 2vw, 16px);
  border: none;
  border-radius: var(--radius-sm);
  font-size: clamp(0.7rem, 1.2vw, 0.75rem);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
}

.image-copy-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
}

.image-copy-btn:hover {
  background: #fff;
  transform: translateY(-2px);
}

.image-delete-btn {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.image-delete-btn:hover {
  background: rgb(220, 38, 38);
  transform: translateY(-2px);
}

/* 用户列表（后台） */
.user-list {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 16px);
}

.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.5vh, 20px) clamp(20px, 3vw, 24px);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius);
  gap: clamp(16px, 2.5vw, 20px);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.user-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.user-item-info {
  flex: 1;
  min-width: 0;
}

.user-item-name {
  font-weight: 700;
  margin-bottom: clamp(6px, 1vh, 8px);
  color: var(--text);
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 12px);
}

.user-item-meta {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: var(--text-light);
  font-weight: 500;
}

.user-item-actions {
  display: flex;
  gap: clamp(8px, 1.5vw, 10px);
  flex-shrink: 0;
}

.user-banned-badge {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
  font-size: clamp(0.7rem, 1.2vw, 0.75rem);
  padding: clamp(3px, 0.5vh, 4px) clamp(10px, 1.5vw, 12px);
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

/* ========== 通知列表 ========== */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 16px);
}

.notification-item {
  padding: clamp(16px, 3vw, 20px);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.notification-item.unread {
  background: rgba(99, 102, 241, 0.05);
  border-color: var(--primary-light);
}

.notification-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(8px, 1.5vh, 12px);
}

.notification-author {
  font-weight: 700;
  color: var(--primary);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.notification-time {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  color: var(--text-light);
}

.notification-article {
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  color: var(--text-light);
  margin-bottom: clamp(8px, 1.5vh, 12px);
}

.notification-content {
  background: var(--bg);
  padding: clamp(12px, 2vh, 16px);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  margin-bottom: clamp(12px, 2vh, 16px);
  line-height: 1.6;
}

.notification-actions {
  display: flex;
  gap: clamp(8px, 1.5vw, 12px);
}

.notification-original {
  font-size: clamp(0.8rem, 1.5vw, 0.85rem);
  color: var(--text-light);
  padding: clamp(8px, 1.5vh, 10px);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-top: clamp(8px, 1.5vh, 12px);
  font-style: italic;
}

/* ========== 弹窗 ========== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: clamp(16px, 2.5vw, 20px);
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  background: var(--bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: min(800px, 95%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(20px, 3vh, 24px) clamp(24px, 4vw, 32px);
  border-bottom: 2px solid var(--border);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.modal-header h3 {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  background: none;
  border: none;
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  transition: all 0.3s;
  width: clamp(32px, 5vw, 36px);
  height: clamp(32px, 5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg-secondary);
  transform: rotate(90deg);
}

#article-form {
  padding: clamp(20px, 4vw, 32px);
}

#article-form label {
  display: block;
  font-weight: 700;
  margin-bottom: clamp(8px, 1.5vh, 10px);
  color: var(--text);
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

#article-form textarea {
  resize: vertical;
  min-height: clamp(250px, 40vh, 350px);
}

.form-actions {
  display: flex;
  gap: clamp(12px, 2vw, 16px);
  justify-content: flex-end;
  margin-top: clamp(20px, 4vh, 32px);
  padding-top: clamp(16px, 3vh, 24px);
  border-top: 2px solid var(--border);
}

/* ========== 通用 ========== */
.loading {
  text-align: center;
  padding: clamp(40px, 6vh, 60px);
  color: var(--text-light);
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: 600;
}

.loading::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%, 100% {
    content: '...';
  }
}

.empty {
  text-align: center;
  padding: clamp(40px, 8vh, 80px) clamp(16px, 2.5vw, 20px);
  color: var(--text-light);
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: 600;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  border-radius: var(--radius);
  margin: clamp(24px, 4vh, 40px) 0;
}

/* ========== Footer ========== */
.footer {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: clamp(40px, 6vh, 60px) 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  font-weight: 500;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.footer p {
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-card-image {
    height: clamp(200px, 30vw, 250px);
  }

  .article-grid {
    grid-template-columns: 1fr;
    gap: clamp(20px, 3vh, 24px);
    padding: clamp(16px, 2.5vw, 20px);
  }

  .article-detail h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  .article-detail-content {
    font-size: clamp(0.95rem, 2vw, 1rem);
  }

  .article-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-item-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .nav .container {
    height: clamp(56px, 8vh, 64px);
  }

  .nav-logo {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
  }

  .section-title {
    font-size: clamp(1.3rem, 4vw, 1.5rem);
  }

  .modal-content {
    max-width: 95%;
  }

  .modal-header {
    padding: clamp(16px, 2.5vh, 20px) clamp(20px, 3vw, 24px);
  }

  #article-form {
    padding: clamp(16px, 3vw, 24px);
  }

  .comment-form {
    padding: clamp(16px, 3vw, 24px);
  }

  .admin-nav {
    gap: clamp(6px, 1vw, 8px);
  }

  .admin-tab {
    padding: clamp(8px, 1.2vh, 10px) clamp(14px, 2.5vw, 16px);
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  }
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
  width: clamp(8px, 1.5vw, 12px);
  height: clamp(8px, 1.5vw, 12px);
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: clamp(8px, 1.5vw, 10px);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: clamp(8px, 1.5vw, 10px);
  border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ========== 选中文本样式 ========== */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text);
}

::-moz-selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text);
}

/* ========== 平滑滚动 ========== */
html {
  scroll-behavior: smooth;
}

/* ========== 焦点可见性 ========== */
*:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
