:root {
  color-scheme: dark !important;
  -webkit-color-scheme: dark !important;
  /* 极深邃的太空灰底 */
  --bg: #060608 !important; 
  --surface: rgba(26, 26, 30, 0.6) !important; /* 半透明玻璃 */
  --gold: #FFFFFF !important; 
  --gold-soft: rgba(255, 255, 255, 0.08) !important;
  --green: #30D158 !important;
  --red: #FF453A !important;
  --text: #F5F5F7 !important; /* 苹果专属白 */
  --text-sub: #86868B !important; /* 苹果专属灰 */
  --line: rgba(255, 255, 255, 0.1) !important;
}

/* ================= 背景光影 ================= */
html { background-color: var(--bg) !important; }
body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
  -webkit-font-smoothing: antialiased;
  /* 增加背景微弱渐变，像极光 */
  background-image: 
    radial-gradient(circle at 15% 0%, rgba(255,255,255,0.03) 0%, transparent 40%),
    radial-gradient(circle at 85% 100%, rgba(255,255,255,0.02) 0%, transparent 40%) !important;
  background-attachment: fixed !important;
}
.glow { display: none !important; }

/* ================= 页面切换入场动画 ================= */
@keyframes smoothEnter {
  0% { opacity: 0; transform: translateY(15px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
#view {
  animation: smoothEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ================= 卡片与面板质感 ================= */
.panel, .item {
  background: var(--surface) !important;
  backdrop-filter: blur(24px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
  border: 1px solid var(--line) !important;
  border-radius: 20px !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.08), 
    0 8px 24px rgba(0, 0, 0, 0.3) !important;
  transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), background 0.2s, border-color 0.2s !important;
}

/* 列表交错入场动画 */
.menu .item, #admin-user-list > div {
  animation: smoothEnter 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.menu .item:nth-child(1) { animation-delay: 0.02s; }
.menu .item:nth-child(2) { animation-delay: 0.04s; }
.menu .item:nth-child(3) { animation-delay: 0.06s; }
.menu .item:nth-child(4) { animation-delay: 0.08s; }
.menu .item:nth-child(5) { animation-delay: 0.10s; }
.menu .item:nth-child(6) { animation-delay: 0.12s; }
.menu .item:nth-child(7) { animation-delay: 0.14s; }

/* 悬浮与按压反馈 */
@media (hover: hover) {
  .item:hover, .panel:hover {
    background: rgba(40, 40, 45, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
  }
}
.item:active, .panel:active {
  transform: scale(0.96) !important;
  background: rgba(50, 50, 55, 0.9) !important;
}

/* 图标与文字 */
.item .icon { filter: none !important; opacity: 1 !important; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.item:hover .icon { transform: scale(1.15) rotate(-5deg); }
.item .name { font-weight: 600; color: #FFF; font-size: 15px; letter-spacing: -0.3px; }
.item .desc { color: var(--text-sub) !important; font-size: 12px; margin-top: 4px; }

/* ================= 按钮 ================= */
.btn-main, .setting-btn, .m-submit {
  background: #FFFFFF !important;
  color: #000000 !important;
  border: none !important;
  border-radius: 14px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1) !important;
  transition: transform 0.15s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.2s !important;
}
.btn-main:hover, .setting-btn:hover, .m-submit:hover {
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px);
}
.btn-main:active, .setting-btn:active, .m-submit:active {
  transform: scale(0.95) !important;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1) !important;
}

.btn-top {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid var(--line) !important;
  color: #FFF !important;
  border-radius: 20px !important;
  transition: all 0.2s !important;
}
.btn-top:hover { background: rgba(255,255,255,0.1) !important; }
.btn-top:active { transform: scale(0.92) !important; }

/* ================= 输入框 ================= */
.m-input, #s-nickname, #s-password, #s-code, #g-amount, #g-count, #g-notify-title, #g-notify-content, #reply-content, textarea {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid var(--line) !important;
  color: #FFF !important;
  border-radius: 12px !important;
  transition: all 0.25s ease !important;
}
.m-input:focus, #s-nickname:focus, #s-code:focus, textarea:focus {
  border-color: rgba(255, 255, 255, 0.4) !important;
  background: rgba(0, 0, 0, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.1) !important;
  outline: none !important;
}

/* ================= 进度条发光 ================= */
.progress { 
  background: rgba(0, 0, 0, 0.6) !important; 
  border-radius: 10px !important; 
  height: 8px !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
  overflow: hidden;
}
.progress div { 
  background: #FFF !important; 
  border-radius: 10px !important;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6) !important;
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1) !important; /* 进度条弹性加载 */
}

/* ================= 弹窗果冻动画 ================= */
#modal { 
  background: rgba(0,0,0,0.6) !important; 
  backdrop-filter: blur(15px); 
  opacity: 0; transition: opacity 0.3s ease;
}
#modal[style*="display: flex"] { opacity: 1; }
.modal-card {
  background: #141416 !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8) !important;
  border-radius: 28px !important;
  animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes modalPop {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.m-tabs button { background: transparent !important; color: var(--text-sub) !important; transition: all 0.2s; }
.m-tabs button.on { background: rgba(255,255,255,0.1) !important; color: #FFF !important; font-weight: 600; }

/* 品牌文字与列表卡片 */
.brand { font-weight: 800; letter-spacing: -0.5px; color: #FFF; }
#admin-user-list > div { background: rgba(255,255,255,0.03) !important; border: 1px solid var(--line) !important; border-radius: 12px !important; transition: background 0.2s; }
#admin-user-list > div:hover { background: rgba(255,255,255,0.06) !important; }

/* 防止浏览器强制深色反色 */
@media (prefers-color-scheme: light), (prefers-color-scheme: dark) {
  html, body { background-color: #060608 !important; color: #F5F5F7 !important; }
  .panel, .item { background: rgba(26, 26, 30, 0.6) !important; }
  input, textarea { background-color: rgba(0, 0, 0, 0.4) !important; color: #FFF !important; }
}


/* ================= 严格统一大小的 Bento Grid ================= */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 强制两列，每个卡片占1格 */
  gap: 12px; /* 统一间距 */
  width: 100%;
}

.bento-card {
  background: #18181B; /* 统一背景 */
  border: 1px solid var(--line);
  border-radius: 20px; /* 统一圆角 */
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
  min-height: 120px; /* 统一高度 */
}

.bento-card:active {
  transform: scale(0.96);
  background: #27272A;
}

.bento-icon {
  font-size: 28px;
  margin-bottom: 16px;
  filter: none !important;
  opacity: 1 !important;
}

.bento-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bento-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bento-desc {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
