/* ========== 全局重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: rgba(15, 15, 35, 0.85);
  --bg-card: rgba(20, 20, 45, 0.75);
  --text-primary: #e0e0f0;
  --text-secondary: #a0a0c0;
  --text-muted: #6a6a8a;
  --accent: #7c5cff;
  --accent-glow: rgba(124, 92, 255, 0.4);
  --accent-hover: #9b7fff;
  --border: rgba(124, 92, 255, 0.2);
  --danger: #ff5c7c;
  --success: #5cffac;
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ========== 星空背景 Canvas ========== */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

#mouse-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ========== 导航栏 ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7c5cff, #ff5cac, #5cffac);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  letter-spacing: 2px;
  transition: filter 0.3s;
}

.navbar .logo:hover {
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.navbar .nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
  cursor: pointer;
}

.navbar .nav-links a:hover {
  color: var(--accent-hover);
}

.navbar .user-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.navbar .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #ff5cac);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.navbar .btn-logout {
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.navbar .btn-logout:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* ========== 主内容区 ========== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* ========== 页面标题 ========== */
.page-title {
  text-align: center;
  margin-bottom: 2rem;
}

.page-title h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #7c5cff, #ff5cac);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
}

.page-title p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ========== 搜索和筛选 ========== */
.toolbar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar .search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.toolbar .search-box input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s;
}

.toolbar .search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.toolbar .search-box::before {
  content: '🔍';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
}

.toolbar select {
  padding: 0.7rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.toolbar select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ========== 博客卡片 ========== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #7c5cff, #ff5cac);
  opacity: 0;
  transition: opacity 0.3s;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.15);
}

.blog-card:hover::before {
  opacity: 1;
}

.blog-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.blog-card .card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.blog-card .card-category {
  padding: 0.2rem 0.8rem;
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--accent-hover);
  white-space: nowrap;
  margin-left: 1rem;
}

.blog-card .card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-card .card-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-card .card-author .avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #ff5cac);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
}

/* ========== 按钮 ========== */
.btn {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #7c5cff, #9b7fff);
  color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-glow);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255, 92, 124, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 92, 124, 0.1);
  border-color: var(--danger);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========== 表单 ========== */
.auth-container {
  max-width: 420px;
  margin: 4rem auto;
  padding: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.auth-container h2 {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
  background: linear-gradient(135deg, #7c5cff, #ff5cac);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-container .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(10, 10, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 200px;
  line-height: 1.7;
}

.form-group .error-msg {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: none;
}

.form-group.has-error .error-msg {
  display: block;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: var(--danger);
}

.auth-container .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.auth-container .auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-container .auth-footer a {
  color: var(--accent-hover);
  text-decoration: none;
  cursor: pointer;
}

.auth-container .auth-footer a:hover {
  text-decoration: underline;
}

/* ========== 文章详情 ========== */
.post-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  backdrop-filter: blur(15px);
}

.post-detail .post-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.post-detail .post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.post-detail .post-meta .author-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-detail .post-meta .author-info .avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #ff5cac);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.post-detail .post-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-detail .post-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ========== 附件样式 ========== */
.attachment-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.attachment-box .attachment-icon {
  font-size: 2rem;
}

.attachment-box .attachment-info {
  flex: 1;
}

.attachment-box .attachment-name {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.attachment-box .attachment-size {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.attachment-box .attachment-download {
  text-decoration: none;
  white-space: nowrap;
}

.attachment-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s;
}

.attachment-upload-area:hover {
  border-color: var(--accent);
}

.attachment-upload-area #attachmentPlaceholder {
  cursor: pointer;
}

.attachment-upload-area #attachmentPlaceholder p {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.attachment-item .attachment-icon {
  font-size: 1.5rem;
}

.btn-sm {
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  margin-left: auto;
}

/* ========== 评论区 ========== */
.comments-section {
  margin-top: 2rem;
}

.comments-section h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.comment-form {
  margin-bottom: 2rem;
}

.comment-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: all 0.3s;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.comment-form .btn {
  margin-top: 0.8rem;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.2rem;
}

.comment-item .comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-item .comment-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.comment-item .comment-author .avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #5cffac);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
}

