/* Global styles: dark glassmorphism theme */
:root{
  --bg-gradient: radial-gradient(1200px 800px at 10% 10%, #0f1b2d 0%, #0b1220 40%, #070b13 100%);
  --panel-bg: rgba(255,255,255,0.06);
  --card-bg: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.16);
  --text-1: #eef2ff;
  --text-2: #c7d2fe;
  --text-3: #94a3b8;
  --chip-bg: rgba(255,255,255,0.1);
  --chip-ghost-bg: rgba(255,255,255,0.06);
  --chip-warn-bg: rgba(255, 184, 0, 0.16);
  --accent-from: #7a5cff;
  --accent-to: #2ad1ff;
  --shadow-1: 0 8px 30px rgba(0,0,0,0.3);
  --shadow-2: 0 4px 16px rgba(0,0,0,0.28);
  --radius-1: 16px;
  --radius-2: 14px;
  --radius-3: 12px;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0; padding: 0; height: 100%;
  background: var(--bg-gradient);
  color: var(--text-1);
  font-family: Inter, MiSans, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

.app{ max-width: 1200px; margin: 0 auto; padding: 32px 20px 80px; }

.app-header{ margin-bottom: 16px; }
.title{ font-size: 28px; letter-spacing: .5px; margin: 0 0 6px; }
.subtitle{ margin: 0; color: var(--text-3); font-size: 14px; }

/* Tabs - main navigation */
.tabs{
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(7,11,19,0.9) 0%, rgba(7,11,19,0.4) 100%);
  backdrop-filter: saturate(120%) blur(8px);
  padding: 10px; margin: 12px -8px 20px; border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-2);
}
.tab{ appearance: none; border: 1px solid var(--glass-border); color: var(--text-1); background: var(--chip-bg); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; letter-spacing: .2px; }
.tab:hover{ filter: brightness(1.05); }
.tab.is-active{ background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); border-color: transparent; color: #0b1220; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
.tab-sep{ display:inline-block; width: 1px; height: 22px; background: var(--glass-border); margin: 0 4px; }

/* Panels */
.card-panel{ background: var(--panel-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-1); box-shadow: var(--shadow-1); padding: 18px; margin-bottom: 18px; }
.panel-header{ display:flex; align-items:center; justify-content: space-between; margin-bottom: 10px; }
.panel-title{ display:flex; align-items:center; gap: 10px; }
.panel-title h2{ margin:0; font-size: 18px; }
.panel-icon{ width: 20px; height: 20px; }

