/* ==================== CooChrip v10 · 布局 ==================== */

.app-container {
  display: flex; flex-direction: column;
  height: 100vh; max-width: 1240px; margin: 0 auto;
  position: relative; padding: 16px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; margin-bottom: 16px;
  border-radius: var(--radius-lg); flex-shrink: 0;
  transition: all 0.4s var(--ease);
}
.topbar.scrolled { background: var(--glass-bg-strong); box-shadow: 0 8px 32px rgba(74,144,217,0.1); }

.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-logo-wrap { position: relative; }
.brand-logo {
  width: 36px; height: 36px; object-fit: contain;
  animation: float-gif 4s ease-in-out infinite;
  position: relative; z-index: 1;
}
.brand-glow {
  position: absolute; inset: -6px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.3; filter: blur(8px);
  animation: glow-pulse 3s ease-in-out infinite;
}
.brand-name { font-size: 15px; font-weight: 500; letter-spacing: 0.05em; }
.brand-sub { font-size: 10px; color: var(--text-secondary); letter-spacing: 0.15em; text-transform: uppercase; }

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

/* ---------- 页面容器 ---------- */
.page-container {
  flex: 1;
  overflow-y: auto;
  position: relative;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}
.page { display: none; flex-direction: column; gap: 16px; animation: fadeIn 0.5s var(--ease); }
.page.active { display: flex; }

/* ---------- 面板 ---------- */
.panel { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel-head-actions { display: flex; gap: 8px; }
.panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-secondary);
}
.panel-title img { width: 22px; height: 22px; object-fit: contain; animation: float-gif 4s ease-in-out infinite; }
.panel-title-spaced { margin-bottom: 12px; }

/* ---------- 底部导航 ---------- */
.bottom-nav {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 540px;
  display: flex;
  justify-content: space-around;
  padding: 6px;
  border-radius: 999px;
  z-index: 100;
}
.nav-item {
  position: relative; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  padding: 8px 12px; border-radius: 999px;
  transition: all 0.4s var(--ease);
  color: var(--text-tertiary); font-family: inherit; flex: 1;
}
.nav-item img {
  width: 22px; height: 22px; object-fit: contain;
  filter: grayscale(100%); opacity: 0.5;
  transition: all 0.4s var(--ease);
}
.nav-item span { font-size: 10px; font-weight: 500; letter-spacing: 0.05em; }
.nav-item.active {
  background: rgba(74,144,217,0.2); color: var(--accent-deep);
  box-shadow: 0 4px 16px rgba(74,144,217,0.25), inset 0 1px 1px rgba(255,255,255,0.6);
  transform: scale(1.02);
}
.nav-item.active img { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }

/* ---------- FAB ---------- */
.fab {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(180deg, #6BB0E8 0%, #4A90D9 100%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 24px rgba(74,144,217,0.4), inset 0 1px 0 rgba(255,255,255,0.6);
  cursor: pointer; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s var(--ease-spring);
  opacity: 0; pointer-events: none;
}
.fab.visible { opacity: 1; pointer-events: auto; }
.fab:hover { transform: scale(1.08) rotate(-5deg); }
.fab:active { transform: scale(0.95); }
.fab img { width: 26px; height: 26px; object-fit: contain; filter: brightness(2); }