:root {
  --primary: #11b56e;
  --primary-light: #163d2c;
  --bg: #121212;
  --card-bg: #1c1c1e;
  --text-main: #e0e0e0;
  --text-muted: #888888;
  --border: #2c2c2e;
  --glass-bg: rgba(18, 18, 18, 0.85);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text-main); font-size: 15px; line-height: 1.5; display: flex; justify-content: center; transition: filter 0.3s, background 0.3s; }
a { color: var(--primary); text-decoration: none; }

.app-container { width: 100%; max-width: 600px; background: var(--bg); min-height: 100vh; position: relative; box-shadow: 0 0 20px rgba(0,0,0,0.5); }

.glass-header { position: sticky; top: 0; z-index: 100; background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); height: 50px; display: flex; align-items: center; justify-content: center; }
.header-title { font-size: 17px; font-weight: 600; }

.app-main { padding: 12px 12px 80px 12px; min-height: calc(100vh - 130px); }
.app-main.is-home { padding-top: 0; }
.app-main.is-profile { padding-top: 0; }

/* 原有样式保持不动，省略部分通用样式以节省篇幅，实际直接覆盖即可 */
.coolapk-header { padding: 16px 12px 8px; background: var(--bg); position: sticky; top: 0; z-index: 90; }
.ch-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ch-btn-left { display: flex; align-items: center; gap: 4px; color: var(--text-main); font-size: 14px; font-weight: 500; background: #2c2c2e; padding: 8px 14px; border-radius: 20px; }
.ch-search { flex: 1; background: #2c2c2e; border-radius: 20px; height: 38px; display: flex; align-items: center; padding: 0 16px; }
.ch-search-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.ch-search-text { font-size: 15px; color: #aaa; font-weight: 500; letter-spacing: 1px; }
.ch-search-icon { color: #aaa; font-size: 18px; }
.ch-msg { position: relative; font-size: 22px; color: #e0e0e0; padding: 4px; }
.ch-banner { background: linear-gradient(135deg, #0e2358, #11347a); border-radius: 12px; height: 120px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; text-decoration: none; }
.ch-banner-text { color: #fff; font-size: 15px; font-weight: bold; border: 1px solid rgba(255,255,255,0.3); padding: 8px 20px; border-radius: 20px; }
.ch-kingkong { display: flex; justify-content: space-between; margin-bottom: 20px; padding: 0 4px; }
.kk-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 60px; text-decoration: none; }
.kk-icon { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #fff; }
.kk-name { font-size: 12px; color: #ccc; white-space: nowrap; }

.scroll-cats { display: flex; overflow-x: auto; gap: 12px; padding: 8px 4px; margin-bottom: 8px; scrollbar-width: none; }
.scroll-cats::-webkit-scrollbar { display: none; }
.scroll-cats a { white-space: nowrap; padding: 6px 14px; font-size: 14px; color: #aaa; background: #1e1e1e; border-radius: 16px; font-weight: 500; }
.scroll-cats a.active { background: var(--primary-light); color: var(--primary); }

.feed { display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card-bg); border-radius: 16px; padding: 16px; display: block; color: var(--text-main); transition: transform 0.1s; }
.card:active { transform: scale(0.98); }
.card-header { display: flex; align-items: center; margin-bottom: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: #333; color: #ccc; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 18px; margin-right: 10px; }
.user-info { flex: 1; }
.username { font-size: 14px; font-weight: 600; color: #ddd; }
.time { font-size: 12px; color: var(--text-muted); }
.badge { font-size: 12px; padding: 2px 8px; background: var(--primary-light); color: var(--primary); border-radius: 4px; font-weight: 500; }
.badge-source { background: #3a2512; color: #f57c00; }
.card-title { font-size: 16px; font-weight: bold; margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-content { font-size: 14px; color: #999; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-footer { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); }

.glass-footer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 600px; z-index: 1000; background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav { display: flex; justify-content: space-around; align-items: center; height: 56px; position: relative; }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #666; font-size: 10px; width: 20%; text-decoration: none; }
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 20px; margin-bottom: 2px; }

.nav-item-center { width: 20%; display: flex; justify-content: center; position: relative; }
.publish-btn { position: absolute; top: -20px; width: 50px; height: 50px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 300; box-shadow: 0 4px 12px rgba(17, 181, 110, 0.4); transition: transform 0.2s; }
.publish-btn:active { transform: scale(0.9); }

.detail-card { background: var(--card-bg); border-radius: 16px; padding: 20px; margin-bottom: 12px; }
.detail-title { font-size: 20px; margin: 16px 0; line-height: 1.4; color: #fff; }
.detail-content { font-size: 16px; color: #ccc; line-height: 1.7; margin-bottom: 20px; }
.file-box { background: #2c2c2e; border-radius: 12px; padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.filename { font-weight: 600; font-size: 14px; margin-bottom: 4px; word-break: break-all; color: #fff; }
.filesize { font-size: 12px; color: var(--text-muted); }
.download-btn { background: var(--primary); color: #fff; padding: 8px 24px; border-radius: 20px; font-weight: 600; font-size: 14px; }

.comment-section { margin-top: 12px; }
.comment-section h3 { font-size: 16px; padding-left: 4px; margin-bottom: 12px; color: #fff; }
.comment-form { display: flex; gap: 8px; margin-bottom: 16px; }
.comment-form input { flex: 1; padding: 10px 16px; border: 1px solid var(--border); border-radius: 20px; background: var(--card-bg); color: #fff; outline: none; }
.comment-form button { background: var(--primary); color: #fff; border: none; border-radius: 20px; padding: 0 20px; font-weight: 600; }
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item { display: flex; gap: 10px; background: var(--card-bg); padding: 12px; border-radius: 12px; }
.comment-body { flex: 1; }
.comment-text { font-size: 14px; color: #ccc; margin: 4px 0; }

.app-form { background: var(--card-bg); border-radius: 16px; padding: 20px; }
.form label { display: block; margin-bottom: 16px; font-weight: 600; font-size: 14px; color: #ddd; }
.form input, .form textarea, .form select { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-top: 8px; font-size: 15px; background: #2c2c2e; color: #fff; outline: none; transition: border 0.2s; font-family: inherit; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--primary); }
.form button { width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: bold; }

.flash { padding: 12px 16px; background: var(--primary-light); color: var(--primary); border-radius: 10px; margin-bottom: 16px; font-size: 14px; text-align: center; }
.flash.err { background: #3a1c1c; color: #ff4d4f; }

.coolapk-profile { padding: 0 12px; margin-top: -12px; }
.cp-header-actions { display: flex; justify-content: flex-end; gap: 20px; padding: 10px 0 20px; }
.cp-icon { font-size: 24px; color: #fff; position: relative; text-decoration: none; }
.cp-user-info { display: flex; align-items: center; margin-bottom: 24px; }
.cp-avatar { width: 80px; height: 80px; border-radius: 50%; background: #e0e0e0; color: #888; font-size: 36px; font-weight: bold; display: flex; align-items: center; justify-content: center; margin-right: 16px; }
.cp-details { flex: 1; }
.cp-username { font-size: 22px; font-weight: bold; color: #fff; margin: 2px 0 10px; }
.cp-level-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #aaa; }
.cp-progress-bg { flex: 1; height: 6px; background: #333; border-radius: 3px; overflow: hidden; }
.cp-progress-bar { height: 100%; background: #fff; border-radius: 3px; }
.cp-more-btn { display: flex; align-items: center; color: #fff; font-size: 18px; padding-left: 10px; }
.cp-stats-card { background: var(--card-bg); border-radius: 16px; display: flex; align-items: center; padding: 20px 0; margin-bottom: 12px; }
.cp-stat-item { flex: 1; text-align: center; }
.cp-stat-num { font-size: 26px; font-weight: bold; color: #fff; line-height: 1.2; }
.cp-stat-label { font-size: 13px; color: #fff; margin-top: 4px; }
.cp-stat-divider { width: 1px; height: 30px; background: #333; }
.cp-grid-card { background: var(--card-bg); border-radius: 16px; padding: 24px 16px 16px; margin-bottom: 12px; }
.cp-grid-row { display: flex; justify-content: space-between; margin-bottom: 28px; }
.cp-grid-row:last-child { margin-bottom: 0; }
.cp-grid-item { width: 25%; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; text-decoration: none; transition: transform 0.1s; }
.cp-grid-item:active { transform: scale(0.95); }
.cp-grid-icon { font-size: 28px; margin-bottom: 8px; }
.cp-grid-label { font-size: 13px; color: #fff; line-height: 1.3; }

.admin-body { display: block; background: #121212; min-height: 100vh; overflow: hidden; }
.admin-layout { display: flex; height: 100vh; width: 100vw; }
.admin-sidebar { width: 220px; background: #1a1a1a; border-right: 1px solid #2c2c2e; display: flex; flex-direction: column; }
.admin-logo { height: 64px; line-height: 64px; text-align: center; font-size: 20px; font-weight: bold; color: #fff; border-bottom: 1px solid #2c2c2e; letter-spacing: 1px; }
.admin-nav { flex: 1; padding: 16px 8px; overflow-y: auto; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: #a0aec0; font-size: 14px; border-radius: 8px; margin-bottom: 4px; transition: all 0.2s; }
.admin-nav a span { font-size: 16px; }
.admin-nav a:hover { background: #2c2c2e; color: #fff; }
.admin-nav a.active { background: rgba(17, 181, 110, 0.15); color: var(--primary); font-weight: 600; }
.admin-sidebar-bottom { padding: 16px 8px; border-top: 1px solid #2c2c2e; }
.admin-sidebar-bottom a { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: #888; font-size: 13px; border-radius: 8px; }
.admin-sidebar-bottom a:hover { color: #fff; background: #2c2c2e; }
.admin-main { flex: 1; display: flex; flex-direction: column; background: #121212; overflow: hidden; }
.admin-topbar { height: 64px; background: #1a1a1a; border-bottom: 1px solid #2c2c2e; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.admin-breadcrumb { color: #888; font-size: 14px; }
.admin-user { color: #ccc; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.admin-content { flex: 1; padding: 24px; overflow-y: auto; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.admin-card { background: #1e1e1e; border: 1px solid #2c2c2e; border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; }
.ac-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.ac-info h3 { margin: 0 0 4px 0; font-size: 24px; color: #fff; line-height: 1; }
.ac-info p { margin: 0; color: #888; font-size: 13px; }
.admin-chart-box { background: #1e1e1e; border: 1px solid #2c2c2e; border-radius: 12px; padding: 24px; }
.admin-table-wrap { background: #1e1e1e; border: 1px solid #2c2c2e; border-radius: 12px; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.admin-table th, .admin-table td { padding: 16px 20px; border-bottom: 1px solid #2c2c2e; text-align: left; color: #ccc; }
.admin-table th { background: #252525; color: #888; font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: var(--primary); }
.inline { display: inline; }
.inline button { padding: 6px 12px; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 12px; margin-right: 6px; transition: opacity 0.2s; }
.inline button:hover { opacity: 0.8; }

/* ================= 液态玻璃导航栏专用样式 ================= */
body.liquid-nav-mode .app-main {
  padding-bottom: 120px;
}

body.liquid-nav-mode .glass-footer {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 500px;
  background: rgba(30, 30, 30, 0.55);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  padding: 0;
  z-index: 1000;
  overflow: visible;
}

body.liquid-nav-mode .bottom-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  position: relative;
  padding: 0 10px;
}

body.liquid-nav-mode .nav-bubble {
  position: absolute;
  top: 50%;
  left: 0;
  height: 54px;
  width: 54px;
  margin-top: -27px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), 0 4px 12px rgba(0,0,0,0.2);
  z-index: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), width 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

body.liquid-nav-mode .nav-item {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  flex: 1;
  text-decoration: none;
  transition: all 0.3s ease;
}

body.liquid-nav-mode .nav-item.active {
  color: #fff;
}

body.liquid-nav-mode .nav-icon {
  font-size: 22px;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.3s ease;
}

body.liquid-nav-mode .nav-item.active .nav-icon {
  transform: scale(1.1);
}

body.liquid-nav-mode .nav-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

body.liquid-nav-mode .nav-item-center {
  width: 25%;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

body.liquid-nav-mode .publish-btn {
  width: 72px;
  height: 48px;
  background: linear-gradient(135deg, #36d1a3, #11b56e);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: 300;
  box-shadow: 0 4px 15px rgba(17, 181, 110, 0.4), inset 0 2px 2px rgba(255,255,255,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  margin-top: -10px;
}

body.liquid-nav-mode .publish-btn:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(17, 181, 110, 0.3);
}