/* Chips, badges */
.badges{ display:flex; gap: 6px; align-items:center; }
.badge{ padding: 6px 10px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--glass-border); font-size: 12px; font-weight: 700; color: var(--text-2); letter-spacing:.2px; }
.badge-operator{ }
.badge-network{ }
.badge-region{ background: rgba(42, 209, 255, 0.12); border-color: rgba(42,209,255,0.35); color: #9bdfff; }

.chip{ display:inline-flex; align-items:center; gap:6px; padding: 6px 10px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--glass-border); font-size: 12px; color: var(--text-2); }
.chip-ghost{ background: var(--chip-ghost-bg); color: var(--text-3); }
.chip-warn{ background: var(--chip-warn-bg); border-color: rgba(255,184,0,0.35); color: #ffd27b; }
.chip-link{ cursor: pointer; background: linear-gradient(135deg, rgba(122,92,255,0.2), rgba(42,209,255,0.2)); border-color: rgba(122,92,255,0.4); color: #bcd5ff; }
.chip-link:hover{ filter: brightness(1.05); }

/* Group (details/summary) */
.plan-group{ background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: var(--radius-2); overflow: hidden; margin: 12px 0; position: relative; }
.plan-group[open] .group-summary{ border-bottom: 1px dashed var(--glass-border); }
.group-summary{ list-style: none; display:flex; flex-direction: column; gap: 8px; padding: 12px; cursor: pointer; position: relative; }
.group-summary::-webkit-details-marker{ display:none; }
.meta{ display:flex; flex-wrap: wrap; gap: 6px; }
.group-content{ padding: 14px; }

/* Grid and cards */
.plans-grid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
@media(min-width: 720px){ .plans-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media(min-width: 980px){ .plans-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); } }
.plan-card{ background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-3); padding: 16px; display:flex; flex-direction: column; align-items:flex-start; gap: 6px; box-shadow: var(--shadow-2); transition: transform .18s ease, box-shadow .18s ease; }
.plan-card:hover{ transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.price{ font-size: 22px; font-weight: 800; background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price span{ font-size: 12px; font-weight: 600; color: var(--text-3); background: none; -webkit-background-clip: initial; color: var(--text-3); }
.quota{ font-size: 16px; color: var(--text-1); font-weight: 700; }

/* Footer */
.app-footer{ margin-top: 22px; color: var(--text-3); font-size: 12px; line-height: 1.6; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 14px; }

/* A11y focus */
:focus-visible{ outline: 2px solid rgba(42,209,255,0.9); outline-offset: 2px; border-radius: 8px; }

/* Ribbons */
.ribbon{ position: absolute; top: 10px; right: -18px; transform: rotate(45deg); padding: 6px 32px; font-size: 12px; font-weight: 800; letter-spacing: .6px; color: #0b1220; background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); box-shadow: 0 8px 24px rgba(122,92,255,0.35), 0 8px 24px rgba(42,209,255,0.25); border: 1px solid rgba(255,255,255,0.25); text-transform: uppercase; z-index: 2; pointer-events: none; }
.ribbon-hot{ background: linear-gradient(135deg, #ff7ad9, #7a5cff); color: #0b1220; }
.ribbon-value{ background: linear-gradient(135deg, #a8ff78, #78ffd6); color: #0b1220; box-shadow: 0 8px 24px rgba(120,255,214,0.35), 0 8px 24px rgba(168,255,120,0.25); }
@media (max-width: 420px){ .ribbon{ top: 8px; right: -24px; padding: 5px 28px; font-size: 11px; } }

/* Notice (announcement) */
.notice{ margin-top: 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-2); }
.notice-warning{ background: linear-gradient(180deg, rgba(255,184,0,0.10), rgba(255,184,0,0.04)); border-left: 4px solid rgba(255,184,0,0.6); }
.notice-title{ margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text-2); display:flex; align-items:center; gap:6px; }
.notice-list{ margin: 0; padding-left: 18px; color: var(--text-1); font-size: 13px; line-height: 1.6; }
.notice-list > li{ margin: 6px 0; }
.notice-sub{ margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
.notice-sub li{ margin: 4px 0; }

/* 追加：公告组件样式（已存在） */
/* Tabs - main navigation */
.tabs{
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(7,11,19,0.9) 0%, rgba(7,11,19,0.4) 100%);
  backdrop-filter: saturate(120%) blur(8px);
  padding: 10px; margin: 12px -8px 20px; border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-2);
}
.tab{ appearance: none; border: 1px solid var(--glass-border); color: var(--text-1); background: var(--chip-bg); padding: 8px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 13px; letter-spacing: .2px; }
.tab:hover{ filter: brightness(1.05); }
.tab.is-active{ background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); border-color: transparent; color: #0b1220; text-shadow: 0 1px 0 rgba(255,255,255,0.5); }
.tab-sep{ display:inline-block; width: 1px; height: 22px; background: var(--glass-border); margin: 0 4px; }

/* Panels */
.card-panel{ background: var(--panel-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-1); box-shadow: var(--shadow-1); padding: 18px; margin-bottom: 18px; }
.panel-header{ display:flex; align-items:center; justify-content: space-between; margin-bottom: 10px; }
.panel-title{ display:flex; align-items:center; gap: 10px; }
.panel-title h2{ margin:0; font-size: 18px; }
.panel-icon{ width: 20px; height: 20px; }

/* Chips, badges */
.badges{ display:flex; gap: 6px; align-items:center; }
.badge{ padding: 6px 10px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--glass-border); font-size: 12px; font-weight: 700; color: var(--text-2); letter-spacing:.2px; }
.badge-operator{ }
.badge-network{ }
.badge-region{ background: rgba(42, 209, 255, 0.12); border-color: rgba(42,209,255,0.35); color: #9bdfff; }

.chip{ display:inline-flex; align-items:center; gap:6px; padding: 6px 10px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--glass-border); font-size: 12px; color: var(--text-2); }
.chip-ghost{ background: var(--chip-ghost-bg); color: var(--text-3); }
.chip-warn{ background: var(--chip-warn-bg); border-color: rgba(255,184,0,0.35); color: #ffd27b; }
.chip-link{ cursor: pointer; background: linear-gradient(135deg, rgba(122,92,255,0.2), rgba(42,209,255,0.2)); border-color: rgba(122,92,255,0.4); color: #bcd5ff; }
.chip-link:hover{ filter: brightness(1.05); }

/* Group (details/summary) */
.plan-group{ background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: var(--radius-2); overflow: hidden; margin: 12px 0; position: relative; }
.plan-group[open] .group-summary{ border-bottom: 1px dashed var(--glass-border); }
.group-summary{ list-style: none; display:flex; flex-direction: column; gap: 8px; padding: 12px; cursor: pointer; position: relative; }
.group-summary::-webkit-details-marker{ display:none; }
.meta{ display:flex; flex-wrap: wrap; gap: 6px; }
.group-content{ padding: 14px; }

/* Grid and cards */
.plans-grid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
@media(min-width: 720px){ .plans-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media(min-width: 980px){ .plans-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); } }
.plan-card{ background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-3); padding: 16px; display:flex; flex-direction: column; align-items:flex-start; gap: 6px; box-shadow: var(--shadow-2); transition: transform .18s ease, box-shadow .18s ease; }
.plan-card:hover{ transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.price{ font-size: 22px; font-weight: 800; background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price span{ font-size: 12px; font-weight: 600; color: var(--text-3); background: none; -webkit-background-clip: initial; color: var(--text-3); }
.quota{ font-size: 16px; color: var(--text-1); font-weight: 700; }

/* Footer */
.app-footer{ margin-top: 22px; color: var(--text-3); font-size: 12px; line-height: 1.6; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 14px; }

/* A11y focus */
:focus-visible{ outline: 2px solid rgba(42,209,255,0.9); outline-offset: 2px; border-radius: 8px; }

/* Ribbons */
.ribbon{ position: absolute; top: 10px; right: -18px; transform: rotate(45deg); padding: 6px 32px; font-size: 12px; font-weight: 800; letter-spacing: .6px; color: #0b1220; background: linear-gradient(135deg, var(--accent-from), var(--accent-to)); box-shadow: 0 8px 24px rgba(122,92,255,0.35), 0 8px 24px rgba(42,209,255,0.25); border: 1px solid rgba(255,255,255,0.25); text-transform: uppercase; z-index: 2; pointer-events: none; }
.ribbon-hot{ background: linear-gradient(135deg, #ff7ad9, #7a5cff); color: #0b1220; }
.ribbon-value{ background: linear-gradient(135deg, #a8ff78, #78ffd6); color: #0b1220; box-shadow: 0 8px 24px rgba(120,255,214,0.35), 0 8px 24px rgba(168,255,120,0.25); }
@media (max-width: 420px){ .ribbon{ top: 8px; right: -24px; padding: 5px 28px; font-size: 11px; } }

/* Notice (announcement) */
.notice{ margin-top: 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-2); }
.notice-warning{ background: linear-gradient(180deg, rgba(255,184,0,0.10), rgba(255,184,0,0.04)); border-left: 4px solid rgba(255,184,0,0.6); }
.notice-title{ margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--text-2); display:flex; align-items:center; gap:6px; }
.notice-list{ margin: 0; padding-left: 18px; color: var(--text-1); font-size: 13px; line-height: 1.6; }
.notice-list > li{ margin: 6px 0; }
.notice-sub{ margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
.notice-sub li{ margin: 4px 0; }

/* 追加：Tabs 容器末尾的弹性占位，使 CTA 贴右侧 */
.tabs {
  position: sticky;
  top: 0;
  z-index: 50;
}
.tabs .tabs-spacer {
  flex: 1 1 auto;
}

/* 追加：醒目的“展开所有套餐”按钮 */
.cta-expand {
  appearance: none;
  border: 0;
  outline: none;
  cursor: pointer;
  padding: 10px 14px;
  margin-left: 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
  color: #0b1020;
  background: linear-gradient(135deg, #ffd86f 0%, #ffb64d 50%, #ff8a4d 100%);
  box-shadow: 0 8px 18px rgba(255, 150, 60, 0.35), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.cta-expand:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 12px 24px rgba(255, 150, 60, 0.45), inset 0 1px 0 rgba(255,255,255,0.35);
}
.cta-expand:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(255, 150, 60, 0.28), inset 0 2px 4px rgba(0,0,0,0.1);
}
.cta-expand:focus-visible {
  outline: 2px solid rgba(255, 166, 0, 0.65);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .cta-expand {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* 追加：重要提醒（危险）样式 */
.notice-danger{
  background: linear-gradient(180deg, rgba(255,77,77,0.12), rgba(255,77,77,0.06));
  border-left: 4px solid rgba(255,77,77,0.65);
}
.notice-danger .notice-title{
  color: #ffb3b3;
}