/**
 * @file 基础样式：主题变量、页面骨架、头部、页脚、提示条
 * @version 1.0.0
 * @date 2026-11-09
 * @description 移动端优先的深色主题基础层，列表相关样式见 watchlist.css。
 */

:root {
  --color-bg: #0b1020;
  --color-bg-soft: #111a2e;
  --color-panel: #131c31;
  --color-border: #1f2a42;
  --color-text: #e8eefc;
  --color-muted: #8b9ab8;
  --color-up: #f6465d;
  --color-down: #2ebd85;
  --color-accent: #f0b90b;
  --radius-lg: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(240, 185, 11, 0.12), transparent 42%),
    radial-gradient(circle at 100% 0%, rgba(46, 189, 133, 0.1), transparent 38%),
    var(--color-bg);
  color: var(--color-text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app-shell {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.brand-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-tag {
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-muted);
  font-size: 11px;
  letter-spacing: 1px;
}

.status {
  color: var(--color-muted);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-muted);
  flex: none;
}

.status[data-state="live"]::before {
  background: var(--color-down);
  box-shadow: 0 0 0 4px rgba(46, 189, 133, 0.18);
}

.status[data-state="loading"]::before {
  background: var(--color-accent);
  animation: pulse 1s ease-in-out infinite;
}

.status[data-state="error"]::before {
  background: var(--color-up);
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.app-footer {
  color: #55627d;
  font-size: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  max-width: min(88vw, 460px);
  padding: 11px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #1a2439;
  color: var(--color-text);
  font-size: 13px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-type="success"] {
  border-color: rgba(46, 189, 133, 0.45);
}

.toast[data-type="warn"] {
  border-color: rgba(240, 185, 11, 0.45);
}

.toast[data-type="error"] {
  border-color: rgba(246, 70, 93, 0.5);
}

@media (max-width: 480px) {
  .app-shell {
    padding: 16px 12px 28px;
  }

  .brand-title {
    font-size: 23px;
  }
}
