/* ==========================================================================
   框架：55 · 价格计算器 (Interactive Dynamic Pricing & Bandwidth Calculator)
   ========================================================================== */

.calculator-section {
  padding: 110px 0;
  position: relative;
  z-index: 10;
}

.calculator-container {
  max-width: 1040px;
  margin: 0 auto;
}

/* 计算器主体卡片 */
.calc-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-xl);
  padding: 48px;
  backdrop-filter: blur(24px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.12);
  position: relative;
  overflow: hidden;
}

.calc-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* 周期切换胶囊 (Billing Cycle Switcher) */
.billing-switcher-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.billing-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.6);
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--space-border);
  gap: 4px;
}

.billing-btn {
  padding: 10px 24px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.3s var(--ease-spring);
  position: relative;
}

.billing-btn.active {
  background: linear-gradient(135deg, var(--star-cyan), var(--star-indigo));
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}

.billing-discount-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #F43F5E;
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.2;
}

/* 计算器内部栅格 */
.calc-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 48px;
  align-items: center;
}

/* 左侧控制输入面板 */
.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-badge {
  font-size: 18px;
  font-weight: 800;
  color: var(--star-cyan);
  font-family: var(--font-display);
}

/* 自定义现代化滑块 */
.slider-wrap {
  position: relative;
  width: 100%;
}

.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #1E293B;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 30%, #38BDF8 100%);
  cursor: pointer;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
  border: 2px solid #0F172A;
  transition: transform 0.15s ease;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 18px rgba(56, 189, 248, 1);
}

.custom-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #38BDF8;
  cursor: pointer;
  border: 2px solid #0F172A;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

/* 右侧价格估算结果卡片 */
.calc-result-box {
  background: rgba(10, 15, 29, 0.9);
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  position: relative;
  box-shadow: inset 0 0 30px rgba(99, 102, 241, 0.08);
}

.plan-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--space-border);
}

.plan-matched-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-pure);
}

.plan-tier-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  background: rgba(56, 189, 248, 0.15);
  color: var(--star-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* 核心价格数字 */
.price-display {
  margin-bottom: 24px;
}

.price-main-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.currency-symbol {
  font-size: 26px;
  font-weight: 700;
  color: var(--star-cyan);
}

.calculated-price {
  font-size: 48px;
  font-weight: 900;
  font-family: var(--font-display);
  color: var(--text-pure);
  line-height: 1;
  letter-spacing: -1px;
}

.billing-period-text {
  font-size: 15px;
  color: var(--text-muted);
}

.price-sub-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.price-original {
  font-size: 15px;
  color: var(--text-dim);
  text-decoration: line-through;
}

.daily-cost-badge {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--star-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
}

/* 规格清单小项 */
.plan-specs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.spec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
}

.spec-val {
  font-weight: 700;
  color: var(--text-pure);
}

/* 优惠券激活卡槽 */
.promo-box {
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.promo-label {
  font-size: 12.5px;
  color: var(--text-dim);
}

.promo-code-btn {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--star-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.promo-code-btn:hover {
  background: rgba(56, 189, 248, 0.15);
}

.calc-action-btn {
  width: 100%;
}

/* 复制 Toast 提示 */
.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0284C7;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease-spring);
}

.copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 900px) {
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .calc-card {
    padding: 30px 20px;
  }
}
