/* ==========================================
   个人网址导航 - 时尚版样式表
   ========================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --bg-primary: #08080f;
  --bg-secondary: #0d0d1a;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.14);
  --text-primary: #eeedf2;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.3);
  --accent-1: #f472b6;
  --accent-2: #a78bfa;
  --accent-3: #38bdf8;
  --accent-gradient: linear-gradient(135deg, #f472b6, #a78bfa, #818cf8);
  --accent-gradient-warm: linear-gradient(135deg, #fb7185, #f472b6, #a78bfa);
  --danger: #f43f5e;
  --danger-hover: #e11d48;
  --success: #22c55e;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.6);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --max-width: 1200px;
}

/* ---------- 重置与基础 ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ---------- 自定义滚动条 ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

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

/* ---------- 环境光晕 ---------- */
.main-wrapper::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(162, 104, 240, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientGlow 12s ease-in-out infinite alternate;
}

.main-wrapper::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(244, 114, 182, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientGlow 15s ease-in-out infinite alternate-reverse;
}

/* ---------- 主布局 ---------- */
.main-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  flex: 1;
}

/* ==========================================
   顶部导航条
   ========================================== */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(8, 8, 15, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.brand-text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
}

.nav-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(162, 104, 240, 0.15);
}

/* ==========================================
   搜索区域
   ========================================== */
.search-section {
  padding: 56px 0 44px;
  text-align: center;
}

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

.search-box .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition);
}

.search-box:focus-within .search-icon {
  color: var(--accent-2);
}

.search-box input {
  width: 100%;
  padding: 15px 48px 15px 50px;
  font-size: 15px;
  font-family: inherit;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
  backdrop-filter: blur(12px);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.08), var(--shadow);
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: none;
  transition: all var(--transition);
}

.search-clear:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.search-box input:not(:placeholder-shown) ~ .search-clear {
  display: flex;
}

/* ==========================================
   网址卡片区域
   ========================================== */
#linksContainer {
  padding-bottom: 48px;
}

/* 分类区块 */
.category-section {
  margin-bottom: 44px;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 0 4px;
  position: relative;
}

.category-header::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 32px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.category-icon {
  font-size: 18px;
  line-height: 1;
}

.category-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.category-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 2px;
  font-weight: 400;
  padding: 2px 8px;
  background: var(--glass-bg);
  border-radius: 10px;
}

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

/* 单个网址卡片 - 新时尚设计 */
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* 左侧渐变装饰条 */
.link-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: 0 2px 2px 0;
}

/* 悬浮背景光晕 */
.link-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  padding-bottom: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.link-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(167, 139, 250, 0.05);
}

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

.link-card:hover::after {
  opacity: 1;
}

.link-card:active {
  transform: translateY(-1px);
}

/* 卡片图标(favicon) */
.link-favicon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  font-size: 18px;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.link-card:hover .link-favicon {
  border-color: rgba(167, 139, 250, 0.25);
}

.link-favicon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

/* 首字母渐变图标（favicon 加载失败的优雅回退） */
.link-favicon.letter-icon {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.15);
  transition: all var(--transition);
}

.link-card:hover .link-favicon.letter-icon {
  transform: scale(1.08);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.15), 0 0 16px rgba(255,255,255,0.1);
}

/* 卡片文字内容 */
.link-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.link-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
  transition: color var(--transition);
}

.link-card:hover .link-title {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.link-desc {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* 卡片打开箭头 */
.link-arrow {
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  transition: all var(--bounce);
}

.link-card:hover .link-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent-2);
}

/* ==========================================
   加载 / 空状态
   ========================================== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  color: var(--text-muted);
  gap: 16px;
}

.loader {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.06);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-state {
  text-align: center;
  padding: 80px 0;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 52px;
  margin-bottom: 18px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(162, 104, 240, 0.35);
}

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

/* ==========================================
   页脚
   ========================================== */
.site-footer {
  text-align: center;
  padding: 28px 24px;
  color: var(--text-muted);
  font-size: 12.5px;
  border-top: 1px solid var(--glass-border);
  margin-top: auto;
  letter-spacing: 0.5px;
}

/* ==========================================
   ===== 后台管理样式 =====
   ========================================== */

