:root {
  /* 补回丢失的基础颜色，防止网页瞬间变透明 */
  --white: #ffffff;
  --pink-bg: #ffe8ef; 

  /* 高级莫兰迪色系 & 苹果 iOS 质感变量 */
  --primary-bg: #f2f2f7; 
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.8);
  --text-main: #1d1d1f; 
  --text-light: #8e8e93; 
  --accent: #ff4d6d; 
  --coin-gold: #f39c12;
  --shadow-sm: 0 8px 24px rgba(149, 157, 165, 0.1); 
  --shadow-md: 0 20px 40px rgba(0, 0, 0, 0.08);
  --bg-secondary: rgba(0,0,0,0.05);
  --border-color: #f0f0f0;
}

html, body { margin: 0; padding: 0; width: 100%; height: 100%; background-color: #e0e0e0; overflow: hidden; -webkit-overflow-scrolling: touch; }
body { display: flex; justify-content: center; align-items: center; height: 100dvh; }

* { box-sizing: border-box; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; -webkit-tap-highlight-color: transparent; }
button { border: none; outline: none; cursor: pointer; transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1); }
button:active { transform: scale(0.92); }
::-webkit-scrollbar { width: 0px; }

#splash-screen {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--primary-bg); z-index: 9999; display: flex; flex-direction: column;
  justify-content: center; align-items: center; transition: opacity 0.5s ease;
}
.loader-bird { font-size: 80px; animation: bounce 0.8s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-30px); } }