.comment-item .comment-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-item .comment-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.comment-item .comment-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  transition: color 0.3s;
}

.comment-item .comment-delete:hover {
  color: var(--danger);
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state p {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.empty-state .sub-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========== 提示消息 ========== */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 1000;
  animation: slideIn 0.3s ease;
  backdrop-filter: blur(15px);
}

.toast.success {
  background: rgba(92, 255, 172, 0.15);
  border: 1px solid rgba(92, 255, 172, 0.3);
  color: var(--success);
}

.toast.error {
  background: rgba(255, 92, 124, 0.15);
  border: 1px solid rgba(255, 92, 124, 0.3);
  color: var(--danger);
}

.toast.info {
  background: rgba(124, 92, 255, 0.15);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--accent-hover);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}

/* ========== 加载动画 ========== */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .navbar {
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
  }

  .navbar .logo {
    font-size: 1.2rem;
  }

  .navbar .nav-links {
    gap: 1rem;
  }

  .container {
    padding: 1rem;
  }

  .page-title h1 {
    font-size: 1.8rem;
  }

  .toolbar {
    flex-direction: column;
  }

  .toolbar .search-box {
    width: 100%;
  }

  .post-detail {
    padding: 1.5rem;
  }

  .post-detail .post-title {
    font-size: 1.5rem;
  }

  .auth-container {
    margin: 2rem 1rem;
    padding: 1.5rem;
  }
}

/* ========== 导航首页样式 ========== */
.hero-section {
  padding: 4rem 2rem;
  text-align: center;
}

.hero-content {
  margin-bottom: 3rem;
}

.hero-title {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7c5cff, #ff5cac, #5cffac);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: 4px;
  text-shadow: 0 0 30px rgba(124, 92, 255, 0.3);
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  letter-spacing: 8px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(124, 92, 255, 0.2);
}

.nav-card:hover::before {
  transform: scaleX(1);
}

.nav-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  margin-bottom: 1.5rem;
  font-size: 28px;
}

.nav-icon svg {
  width: 30px;
  height: 30px;
}

