﻿:root {
  --primary: #007DFF;
  --primary-hover: #0066d6;
  --primary-light: rgba(0, 125, 255, 0.1);
  --success: #00B578;
  --warning: #FA8C16;
  --danger: #FA5151;
  --bg-main: #0B0E14;
  --bg-card: rgba(22, 28, 38, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --text-main: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 125, 255, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 181, 120, 0.1) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  width: 100%;
}

/* 顶部导航 */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 24px;
  border-bottom: 1px solid var(--bg-card-border);
  margin-bottom: 32px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #007DFF, #00B578);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  box-shadow: 0 8px 16px rgba(0, 125, 255, 0.3);
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 700;
}

.logo-text p {
  font-size: 12px;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

/* 卡片与玻璃拟态 */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.hero-section {
  text-align: center;
  margin-bottom: 36px;
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #FFFFFF 0%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 600px;
  margin: 0 auto;
}

/* 套餐网格 */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.plan-card {
  background: rgba(30, 41, 59, 0.5);
  border: 2px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.plan-card:hover {
  border-color: rgba(0, 125, 255, 0.5);
  transform: translateY(-4px);
}

.plan-card.selected {
  border-color: var(--primary);
  background: rgba(0, 125, 255, 0.08);
  box-shadow: 0 0 24px rgba(0, 125, 255, 0.25);
}

.badge-popular {
  position: absolute;
  top: 12px;
  right: -32px;
  background: linear-gradient(135deg, #FF6B00, #FA5151);
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 36px;
  transform: rotate(45deg);
  box-shadow: 0 4px 10px rgba(250, 81, 81, 0.3);
}

.plan-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.plan-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.plan-price-unit {
  font-size: 14px;
  font-weight: normal;
}

.plan-original-price {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.plan-quota-badge {
  display: inline-block;
  background: rgba(0, 181, 120, 0.15);
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.plan-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: auto;
}

/* 支付方式选择 */
.payment-section {
  margin-top: 24px;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: block;
}

.pay-types-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.4);
  color: var(--text-main);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.pay-btn:hover {
  background: rgba(30, 41, 59, 0.8);
}

.pay-btn.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.pay-icon {
  font-size: 18px;
}

/* 表单控件 */
.input-group {
  margin-bottom: 16px;
}

.input-control {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input-control:focus {
  border-color: var(--primary);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #007DFF, #0066d6);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 8px 24px rgba(0, 125, 255, 0.35);
}

.btn-primary:hover {
  opacity: 0.92;
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-secondary {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 激活码展示卡片 */
.code-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
  word-break: break-all;
  font-family: monospace;
  font-size: 13px;
  color: #38BDF8;
  line-height: 1.6;
}

/* 列表展示 */
.device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid var(--bg-card-border);
}

.quota-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* 弹窗与遮罩 */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 16px;
}

.modal-content {
  background: #1E293B;
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Toast 提示 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--bg-card-border);
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: none;
}

/* 页脚 */
footer {
  margin-top: auto;
  text-align: center;
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--bg-card-border);
}