.app-container {
  width: 100%; max-width: 420px; height: 100%; height: 100dvh; 
  background: var(--primary-bg); position: relative; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-md); transition: all 0.3s ease;
  /* 修复部分手机浏览器滚动问题 */
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
}
@supports (-webkit-touch-callout: none) { body, .app-container { height: -webkit-fill-available; } }
@media (min-width: 900px) {
  body { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }
  .app-container { height: 90vh; border-radius: 40px; border: 8px solid #fff; box-shadow: 0 25px 70px rgba(0,0,0,0.15); transform: translateZ(0); }
}

#auth-screen {
  /* 修复：使用min-height替代height:100%，允许键盘弹出时滚动 */

  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, var(--pink-bg) 0%, var(--primary-bg) 100%);
  z-index: 500; display: flex; flex-direction: column; justify-content: space-around; align-items: center; padding: 30px 15px; transition: opacity 0.4s; overflow-y: auto;
}
.product-showcase { width: 100%; max-width: 380px; margin-bottom: 20px; display: none; }
.product-header { text-align: center; color: var(--text-main); font-weight: bold; font-size: 16px; margin-bottom: 15px; }
.product-grid { display: flex; justify-content: center; gap: 15px; }
.product-card { background: rgba(255,255,255,0.7); border-radius: 20px; width: 33%; overflow: hidden; text-align: center; border: 3px solid transparent; box-shadow: var(--shadow-sm); transition: 0.2s; cursor: pointer;}
.product-card img, .product-card svg { width: 100%; height: 100px; display: block; object-fit: cover; border-bottom: 1px solid #f0f0f0; background: #fff;}
.product-name { font-size: 11px; font-weight: bold; color: var(--text-main); padding: 8px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;}
.product-card.selected { border-color: var(--accent); background: #fff; box-shadow: 0 6px 15px rgba(255,143,171,0.2); transform: scale(1.05);}

.auth-card { background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); width: 100%; max-width: 360px; border-radius: 30px; padding: 25px; box-shadow: var(--shadow-md); text-align: center; }
.auth-tabs { display: flex; margin-bottom: 20px; background: rgba(0,0,0,0.05); border-radius: 15px; padding: 5px; }
.auth-tab { flex: 1; padding: 10px; font-size: 14px; font-weight: bold; color: var(--text-light); border-radius: 12px; cursor: pointer; transition: 0.3s; }
.auth-tab.active { background: var(--white); color: var(--accent); box-shadow: var(--shadow-sm); }
.styled-input { width: 100%; padding: 14px 15px; border-radius: 15px; border: 1px solid transparent; background: #f0f0f0; margin-bottom: 12px; font-size: 16px; outline: none; transition: 0.3s; font-weight: bold; color: var(--text-main);}
.styled-input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(255,143,171,0.2);}
.full-btn { width: 100%; padding: 15px; border-radius: 15px; background: linear-gradient(135deg, var(--accent) 0%, #ff7597 100%); color: white; font-size: 16px; font-weight: bold; box-shadow: 0 6px 15px rgba(255,143,171,0.3);}
.sec-btn { width: 100%; padding: 15px; border-radius: 15px; background: #fff; color: var(--accent); font-size: 16px; font-weight: bold; border: 2px solid var(--accent); box-shadow: 0 4px 10px rgba(255,143,171,0.1); margin-top: 10px;}

#main-app { display: none; width: 100%; height: 100%; flex-direction: column; }
.page {
    flex: 1 1 0% !important;
    min-height: 0;
    height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain;
    padding-bottom: calc(105px + env(safe-area-inset-bottom, 0px));
    display: none;
    width: 100%;
    will-change: opacity, transform;
    position: relative;
    transition: opacity 0.2s ease, transform 0.2s ease;
    scroll-behavior: smooth;
}
/* 修复华为等安卓手机无法滚动的问题 */
.page.active { display: block; overflow-y: auto !important; -webkit-overflow-scrolling: touch; animation: pageFadeIn 0.4s ease forwards; }
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.home-bg { background: linear-gradient(180deg, #e6d8c3 0%, var(--primary-bg) 50%); min-height: 100%; position: relative; display: flex; flex-direction: column;}
.top-bar { display: flex; justify-content: space-between; padding: 25px 20px 10px; align-items: flex-start; z-index: 5;}
.pet-info { display: flex; align-items: center; background: rgba(255,255,255,0.6); padding: 5px 15px 5px 5px; border-radius: 30px; backdrop-filter: blur(10px); box-shadow: var(--shadow-sm);}
.pet-avatar { width: 44px; height: 44px; background: var(--white); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 26px; margin-right: 12px; }
.pet-status { font-size: 12px; color: #2ecc71; font-weight: bold; margin-top: 2px;}
.stats-container { padding: 0 20px; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; z-index: 5;}
.stat-badge { background: rgba(214, 198, 178, 0.35); padding: 6px 14px; border-radius: 20px; font-size: 13px; color: var(--text-main); font-weight: bold; display: flex; align-items: center; gap: 4px; backdrop-filter: blur(5px);}

.marquee-wrap { background: rgba(255, 255, 255, 0.75); padding: 8px 15px; margin: 15px 20px 0; border-radius: 20px; box-shadow: var(--shadow-sm); display: none; align-items: center; gap: 8px; font-size: 13px; font-weight: bold; color: #d35400; backdrop-filter: blur(5px); z-index: 5;}

.bird-container { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; margin-top: -20px; z-index: 1; min-height: 250px;}
.bird-display { position: relative; cursor: pointer; user-select: none; transition: 0.2s; }
.bird-display:active { transform: scale(0.95); }

#main-bird { width: 220px; height: 220px; display: flex; justify-content: center; align-items: center; } 
.bird-svg { width: 100%; height: 100%; filter: drop-shadow(0 15px 20px rgba(0,0,0,0.08)); overflow: visible; }

.bird-body { animation: breathe 3s infinite ease-in-out; transform-origin: center 80px; }
@keyframes breathe {
    0%, 100% { transform: scaleX(1) scaleY(1); }
    50% { transform: scaleX(1.02) scaleY(0.96); }
}

.eye { animation: blink 4.5s infinite; }
@keyframes blink {
    0%, 95%, 98%, 100% { transform: scaleY(1); }
    96%, 99% { transform: scaleY(0.1); }
}

.poked-anim .bird-body { animation: happyBounce 0.5s cubic-bezier(0.28, 0.84, 0.42, 1) both !important; }
@keyframes happyBounce {
    0% { transform: scale(1) translateY(0); }
    30% { transform: scale(0.85, 1.15) translateY(-25px); }
    50% { transform: scale(1.08, 0.92) translateY(5px); }
    70% { transform: scale(0.96, 1.04) translateY(-3px); }
    100% { transform: scale(1) translateY(0); }
}

/* 互动动作2：开心转圈圈 (通过左右翻转压缩模拟) */
  .spin-anim .bird-body { animation: spinAround 0.6s ease-in-out both !important; }
  @keyframes spinAround {
      0% { transform: scaleX(1) scaleY(1); }
      50% { transform: scaleX(-1) scaleY(0.9); }
      100% { transform: scaleX(1) scaleY(1); }
  }

  /* 互动动作3：摇头晃脑 */
  .shake-anim .bird-body { animation: shakeHead 0.5s ease-in-out both !important; }
  @keyframes shakeHead {
      0%, 100% { transform: rotate(0deg); }
      25% { transform: rotate(-15deg); }
      75% { transform: rotate(15deg); }
  }

/* 旧版emoji装扮层已迁移到SVG内渲染，隐藏 */
.equip-layer { display: none !important; }

.speech-bubble { position: absolute; top: -50px; background: #fff; padding: 10px 18px; border-radius: 20px; font-size: 14px; color: var(--text-main); font-weight: bold; box-shadow: 0 8px 20px rgba(0,0,0,0.1); opacity: 0; transform: translateY(10px); transition: all 0.3s; pointer-events: none; z-index: 10; white-space: nowrap;}
.speech-bubble.show { opacity: 1; transform: translateY(0); }
.speech-bubble::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); border-width: 8px 8px 0; border-style: solid; border-color: #fff transparent transparent transparent; }

.fab-interact {
  position: relative;
  margin: 0 auto 40px auto; 
  width: max-content;
  background: linear-gradient(135deg, var(--accent) 0%, #ff7597 100%);
  color: white; padding: 15px 40px; border-radius: 30px; font-size: 18px; font-weight: bold;
  box-shadow: 0 10px 25px rgba(255,143,171,0.4); z-index: 10; display: flex; align-items: center; gap: 10px; letter-spacing: 2px;
}

.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px 10px; padding: 10px; }
.action-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; font-weight: bold; color: var(--text-main); cursor: pointer;}
.action-icon { width: 50px; height: 50px; background: #fdfaf7; border-radius: 16px; display: flex; justify-content: center; align-items: center; font-size: 24px; transition: transform 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.05);}
.action-btn:active .action-icon { transform: scale(0.9); background: #f0e9e4; }

.diary-bg, .friends-bg, .profile-bg { padding: 25px 20px; min-height: 100%; background-color: var(--pink-bg);}
.friends-bg { background-color: #fdf5f7; }
.date-header { display: flex; justify-content: space-between; align-items: center; font-size: 16px; font-weight: bold; color: var(--text-main); margin-bottom: 20px; background: rgba(255,255,255,0.7); padding: 12px 18px; border-radius: 20px; backdrop-filter: blur(10px); box-shadow: var(--shadow-sm);}
.card-box { background: var(--white); padding: 20px; border-radius: 24px; box-shadow: var(--shadow-sm); margin-bottom: 20px;}
.menu-list { background: var(--white); border-radius: 24px; overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow-sm);}
.menu-item { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f9f9f9; color: var(--text-main); font-size: 15px; font-weight: bold; cursor: pointer; transition: background 0.2s;}
.menu-item:active { background: #f5f5f5; }
.menu-item:last-child { border-bottom: none; }
.logout-btn { justify-content: center; color: #ff6b81; border-bottom: none; background: #fff4f6;}
.user-header { display: flex; flex-direction: row; align-items: center; background: rgba(255,255,255,0.5); padding: 20px; border-radius: 24px; backdrop-filter: blur(5px); box-shadow: var(--shadow-sm); margin-bottom: 25px;}
.user-avatar { width: 65px; height: 65px; min-width: 65px; background: var(--white); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 32px; margin-right: 18px; box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);}
.user-info { display: flex; flex-direction: column; align-items: flex-start; justify-content: center;}

.bottom-nav { position: absolute; bottom: 0; width: 100%; height: calc(85px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); display: flex; justify-content: center; gap: 3px; align-items: flex-start; padding-top: 10px; border-radius: 35px 35px 0 0; box-shadow: 0 -5px 25px rgba(0,0,0,0.05); z-index: 100; }
.nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-light); font-size: 10px; font-weight: bold; cursor: pointer; padding: 5px 8px; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); position: relative; min-width: 55px; flex: 1; max-width: 65px; }
.nav-icon { font-size: 22px; margin-bottom: 3px; filter: grayscale(100%); opacity: 0.4; transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); transform: scale(0.9); position: relative;}
.nav-item.active { color: var(--text-main); }
.nav-item.active .nav-icon { filter: grayscale(0%); opacity: 1; transform: scale(1.15) translateY(-2px); }

.badge-dot { display: none; position: absolute; top: -5px; right: -10px; background: #ff4757; color: white; font-size: 10px; font-weight: bold; padding: 2px 6px; border-radius: 10px; line-height: 1; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(255,71,87,0.4); z-index: 10;}

.toast { position: absolute; top: 20%; left: 50%; transform: translate(-50%, -50%) scale(0.9); background: rgba(0,0,0,0.85); color: white; padding: 12px 25px; border-radius: 30px; font-size: 14px; font-weight: bold; opacity: 0; transition: all 0.3s; pointer-events: none; z-index: 999; white-space: nowrap; box-shadow: 0 10px 20px rgba(0,0,0,0.15); backdrop-filter: blur(5px);}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    animation: fadeIn 0.25s ease;
}
.modal-overlay.show { display: flex; opacity: 1; }
.modal-box { background: var(--white); width: 92%; max-width: 360px; border-radius: 32px; padding: 25px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); transform: translateY(30px) scale(0.95); transition: all 0.3s; max-height: 85dvh; overflow-y: auto; display: flex; flex-direction: column;}
.modal-overlay.show .modal-box { transform: translateY(0) scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 18px; font-weight: bold; color: var(--text-main); flex-shrink: 0;}
.close-btn { background: #f5f5f5; width: 34px; height: 34px; border-radius: 50%; display: flex; justify-content: center; align-items: center; color: #888; font-weight: bold; cursor: pointer; transition: 0.2s;}
#modal-content-area { display: flex; flex-direction: column; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; } 

.checkin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 15px; }
.checkin-day { background: #f9f9f9; border-radius: 16px; padding: 12px 0; text-align: center; color: var(--text-light); font-size: 13px; font-weight: bold; transition: 0.2s; border: 2px solid transparent;}
.checkin-day.claimed { background: #fff4f6; color: var(--accent); }
.checkin-day.today { background: linear-gradient(135deg, var(--accent) 0%, #ff7597 100%); color: white; box-shadow: 0 6px 15px rgba(255,143,171,0.4); transform: scale(1.05);}
.store-item { display: flex; align-items: center; justify-content: space-between; padding: 15px; background: #fafafa; border-radius: 20px; margin-bottom: 12px; border: 1px solid #f0f0f0; transition: 0.2s;}
.buy-btn { background: var(--text-main); color: white; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: bold;}
.gacha-box { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); border-radius: 24px; padding: 30px; text-align: center; color: white; margin-bottom: 20px; box-shadow: 0 10px 20px rgba(161,140,209,0.3);}
.wardrobe-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 15px;}
.wardrobe-item { background: #f9f9f9; border-radius: 16px; padding: 15px 0; text-align: center; font-size: 26px; cursor: pointer; transition: 0.2s;}
.wardrobe-item.equipped { border: 2px solid var(--accent); background: #fff4f6; box-shadow: 0 4px 10px rgba(255,143,171,0.2);}
.cert-card { background: linear-gradient(180deg, #fdfbfb 0%, #ebedee 100%); border: 4px solid #ebd4a8; border-radius: 24px; padding: 25px; text-align: center; box-shadow: inset 0 0 20px rgba(0,0,0,0.05), 0 10px 20px rgba(0,0,0,0.1);}
.rps-btn { font-size: 45px; background: #f9f9f9; border-radius: 50%; width: 70px; height: 70px; display: inline-flex; justify-content: center; align-items: center; margin: 0 5px; box-shadow: var(--shadow-sm);}

.admin-dashboard { background: #fff; padding: 15px; border-radius: 15px; box-shadow: var(--shadow-sm); margin-bottom: 15px; }
.admin-stat { display: flex; justify-content: space-between; border-bottom: 1px dashed #eee; padding: 8px 0; font-size: 14px;}
.admin-list { max-height: 250px; overflow-y: auto; background: #fafafa; border-radius: 10px; padding: 10px; font-size: 13px;}

.chat-box { flex: 1 1 auto; background: #f5f5f5; border-radius: 20px; padding: 15px; min-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; margin-bottom: 15px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);}
.chat-row { display: flex; flex-direction: column; }
.chat-row.me { align-items: flex-end; }
.chat-row.them { align-items: flex-start; }
.chat-bubble { max-width: 85%; padding: 10px 14px; font-size: 14px; font-weight: bold; line-height: 1.5; word-break: break-all; }
.chat-row.me .chat-bubble { background: linear-gradient(135deg, var(--accent) 0%, #ff7597 100%); color: white; border-radius: 16px 16px 2px 16px; box-shadow: 0 4px 10px rgba(255,143,171,0.2);}
.chat-row.them .chat-bubble { background: #ffffff; border: 1px solid #e8e8e8; color: var(--text-main); border-radius: 16px 16px 16px 2px; box-shadow: 0 3px 12px rgba(0,0,0,0.08); }
.chat-time { font-size: 10px; color: #aaa; margin-bottom: 4px; }
.chat-input-wrapper { display:flex; gap:10px; margin-top:5px; align-items:stretch; flex-shrink:0; padding-bottom: 5px;}

/* ✨ 新增：沉浸式陪伴模式样式 */
.immersive-active .top-bar,
.immersive-active .stats-container,
.immersive-active .marquee-wrap,
.immersive-active .bottom-nav,
.immersive-active .fab-interact,
.immersive-active .speech-bubble {
    opacity: 0 !important; pointer-events: none !important; transition: opacity 0.5s ease;
}
.exit-immersive-btn {
    position: absolute; top: env(safe-area-inset-top, 25px); right: 20px; z-index: 100;
    background: rgba(0,0,0,0.3); color: white; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: bold;
    opacity: 0; pointer-events: none; transition: opacity 0.5s ease; cursor: pointer; backdrop-filter: blur(5px);
}
.immersive-active .exit-immersive-btn { opacity: 1; pointer-events: auto; }

/* ✨ 新增：明信片样式 */
.postcard-box { background: #fff9e6; border: 2px dashed #f39c12; border-radius: 15px; padding: 20px; margin-top: 15px; position: relative; }
.postcard-box::before { content: '📮'; position: absolute; top: -15px; right: -10px; font-size: 30px; transform: rotate(15deg); }

/* ✨ 全局高级质感覆写 ✨ */

/* 1. 毛玻璃卡片 */
.card-box, .menu-list, .admin-dashboard {
    background: var(--card-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border) !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: 24px;
}

/* 2. 菜单栏优化：去掉生硬的分割线，增加留白 */
.menu-item { border-bottom: 1px solid rgba(0,0,0,0.03); padding: 20px 20px; font-weight: 600;}

/* 3. 按钮高级感：增加渐变光影和弹性阻尼动画 */
.full-btn {
    background: linear-gradient(135deg, var(--accent) 0%, #ff758c 100%);
    box-shadow: 0 8px 20px rgba(255, 77, 109, 0.25);
    border-radius: 16px;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.full-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 25px rgba(255, 77, 109, 0.35); }
.full-btn:active { transform: scale(0.96); box-shadow: 0 4px 10px rgba(255, 77, 109, 0.15); }

/* 卡片悬浮效果 */
.card-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* 导航项hover效果 */
.nav-item:hover {
    background: rgba(255, 143, 171, 0.1);
    border-radius: 12px;
}
.nav-item {
    transition: all 0.3s ease;
}

/* 4. 底部导航栏和图标大小重构 */
.bottom-nav { background: rgba(255, 255, 255, 0.85); border-top: 1px solid rgba(255,255,255,0.5); }
.nav-icon { font-size: 26px; margin-bottom: 2px; }
.nav-item.active .nav-icon { color: var(--accent); transform: scale(1.1) translateY(-2px); filter: none; }
.action-icon { font-size: 26px; color: var(--text-main); background: #fff; box-shadow: var(--shadow-sm); }
.action-icon i { color: var(--text-main); }

/* 5. 弹窗极简高级排版 */
.modal-header {
    /* 强制使用高级系统原生无衬线字体 */
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", sans-serif !important;
    font-size: 19px !important; 
    font-weight: 800 !important; 
    letter-spacing: 1.5px; /* 微微拉开字间距，呼吸感拉满 */
    justify-content: center !important; /* 标题居中显示 */
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.05); /* 底部加一条极细的分割线 */
    padding-bottom: 15px;
    margin-bottom: 15px;
}

/* 优化右上角的关闭按钮 */
.close-btn {
    position: absolute;
    right: 0;
    background: transparent !important; /* 去掉原本灰色的廉价圆底 */
    color: #c7c7cc !important; /* 经典的高级浅灰色 */
    font-size: 22px;
}
.close-btn:active { color: var(--accent) !important; }

/* ✨ 修复重叠：强制赋予高级毛玻璃与纯色背景 ✨ */

/* 1. 意见反馈等模态弹窗 */
.modal-box {
    background: var(--card-bg) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

/* 2. 登录界面的白色卡片 */
.auth-card {
    background: var(--card-bg) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--card-border) !important;
    box-shadow: var(--shadow-md) !important;
    position: relative;
    z-index: 10; /* 确保它盖住底部的所有元素 */
}

/* 3. 修复变成透明字的提示气泡 (Toast) */
.toast { 
    background: rgba(0,0,0,0.85) !important; /* 强制黑色半透明背景 */
    color: #ffffff !important; 
    font-weight: bold !important;
    padding: 14px 28px !important; 
    border-radius: 30px !important; 
    z-index: 99999 !important; /* 提到最高层级，绝对不再被遮挡 */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2) !important;
}

/* ✨ 终极修复苹果 iOS/iPad 无法滑动页面 ✨ */

/* 1. 锁死主框架，绝对不许被子元素撑大 */
#main-app {
    height: 100% !important;
    overflow: hidden !important; 
}

/* 2. 强制页面区块内部滚动 (苹果 Safari 救星代码) */


/* 3. 顺手把登录页、弹窗、聊天框的苹果丝滑滚动也开启 */
#auth-screen, .modal-box, .chat-box, .admin-list {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
}

/* ===== 修复注册页面键盘弹出时无法滚动 ===== */
#auth-screen {
    min-height: 100% !important;
    height: auto !important;
    /* 确保键盘弹出时内容可以滚动 */
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
}

/* 注册页面输入框获得焦点时，确保可见 */
#auth-screen .styled-input:focus {
    scroll-margin-bottom: 300px; /* 键盘上方留出空间 */
}

.auth-card {
    scroll-margin-bottom: 300px;
}
/* ============================================
   📱 安全区适配
   ============================================ */

/* 刘海屏/灵动岛安全区适配 */
:root {
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============================================
   🌙 深色模式自动适配
   ============================================ */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a2e;
        color: #eee;
    }
    
    .card {
        background-color: #16213e;
        border-color: #0f3460;
    }
}

/* ============================================
   🌙 深色模式自动适配
   ============================================ */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a2e;
        color: #eee;
    }
    
    .card {
        background-color: #16213e;
        border-color: #0f3460;
    }
}

/* ============================================
   ⚡ 减弱动态效果模式（无障碍）
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   ⚡ 加载速度优化
   ============================================ */

/* 字体显示优化 */
* {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 图片懒加载占位 */
img {
    content-visibility: auto;
}

/* 硬件加速 */
.btn, .card, .modal {
    transform: translateZ(0);
    will-change: transform;
}

/* ============================================
   ✨ 交互动画优化
   ============================================ */

/* 按钮点击效果 */
.btn:active, .button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* 卡片悬浮效果 */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 弹跳效果 */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 0.5s ease;
}


/* ======================================== */
/* ✨ 新增：交互体验优化 */
/* ======================================== */

/* 1. 按钮hover悬浮效果 */
.full-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 77, 109, 0.35);
}

.sec-btn {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.sec-btn:hover {
    transform: translateY(-1px);
    background: #f8f9fa;
}

.buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.2);
}

/* 2. 底部导航hover效果 */
.nav-item {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
}
.nav-item:hover .nav-icon {
    transform: scale(1.05);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    animation: navDot 0.3s ease;
}
@keyframes navDot {
    from { transform: translateX(-50%) scale(0); }
    to { transform: translateX(-50%) scale(1); }
}

/* 3. 输入框focus效果 */
.styled-input:focus {
    background: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 143, 171, 0.15);
    transform: translateY(-1px);
}

/* 4. 互动玩法网格按钮hover */
.action-btn {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.action-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.action-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* 5. 商店商品卡片hover */
.store-item {
    transition: all 0.3s ease;
}
.store-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(3px);
}

/* 6. 装扮物品hover */
.wardrobe-item {
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.wardrobe-item:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* 7. 签到日历项hover动画 */
.checkin-day:not(.claimed) {
    transition: all 0.3s ease;
}
.checkin-day.today:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 143, 171, 0.3);
}

/* 8. 朋友列表项hover */
.friend-item {
    transition: all 0.3s ease;
}
.friend-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

/* 9. Toast提示气泡出现动画 */
.toast {
    animation: toastIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 10. 弹窗出现动画优化 */
.modal-box {
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 11. 成就弹出动画 */
.achievement-popup {
    animation: achievementPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes achievementPop {
    0% { opacity: 0; transform: scale(0.5) translateY(50px); }
    50% { transform: scale(1.05) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 12. 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* 13. 文字选择颜色 */
::selection {
    background: rgba(255, 143, 171, 0.3);
    color: var(--text-main);
}

/* 14. 产品选择卡片hover */
.product-card:hover {
    border-color: rgba(255, 143, 171, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* 15. 管理员Tab切换动画 */
.admin-tab {
    transition: all 0.3s ease;
}
.admin-tab:hover {
    background: rgba(255, 143, 171, 0.1);
}


/* ========== 简单安全的动画优化 ========== */

/* 小鸟呼吸动画 */
@keyframes breathe {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.02) translateY(-3px); }
}
#main-bird {
    animation: breathe 3s ease-in-out infinite;
}

/* 按钮点击效果 */
.primary-btn:active {
    transform: scale(0.96);
}

/* 输入框聚焦效果 */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 143, 171, 0.15);
}

/* 模态框淡入 */

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

/* 模态框缩放入场 */
.modal-box {
    animation: modalIn 0.3s ease;
}
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 图表高度限制 */
#adminChart {
    max-height: 180px !important;
    height: 180px !important;
    width: 100% !important;
}

/* ===== 页面流畅度优化 ===== */


/* 页面切换动画 */
.page.active {
    opacity: 1;
    transform: translateY(0);
}

/* 输入框样式优化 */
.styled-input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.15);
}

/* 按钮点击时的额外视觉反馈 */
.full-btn:active {
    transform: scale(0.96);
    box-shadow: 0 3px 8px rgba(255,143,171,0.3);
}

.sec-btn:active {
    transform: scale(0.96);
    background: #fff5f7;
}

/* 防止页面滚动时出现跳动 */
html {
    scroll-behavior: smooth;
}

/* 文本选择优化 */
::selection {
    background: rgba(255, 77, 109, 0.2);
    color: var(--text-main);
}

/* 卡片悬停效果增强 */
.card-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(149, 157, 165, 0.12);
}

.card-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 好友列表项悬停效果 */
.friends-list-ul .card-box:hover {
    transform: translateY(0);
}

/* 按钮加载状态 */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* 图片懒加载过渡 */
img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* 防止文字换行导致的布局抖动 */
.no-wrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 深色模式适配增强 */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-bg: #1c1c1e;
        --card-bg: rgba(44, 44, 46, 0.75);
        --card-border: rgba(60, 60, 62, 0.8);
        --text-main: #f2f2f7;
        --text-light: #8e8e93;
        --bg-secondary: rgba(255,255,255,0.08);
        --border-color: rgba(255,255,255,0.1);
    }
    
    body { background-color: #000; }
    
    .card-box, .menu-list, .auth-card {
        background: rgba(44, 44, 46, 0.9);
    }
    
    .styled-input {
        background: rgba(255,255,255,0.08);
        color: #f2f2f7;
    }
    
    .sec-btn {
        background: rgba(44, 44, 46, 0.9);
        border-color: rgba(255,255,255,0.2);
    }
    
    .bottom-nav {
        background: rgba(28, 28, 30, 0.95);
    }
    
    .modal-box {
        background: #2c2c2e;
    }
}

/* 小屏幕适配 */
@media (max-width: 320px) {
    .nav-item {
        padding: 5px 4px;
        min-width: 48px;
    }
    
    .nav-icon {
        font-size: 20px;
    }
    
    .nav-item span {
        font-size: 9px;
    }
    
    .action-grid {
        gap: 10px 5px;
    }
    
    .action-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
}

/* 横屏适配 */
@media (max-height: 500px) and (orientation: landscape) {
    .bottom-nav {
        height: calc(70px + env(safe-area-inset-bottom, 0px));
        padding-top: 5px;
    }
    
    .page {
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
    }
    
    .action-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   🔹 BALANCED VERSION - v37
   美观与性能的平衡点
   ============================================ */

/* ===== 重置所有 !important 强制 ===== */
.store-item, .achievement-item, .settings-item, .post-card, .friend-item,
.modal-content, .bottom-nav, input[type="text"], input[type="password"], textarea,
.chat-bubble.other, .stat-card, body, .nav-btn, .modal-btn-primary,
.modal-btn-secondary, .page-content, .stat-value, .modal-title,
.achievement-icon {
  backdrop-filter: unset !important;
  -webkit-backdrop-filter: unset !important;
  background: unset !important;
  background-image: unset !important;
  border: unset !important;
  border-radius: unset !important;
  box-shadow: unset !important;
  transition: unset !important;
  padding: unset !important;
  margin-bottom: unset !important;
  color: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  background-clip: unset !important;
  animation: unset !important;
}

/* ===== 优雅背景 - 有渐变但无动画 ===== */
body {
  background: linear-gradient(135deg, #fef9ff 0%, #f5f7ff 50%, #f0f9ff 100%) !important;
  background-attachment: fixed !important;
}

/* ===== 卡片：保留轻量毛玻璃 ===== */
.store-item, .achievement-item, .settings-item, .post-card, .friend-item {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-radius: 20px !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
  transition: transform 0.2s ease !important;
  padding: 18px !important;
  margin-bottom: 14px !important;
}

.store-item:hover, .achievement-item:hover, .settings-item:hover,
.post-card:hover, .friend-item:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
}

/* ===== 按钮：保留渐变但无扫光动画 ===== */
.modal-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3) !important;
  transition: all 0.2s ease !important;
  padding: 13px 26px !important;
}

.modal-btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4) !important;
}

.modal-btn-secondary {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s ease !important;
  padding: 13px 26px !important;
}

.modal-btn-secondary:hover {
  transform: translateY(-1px) !important;
  border-color: #cbd5e1 !important;
}

/* ===== 底部导航：毛玻璃但无复杂效果 ===== */
.bottom-nav {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04) !important;
  padding: 10px 18px 28px !important;
}

.nav-btn {
  transition: all 0.2s ease !important;
  border-radius: 16px !important;
  padding: 8px 12px !important;
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.08) 100%) !important;
  color: #667eea !important;
  transform: translateY(-2px) !important;
}

.nav-btn:hover:not(.active) {
  background: rgba(0, 0, 0, 0.04) !important;
}

/* ===== 模态框：毛玻璃但简单 ===== */
.modal-content {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  padding: 24px !important;
}


/* ===== 输入框 ===== */
input[type="text"], input[type="password"], textarea {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 14px !important;
  transition: all 0.2s ease !important;
  padding: 14px 18px !important;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  outline: none !important;
}

/* ===== 统计卡片 ===== */
.stat-card {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  transition: transform 0.2s ease !important;
  padding: 18px 14px !important;
}

.stat-card:hover {
  transform: translateY(-3px) !important;
}

.stat-value {
  color: #667eea !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  background: none !important;
}

/* ===== 聊天气泡 ===== */
.chat-bubble {
  border-radius: 18px !important;
  padding: 12px 16px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

.chat-bubble.me {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border-bottom-right-radius: 6px !important;
}

.chat-bubble.other {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: #1f2937 !important;
  border-bottom-left-radius: 6px !important;
}

/* ===== 成就徽章 ===== */
.achievement-icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%) !important;
  border-radius: 50% !important;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3) !important;
}