.nav-icon-blue {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.nav-icon-purple {
  background: rgba(124, 92, 255, 0.2);
  color: var(--accent);
}

.nav-icon-green {
  background: rgba(92, 255, 172, 0.2);
  color: var(--success);
}

.nav-icon-orange {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.nav-card-content h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.nav-card-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.nav-card-arrow {
  margin-top: 1.5rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.nav-card:hover .nav-card-arrow {
  color: var(--accent);
  transform: translateX(5px);
}

.nav-card-arrow svg {
  width: 20px;
  height: 20px;
}

/* ========== 工具箱样式 ========== */
.category-nav {
  display: flex;
  gap: 15px;
  padding: 15px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 15px;
  backdrop-filter: blur(10px);
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.category-item svg {
  width: 18px;
  height: 18px;
}

.category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.category-item:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 92, 255, 0.1);
}

.category-item:hover::before {
  transform: scaleX(1);
}

.category-item.active {
  background: rgba(124, 92, 255, 0.25);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.35);
}

.category-item.active::before {
  transform: scaleX(1);
}

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.tool-nav .nav-item {
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tool-nav .nav-item:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tool-nav .nav-item.active {
  background: rgba(124, 92, 255, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.tool-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tool-panel {
  display: none;
  padding: 20px;
}

.tool-panel.active {
  display: block;
}

.panel-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.panel-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.tool-body {
  max-width: 800px;
}

.input-group {
  margin-bottom: 15px;
  position: relative;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.input-group textarea,
.input-group input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  background: rgba(10, 10, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: 'Consolas', monospace;
  transition: all 0.3s;
}

.input-group textarea:focus,
.input-group input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

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

.input-group textarea[readonly] {
  background: rgba(10, 10, 26, 0.4);
  cursor: not-allowed;
}

.copy-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 12px;
  background: rgba(124, 92, 255, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s;
}

.copy-btn:hover {
  background: rgba(124, 92, 255, 0.3);
  border-color: var(--accent);
}

.tool-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.tool-actions .btn {
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #7c5cff, #5cffac);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(124, 92, 255, 0.3);
}

.btn-secondary {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.config-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.config-item label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.config-item input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.config-item input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
}

.config-item input[type="number"] {
  padding: 8px 12px;
  background: rgba(10, 10, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 80px;
}

.config-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.hash-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hash-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hash-label {
  width: 80px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.hash-item input[type="text"] {
  flex: 1;
  padding: 10px 15px;
  background: rgba(10, 10, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Consolas', monospace;
  font-size: 0.85rem;
}

.color-preview {
  height: 100px;
  border-radius: 10px;
  margin-bottom: 20px;
  background: #00d4ff;
}

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

.color-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-item label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.color-item input[type="text"] {
  padding: 10px 15px;
  background: rgba(10, 10, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.color-picker {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 15px;
}

.ip-result {
  margin-top: 15px;
}

.ip-result .loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px;
}

.ip-result .loading-spinner {
  width: 40px;
  height: 40px;
}

/* ========== 幻兽帕鲁面板样式 ========== */
.palworld-intro {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 30px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--radius);
  margin-bottom: 30px;
}

.palworld-logo {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.palworld-svg {
  width: 100%;
  height: 100%;
  color: #ff6b6b;
  filter: drop-shadow(0 0 15px rgba(255, 107, 107, 0.5));
}

.palworld-text h3 {
  font-family: 'Segoe UI', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #ff6b6b;
  margin-bottom: 8px;
}

.palworld-text p {
  font-size: 16px;
  color: var(--text-secondary);
}

.palworld-features h4,
.palworld-download h4,
.palworld-docs h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.2);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 24px;
  flex-shrink: 0;
}

.feature-icon-red {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.feature-icon-orange {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.feature-icon-purple {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.feature-icon-blue {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius);
}

.download-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  color: var(--success);
}

.download-icon svg {
  width: 26px;
  height: 26px;
}

.download-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.download-size {
  font-size: 13px;
  color: var(--text-muted);
}

.doc-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: var(--accent);
}

.accordion-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.2);
}

.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-title svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.accordion-arrow {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-arrow {
  transform: rotate(180deg);
  color: var(--accent);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.accordion-item.active .accordion-content {
  max-height: 3000px;
}

.doc-content {
  padding: 20px 24px 30px;
  border-top: 1px solid var(--border);
}

.doc-content h5 {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  margin: 24px 0 12px 0;
}

.doc-content h5:first-child {
  margin-top: 0;
}

.doc-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 10px;
}

.doc-content ul,
.doc-content ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.doc-content li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 2;
}

.doc-content li strong {
  color: var(--text-primary);
}

.doc-content code {
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Consolas', monospace;
  font-size: 13px;
}

.doc-content pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 12px 0;
  overflow-x: auto;
}

.doc-content pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.8;
}

.faq-item {
  padding: 16px 0;
  border-bottom: 1px solid rgba(124, 92, 255, 0.1);
}

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

.faq-item h5 {
  color: var(--text-primary);
  margin-bottom: 8px;
}


.open-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 20px;
  margin-top: 12px;
}

.open-source-badge .badge-icon {
  color: #22c55e;
  font-size: 14px;
}

.open-source-badge .badge-icon svg {
  width: 16px;
  height: 16px;
}

.open-source-badge .badge-text {
  color: #22c55e;
  font-size: 13px;
  font-weight: 500;
}

/* ========== 幻兽帕鲁 Web管理面板 ========== */
.palworld-web-panel {
  margin-top: 30px;
  padding: 25px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.palworld-web-panel h4 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.panel-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.server-status-card {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5c7c;
  box-shadow: 0 0 8px rgba(255, 92, 124, 0.5);
  transition: all 0.3s;
}

.status-indicator.running .status-dot {
  background: #5cffac;
  box-shadow: 0 0 8px rgba(92, 255, 172, 0.5);
  animation: pulse 2s infinite;
}

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

.status-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-meta {
  display: flex;
  gap: 20px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.server-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.server-actions .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.server-actions .btn svg {
  width: 16px;
  height: 16px;
}

.server-actions .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: linear-gradient(135deg, #2dd55e, #1ab44a);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff4444, #ec2626);
  transform: translateY(-1px);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.btn-warning:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffae1b, #e98706);
  transform: translateY(-1px);
}

.server-log {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 12px;
  height: 120px;
  overflow-y: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
}

.log-line {
  margin-bottom: 4px;
  line-height: 1.5;
}

.log-time {
  color: var(--text-muted);
  margin-right: 6px;
}

.log-info {
  color: var(--text-secondary);
}

.log-success {
  color: #5cffac;
}

.log-error {
  color: #ff5c7c;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.panel-card {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 20px;
}

.panel-card h5 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.config-label {
  color: var(--text-muted);
  font-size: 13px;
}

.config-value {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.resource-item {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  gap: 10px;
}

.resource-label {
  color: var(--text-muted);
  font-size: 13px;
}

.resource-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.resource-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.resource-value {
  color: var(--text-secondary);
  font-size: 12px;
  text-align: right;
}

.player-list-card {
  margin-top: 0;
}

.player-count {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: normal;
}

.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.player-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 20px;
}

.player-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: background 0.2s;
}

.player-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.player-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.player-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.player-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.player-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.player-status.online {
  background: rgba(92, 255, 172, 0.15);
  color: #5cffac;
}

@media (max-width: 768px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
  
  .status-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .server-actions {
    justify-content: center;
  }
  
  .server-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* ========== 独立面板页面样式 ========== */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.panel-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.panel-icon svg {
  width: 28px;
  height: 28px;
}

.panel-header h1 {
  font-size: 24px;
  color: var(--text-primary);
  margin: 0;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

.btn-back svg {
  width: 16px;
  height: 16px;
}

/* ========== 面板链接卡片样式 ========== */
.palworld-web-panel-link {
  margin-top: 30px;
  padding: 25px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.palworld-web-panel-link h4 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.panel-preview {
  margin: 15px 0;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.preview-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

.preview-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-features span {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-panel-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(124, 92, 255, 0.3);
}

.btn-panel-link svg {
  width: 16px;
  height: 16px;
}

/* ========== 管理面板布局 ========== */
.admin-body {
  background: var(--bg-main);
  min-height: 100vh;
}

.admin-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.sidebar-logo svg {
  width: 22px;
  height: 22px;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-nav {
  flex: 1;
  padding: 15px 0;
  overflow-y: auto;
}

.nav-group {
  margin-bottom: 15px;
}

.nav-group-header {
  padding: 8px 20px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(124, 92, 255, 0.1);
  color: var(--accent);
  border-left-color: var(--accent);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item span {
  font-size: 14px;
}

.sidebar-footer {
  padding: 15px;
  border-top: 1px solid var(--border);
}

.btn-exit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-exit:hover {
  background: rgba(255, 92, 124, 0.1);
  border-color: #ff5c7c;
  color: #ff5c7c;
}

.btn-exit svg {
  width: 16px;
  height: 16px;
}

.admin-main {
  flex: 1;
  padding: 25px;
  overflow-x: hidden;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.header-title h2 {
  font-size: 22px;
  color: var(--text-primary);
  margin: 0;
}

.header-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 92, 124, 0.1);
  border: 1px solid rgba(255, 92, 124, 0.3);
  border-radius: 20px;
  font-size: 14px;
}

.status-badge.running {
  background: rgba(92, 255, 172, 0.1);
  border-color: rgba(92, 255, 172, 0.3);
}

.status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5c7c;
}

.status-badge.running .status-dot {
  background: #5cffac;
  animation: pulse 2s infinite;
}

.admin-content {
  animation: fadeIn 0.3s ease;
}

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

.tab-content.hidden {
  display: none;
}

/* ========== 仪表盘 ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-cpu { background: linear-gradient(135deg, #7c5cff, #5c9eff); }
.stat-memory { background: linear-gradient(135deg, #ff5cac, #ff8c5c); }
.stat-players { background: linear-gradient(135deg, #5cffac, #5cffda); }
.stat-uptime { background: linear-gradient(135deg, #ffc75c, #ff8c5c); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}

.dashboard-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.dashboard-section h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.log-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 15px;
  height: 250px;
  overflow-y: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
}

.log-item {
  margin-bottom: 6px;
  line-height: 1.6;
}

.log-item .log-time {
  color: var(--text-muted);
  margin-right: 8px;
}

.log-item .log-content {
  color: var(--text-secondary);
}

/* ========== 服务器管理 ========== */
.server-actions-section {
  margin-bottom: 25px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  color: white;
}

.btn-action svg {
  width: 18px;
  height: 18px;
}

.btn-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-start { background: linear-gradient(135deg, #22c55e, #16a34a); }
.btn-start:hover:not(:disabled) { background: linear-gradient(135deg, #2dd55e, #1ab44a); transform: translateY(-1px); }
.btn-stop { background: linear-gradient(135deg, #ef4444, #dc2626); }
.btn-stop:hover:not(:disabled) { background: linear-gradient(135deg, #ff4444, #ec2626); transform: translateY(-1px); }
.btn-restart { background: linear-gradient(135deg, #f59e0b, #d97706); }
.btn-restart:hover:not(:disabled) { background: linear-gradient(135deg, #ffae1b, #e98706); transform: translateY(-1px); }

.server-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.info-card h4 {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 13px;
}

.info-item span:first-child {
  color: var(--text-muted);
}

.info-item span:last-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.resource-bar-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.resource-bar-item {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.resource-bar-bg {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.resource-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* ========== 游戏配置 ========== */
.config-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 25px;
}

.config-section h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-item label {
  font-size: 13px;
  color: var(--text-muted);
}

.config-input, .config-select {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
}

.config-input:focus, .config-select:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-save-config {
  padding: 12px 30px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-save-config:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(124, 92, 255, 0.3);
}

/* ========== 调试终端 ========== */
.console-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

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

.console-header h3 {
  font-size: 16px;
  color: var(--text-primary);
}

.btn-clear {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
}

.btn-clear:hover {
  background: rgba(255, 92, 124, 0.1);
  color: #ff5c7c;
}

.console-output {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 15px;
  height: 350px;
  overflow-y: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
}

.console-line {
  margin-bottom: 4px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.console-prompt {
  color: var(--accent);
  margin-right: 8px;
}

.console-response {
  color: #5cffac;
  padding-left: 20px;
}

.console-input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.console-input-area .console-prompt {
  font-size: 14px;
}

#console-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Consolas', 'Monaco', monospace;
}

#console-input:focus {
  outline: none;
}

.btn-execute {
  padding: 6px 16px;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 13px;
  cursor: pointer;
}

/* ========== 存档管理 ========== */
.save-section {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.save-actions {
  display: flex;
  gap: 15px;
}

.btn-save-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-save-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-save-action svg {
  width: 16px;
  height: 16px;
}

.backup-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.backup-list h3 {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.backup-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.backup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.backup-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-name {
  font-size: 14px;
  color: var(--text-primary);
}

.backup-size {
  font-size: 12px;
  color: var(--text-muted);
}

.backup-actions {
  display: flex;
  gap: 8px;
}

.btn-backup-op {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-backup-op:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-backup-op.btn-danger:hover {
  border-color: #ff5c7c;
  color: #ff5c7c;
}

/* ========== 玩家管理 ========== */
.players-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

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

.players-header h3 {
  font-size: 16px;
  color: var(--text-primary);
}

.players-count {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: normal;
}

.search-input {
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  width: 200px;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  transition: background 0.2s;
}

.player-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.player-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.player-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.player-level, .player-time, .player-ping {
  font-size: 13px;
  color: var(--text-muted);
  width: 80px;
}

.player-actions {
  display: flex;
  gap: 8px;
}

.btn-player-op {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-player-op:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-player-op.btn-danger:hover {
  border-color: #ff5c7c;
  color: #ff5c7c;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .admin-container {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
  }
  
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 10px;
  }
  
  .nav-group {
    margin-bottom: 0;
    display: flex;
    gap: 5px;
  }
  
  .nav-group-header {
    display: none;
  }
  
  .nav-item {
    padding: 10px 15px;
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  
  .nav-item.active {
    border-left: none;
    border-bottom-color: var(--accent);
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .server-info-grid {
    grid-template-columns: 1fr;
  }
  
  .config-grid {
    grid-template-columns: 1fr;
  }
  
  .backup-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .player-row {
    flex-wrap: wrap;
  }
  
  .search-input {
    width: 100%;
  }
}