/* ===== 全局重置与变量 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #050b1e;
  --bg-secondary: #0a1230;
  --bg-card: rgba(8, 22, 60, 0.7);
  --bg-card-hover: rgba(15, 35, 80, 0.8);
  --border-color: rgba(0, 200, 255, 0.25);
  --border-glow: rgba(0, 200, 255, 0.5);
  --text-primary: #e6f3ff;
  --text-secondary: #8aa6cc;
  --text-muted: #5a7896;
  --accent-cyan: #00d4ff;
  --accent-blue: #2b8bff;
  --accent-green: #00f0a8;
  --accent-orange: #ff8a3c;
  --accent-red: #ff4d6d;
  --accent-purple: #9b6cff;
  --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #2b8bff 100%);
  --gradient-bg: linear-gradient(135deg, #050b1e 0%, #0a1230 50%, #050b1e 100%);
  --shadow-glow: 0 0 24px rgba(0, 212, 255, 0.25);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: 0.25s ease;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; border: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== 通用工具类 ===== */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.text-cyan { color: var(--accent-cyan); }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--accent-green); }
.text-orange { color: var(--accent-orange); }
.text-red { color: var(--accent-red); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ===== 装饰背景 ===== */
.bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(0, 212, 255, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 90%, rgba(43, 139, 255, 0.08) 0%, transparent 40%),
    var(--bg-primary);
  overflow: hidden;
}

.bg-decor::before,
.bg-decor::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border: 1px solid rgba(0, 200, 255, 0.06);
  border-radius: 50%;
  animation: rotate 60s linear infinite;
}

.bg-decor::before { top: -200px; left: -200px; }
.bg-decor::after { bottom: -300px; right: -300px; animation-direction: reverse; animation-duration: 90s; }

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ===== 标题装饰 ===== */
.title-deco {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  padding-left: 14px;
  letter-spacing: 0.5px;
}

.title-deco::before,
.title-deco::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent-cyan);
  transform: rotate(45deg);
}

.title-deco::before { left: 0; top: 50%; margin-top: -4px; }
.title-deco::after { right: -16px; top: 50%; margin-top: -4px; opacity: 0.6; }

.title-deco .title-line {
  margin: 0 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ===== 卡片基础 ===== */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: var(--transition);
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent-cyan);
  opacity: 0.6;
}

.card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  user-select: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 212, 255, 0.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(0, 212, 255, 0.5); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}
.btn-ghost:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

.btn-danger {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-red);
  border-color: rgba(255, 77, 109, 0.3);
}
.btn-danger:hover { background: rgba(255, 77, 109, 0.25); }

.btn-sm { padding: 4px 12px; font-size: 12px; }

/* ===== 表单 ===== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.form-label .required { color: var(--accent-red); margin-left: 4px; }

.form-control {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.05);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

textarea.form-control {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238aa6cc' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* 下拉选项深色样式（覆盖浏览器默认白色） */
select.form-control option,
.form-control option {
  background-color: #0a1230;
  color: #e6f3ff;
}
select.form-control option:checked,
.form-control option:checked {
  background-color: #1a3a7a;
  color: #ffffff;
  font-weight: 600;
}
select.form-control option:hover,
.form-control option:hover {
  background-color: #00d4ff;
  color: #ffffff;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--accent-red); margin-top: 4px; }

/* ===== 标签 ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 12px;
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.25);
}
.tag-green { background: rgba(0, 240, 168, 0.12); color: var(--accent-green); border-color: rgba(0, 240, 168, 0.25); }
.tag-orange { background: rgba(255, 138, 60, 0.12); color: var(--accent-orange); border-color: rgba(255, 138, 60, 0.25); }
.tag-red { background: rgba(255, 77, 109, 0.12); color: var(--accent-red); border-color: rgba(255, 77, 109, 0.25); }
.tag-purple { background: rgba(155, 108, 255, 0.12); color: var(--accent-purple); border-color: rgba(155, 108, 255, 0.25); }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.4); }

/* ===== 自定义确认弹窗 ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.confirm-overlay.show {
  opacity: 1;
}

.confirm-box {
  width: 380px;
  max-width: calc(100vw - 40px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 212, 255, 0.1);
  padding: 36px 28px 24px;
  text-align: center;
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.confirm-overlay.show .confirm-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.confirm-icon-wrap {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 26px;
  border: 1px solid;
}

.confirm-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.confirm-message {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 100px;
  padding: 8px 20px;
}

/* ===== 动画 ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease; }

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--accent-cyan), 0 0 10px var(--accent-cyan); }
  50% { box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px var(--accent-cyan); }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hide-on-mobile { display: none !important; }
}