/* ===== 页面切换：只保留淡入淡出 ===== */
.page-content {
  transition: opacity 0.25s ease-out !important;
}

/* ===== 标题渐变 ===== */
.modal-title {
  background: linear-gradient(135deg, #1f2937 0%, #667eea 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ===== 深色模式 ===== */
body.dark-mode {
  background: linear-gradient(135deg, #0f172a 0%, #1a1a2e 100%) !important;
}

body.dark-mode .store-item,
body.dark-mode .achievement-item,
body.dark-mode .settings-item,
body.dark-mode .post-card,
body.dark-mode .friend-item {
  background: rgba(30, 41, 59, 0.85) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .modal-content {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
}

body.dark-mode .bottom-nav {
  background: rgba(30, 41, 59, 0.9) !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}


/* ========== UI Global Enhancement ========== */

/* 1. Better stat badges - glassmorphism */
.stat-badge {
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-main);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 2. Enhanced card styles - hover lift */
.card-box, .menu-item, .store-item {
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s ease;
}
.card-box:hover, .menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* 3. Bottom nav bar - active indicator animation */
.bottom-nav .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    animation: navDot 0.3s ease;
}
@keyframes navDot {
    from { width: 0; opacity: 0; }
    to { width: 20px; opacity: 1; }
}

/* 4. Button press ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s, opacity 0.4s;
    opacity: 0;
}
.btn-ripple:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
    transition: 0s;
}

/* 5. Toast notification improvement */
#global-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    z-index: 99999;
    backdrop-filter: blur(10px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
#global-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* 6. Modal dialog polish */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.modal-content {
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 7. Scrolling smoothness */


/* ===== 修复站长专属控制台移动端点击问题 ===== */
#admin-menu-container {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    position: relative !important;
    z-index: 10 !important;
}

#admin-menu-container .menu-item {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    position: relative !important;
}

/* 确保modal-overlay不会残留 */
.modal-overlay:not(.show) {
    display: none !important;
    pointer-events: none !important;
}

.modal-overlay.show {
    display: flex !important;
    pointer-events: auto !important;
}

/* 增强所有menu-item的触摸响应 */
.menu-item {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}


/* ===== 防止 iOS 输入框自动缩放（font-size>=16px） ===== */
.styled-input, .auth-card input, #auth-screen input, #auth-screen textarea {
    font-size: 16px !important; /* iOS 不会对16px及以上的输入框自动缩放 */
    -webkit-appearance: none;
    -webkit-border-radius: 15px;
}

/* 注册页面整体可滚动优化 */
#auth-screen .product-showcase {
    flex-shrink: 0;
}

#auth-screen .auth-card {
    flex-shrink: 0;
    margin-bottom: 40px; /* 底部留出更多空间，防止按钮被遮挡 */
}