/* ---------- 登录页面 ---------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 24px;
  position: relative;
}

.login-wrapper::before {
  content: '';
  position: fixed;
  top: -40%;
  left: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(167, 139, 250, 0.1) 0%, transparent 60%);
  animation: bgFloat 18s ease-in-out infinite;
}

.login-wrapper::after {
  content: '';
  position: fixed;
  bottom: -30%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(244, 114, 182, 0.08) 0%, transparent 60%);
  animation: bgFloat 22s ease-in-out infinite alternate;
}

.login-card {
  position: relative;
  background: rgba(13, 13, 26, 0.8);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(32px);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.3));
}

.login-header h2 {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.input-group {
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 15px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
}

.input-group input:focus {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.08);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.error-message {
  color: var(--danger);
  font-size: 13px;
  min-height: 20px;
  text-align: center;
}

.btn-login {
  padding: 14px;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(162, 104, 240, 0.35);
}

/* ---------- 后台布局 ---------- */
.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

/* 顶部栏 */
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(8, 8, 15, 0.8);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--glass-border);
}

.topbar-left h1 {
  font-size: 16px;
  font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all var(--transition);
  text-decoration: none;
}

.topbar-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.logout-btn:hover {
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--danger);
}

/* 后台主体 */
.admin-body {
  display: flex;
  flex: 1;
}

/* 侧边栏 */
.admin-sidebar {
  width: 200px;
  background: rgba(255, 255, 255, 0.015);
  border-right: 1px solid var(--glass-border);
  padding: 16px 10px;
  flex-shrink: 0;
}

.sidebar-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.sidebar-tab:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}

.sidebar-tab.active {
  background: var(--accent-gradient);
  color: white;
}

/* 主内容区 */
.admin-content {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.tab-header h2 {
  font-size: 19px;
  font-weight: 600;
}

/* 管理列表 */
.admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.admin-list-item:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-hover);
  border-left-color: var(--accent-2);
}

.item-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.item-icon {
  font-size: 20px;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

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

.item-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-gradient);
  color: white;
  margin-top: 3px;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.btn-icon.danger:hover {
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--danger);
  background: rgba(244, 63, 94, 0.08);
}

/* ==========================================
   模态框
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: linear-gradient(135deg, #13132b, #0d0d1a);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.25s ease;
}

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

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

/* 表单 */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background: #13132b;
  color: var(--text-primary);
}

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

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
}

.btn-secondary {
  padding: 10px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

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

.btn-danger {
  padding: 10px 20px;
  background: var(--danger);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger:hover {
  background: var(--danger-hover);
}

/* 确认对话框 */
.confirm-text {
  text-align: center;
  padding: 16px 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.confirm-text strong {
  color: var(--text-primary);
}

/* ==========================================
   动画关键帧
   ========================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(1deg); }
  66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

@keyframes ambientGlow {
  0% {
    opacity: 0.6;
    transform: translate(0, 0) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(20px, -20px) scale(1.05);
  }
  100% {
    opacity: 0.6;
    transform: translate(-10px, 10px) scale(0.95);
  }
}

/* ==========================================
   响应式
   ========================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .top-nav {
    padding: 14px 18px;
  }

  .search-section {
    padding: 36px 0 28px;
  }

  .search-box input {
    padding: 14px 40px 14px 44px;
    font-size: 15px;
  }

  .link-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
  }

  .link-card {
    padding: 14px 16px;
  }

  .category-header::before {
    width: 24px;
  }

  /* 后台响应式 */
  .admin-body {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    display: flex;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 16px;
    gap: 6px;
  }

  .sidebar-tab {
    justify-content: center;
    padding: 10px 14px;
    flex: 1;
  }

  .sidebar-tab span {
    display: none;
  }

  .admin-content {
    padding: 20px 16px;
  }

  .tab-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-list-item {
    padding: 12px 14px;
    flex-wrap: wrap;
  }

  .login-card {
    padding: 36px 28px;
  }
}

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

  .modal-box {
    width: 95%;
    max-height: 90vh;
  }

  .admin-topbar {
    padding: 12px 16px;
  }

  .topbar-left h1 {
    font-size: 14px;
  }
}
