/* ========== 变量 ========== */
:root {
    --bg-1: #0f1724; /* 深色基底 */
    --bg-2: #0b1220;
    --accent-a: #7c5cff; /* 渐变起点 */
    --accent-b: #4fd1c5; /* 渐变终点 */
    --glass: rgba(255, 255, 255, 0.03);
    --card: rgba(255, 255, 255, 0.04);
    --muted: rgba(255, 255, 255, 0.6);
    --radius: 12px;
    --shadow: 0 6px 30px rgba(2, 6, 23, 0.6);
    --glass-border: rgba(255, 255, 255, 0.04);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* ========== 全局 ========== */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(124, 92, 255, 0.12), transparent),
    radial-gradient(1000px 500px at 90% 90%, rgba(79, 209, 197, 0.08), transparent), linear-gradient(180deg, var(--bg-1), var(--bg-2));
    color: #e6eef8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* subtle animated background lights */
.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    mix-blend-mode: screen;
    opacity: 0.3;
}

.orb {
    position: absolute;
    width: 320px;
    height: 320px;
    filter: blur(60px);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    animation: float 12s ease-in-out infinite;
}

.orb.o1 {
    left: 8%;
    top: 12%;
    background: radial-gradient(circle at 30% 30%, var(--accent-a), transparent 60%);
    animation-duration: 18s;
}

.orb.o2 {
    left: 92%;
    top: 86%;
    background: radial-gradient(circle at 70% 70%, var(--accent-b), transparent 60%);
    animation-duration: 16s;
}

@keyframes float {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-48%, -52%) scale(1.08);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ========== 顶部导航 ========== */
header.nav {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
    background: linear-gradient(180deg, rgba(10, 14, 22, 0.28), rgba(10, 14, 22, 0.10));
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    box-shadow: var(--shadow);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 24px;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), inset 0 -6px 18px rgba(255, 255, 255, 0.03);
    font-weight: 700;
    font-size: 18px;
    color: #041827;
}

.site-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

nav.nav-links {
    display: flex;
    gap: 10px;
    margin-left: auto;
    align-items: center;
}

.nav-links a, .nav-links button {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .16s ease;
}

.nav-links a:hover, .nav-links button:hover {
    color: #fff;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.02);
}

/* user avatar & dropdown */
.user-btn {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff3 0%, rgba(255, 255, 255, 0.7) 40%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #041827;
    font-weight: 700;
}

.user-name {
    font-size: 14px;
    color: #eaf3ff;
    font-weight: 600;
}

.dropdown {
    position: absolute;
    right: 20px;
    top: 62px;
    min-width: 220px;
    background: var(--card);
    border-radius: 12px;
    padding: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    display: none;
}

.dropdown.show {
    display: block;
}

.dropdown .line {
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
}

.dropdown .line a {
    display: block;
    color: var(--muted);
}

.dropdown .sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.02);
    margin: 8px 0;
}

/* ========== 主体卡片 ========== */
main {
    padding: 60px 20px;
    z-index: 10;
    position: relative;
}

.hero {
  max-width: 1100px;          /* 居中时卡片整体宽度限制 */
  margin: 0 auto;            /* 水平居中 */
  display: flex;
  flex-direction: column;    /* 改为竖向排列 */
  align-items: center;       /* 卡片内容居中 */
  gap: 28px;                 /* 卡片之间的间距 */
}

/*.card {*/
/*    width: 100%;*/
/*    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));*/
/*    border-radius: var(--radius);*/
/*    padding: 22px;*/
/*    box-shadow: var(--shadow);*/
/*    border: 1px solid var(--glass-border);*/
/*}*/



h1 {
    margin: 8px 0 20px 0;
    font-size: 36px;
    line-height: 1.05;
    letter-spacing: 3px;
}

p.lead {
    color: #cfe9f7;
    margin: 0 0 16px 0;
}

/* small card content */
.stats {
    display: flex;
    gap: 12px;
}

.stat {
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent);
    min-width: 120px;
}

.stat .num {
    font-size: 18px;
    font-weight: 700;
}

.stat .label {
    font-size: 12px;
    color: var(--muted);
}

/* ========== 表单（模态） ========== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.show {
    display: flex;
    animation: fadeIn .16s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

.modal {
    width: 100%;
    max-width: 420px;
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(8, 12, 18, 0.9), rgba(8, 12, 18, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    transition: transform .18s ease;
}

.modal.show {
    transform: translateY(0);
}

.form-row {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--muted);
}

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 12px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(255, 255, 255, 0.02);
    color: #eaf3ff;
    outline: none;
    transition: box-shadow .12s ease, border-color .12s ease;
}

input:focus {
    box-shadow: 0 6px 20px rgba(124, 92, 255, 0.12);
    border-color: rgba(124, 92, 255, 0.6);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    border: 0;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
    color: #041827;
}

.btn.ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

/* small helpers */
.row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.right {
    margin-left: auto;
}

.error {
    color: #ffb4b4;
    font-size: 13px;
    margin-top: 6px;
}

/* responsive */
@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .nav-inner {
        padding: 12px;
    }

    .dropdown {
        right: 12px;
        top: 60px;
    }
}

/* Logo 样式 */
.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;

  /* 渐变背景 */
  background: linear-gradient(135deg, #7c5cff, #4fd1c5);

  /* 字体 */
  font-weight: 700;
  font-size: 18px;
  color: #041827; /* 深色字体和背景形成对比 */

  /* 玻璃质感和阴影 */
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.6), /* 外部阴影 */
    inset 0 -6px 18px rgba(255, 255, 255, 0.03); /* 内部光感 */

  /* 鼠标悬浮动画 */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.logo:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    0 8px 24px rgba(124, 92, 255, 0.6),
    inset 0 -6px 18px rgba(255, 255, 255, 0.05);
}

.card-container {
    width: 100%;
    display: flex;
    gap: 20px;            /* 卡片间距 */
    /*flex-wrap: wrap;      !* 屏幕小的时候自动换行 *!*/
    justify-content: center; /* 居中排列 */
    margin: 20px 0;
}

/* 折叠卡片样式 */
.card {
    width: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header span {
    font-size: 18px;
    font-weight: 600;
}

/* 圆形渐变折叠按钮 + 箭头旋转 */
.card-header button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
    color: #041827;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    font-size: 16px;
}

.card-header button:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(124,92,255,0.6);
}

/* 折叠表格 */
.client-table {
    width: 100%;
    border-collapse: collapse;
    max-height: 0;           /* 默认收起 */
    overflow: hidden;        /* 超出隐藏 */
    transition: max-height 0.4s ease;
    margin-top: 6px;
}

.card.open .client-table {
    max-height: 10000px;      /* 展开时给足够的高度 */
}

.client-table th, .client-table td {
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: left;
}

.client-table th {
    color: var(--muted);
    background: rgba(255,255,255,0.02);
}

.client-table tr:nth-child(even) {
    background: rgba(255,255,255,0.01);
}

/* 下拉框样式 */
select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    color: #eaf3ff;
    font-size: 14px;
    outline: none;
    appearance: none; /* 隐藏默认箭头 */
    background-image: linear-gradient(45deg, transparent 50%, #7c5cff 50%),
                      linear-gradient(135deg, #7c5cff 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

select:focus {
    border-color: rgba(124, 92, 255, 0.6);
    box-shadow: 0 6px 20px rgba(124, 92, 255, 0.12);
}

select option {
    background: #1e1e1e;   /* 深色背景 */
    color: #eaf3ff;        /* 浅色文字 */
}

/* 充值金额输入框样式 */
#recharge-amount {
    background: #1e1e1e;          /* 深色背景 */
    color: #f5f5f5;              /* 浅色文字 */
    font-weight: bold;           /* 加粗文字 */
    border: 1px solid #444;      /* 边框颜色 */
    border-radius: 8px;          /* 圆角 */
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

#recharge-amount::placeholder {
    color: #888; /* 占位符颜色更浅 */
    font-weight: normal;
}

#recharge-amount::-webkit-inner-spin-button,
#recharge-amount::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 24px;
}

/* 新增帮助文档入口样式 */
.brand .help-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 8px;
    transition: all .2s ease;
}

.brand .help-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}