/* =========================================================
   失控进化 · 奖励申请系统 —— 暗黑科技 / 赛博能量主题
   响应式：桌面多栏并排，移动端单列自适应
   ========================================================= */

/* ---------- 变量与重置 ---------- */
:root {
    --bg-0: #070b14;
    --bg-1: #0d1424;
    --bg-2: #131c31;
    --card: rgba(19, 28, 49, 0.72);
    --line: rgba(0, 240, 255, 0.18);
    --line-strong: rgba(0, 240, 255, 0.45);
    --cyan: #00f0ff;
    --green: #00e5a0;
    --amber: #ffa63c;
    --amber-soft: rgba(255, 166, 60, 0.55);
    --magenta: #ff2e6e;
    --purple: #8a5cff;
    --text: #dbe7f4;
    --text-dim: #7c8ba1;
    --radius: 14px;
    --glow: 0 0 18px rgba(0, 240, 255, 0.25);
}
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(1200px 600px at 20% -10%, #16224a 0%, transparent 55%),
        radial-gradient(1000px 500px at 110% 10%, #2a1245 0%, transparent 55%),
        radial-gradient(900px 520px at 50% 115%, rgba(255, 166, 60, 0.09) 0%, transparent 60%),
        linear-gradient(160deg, #06090d 0%, var(--bg-1) 55%, var(--bg-2) 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    padding: 26px 16px 60px;
}

/* 背景网格（赛博纹理） */
.bg-grid {
    position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 28% 38%, rgba(255, 166, 60, 0.07) 0, transparent 26%),
        radial-gradient(circle at 72% 62%, rgba(0, 240, 255, 0.07) 0, transparent 30%);
    background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

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

/* ---------- 品牌头部 ---------- */
.site-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    padding: 18px 6px 26px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-icon {
    width: 48px; height: 48px; flex: 0 0 48px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--cyan);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(138, 92, 255, 0.15));
    animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(0, 240, 255, 0.25); }
    50%      { box-shadow: 0 0 26px rgba(0, 240, 255, 0.55); }
}
.brand-title {
    font-size: 30px; font-weight: 800; letter-spacing: 4px;
    background: linear-gradient(90deg, var(--cyan), var(--green) 40%, var(--purple));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.35);
}
.brand-sub { font-size: 12px; color: var(--text-dim); letter-spacing: 3px; margin-top: 4px; }
.brand-slogan {
    display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px;
    font-size: 12px; letter-spacing: 1px; color: var(--text-dim);
}
.brand-slogan span { color: var(--amber); text-shadow: 0 0 8px rgba(255, 166, 60, 0.45); }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 统计面板 ---------- */
.stat-cards {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px; margin-bottom: 20px;
}
.stat-card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px 12px; text-align: center;
    backdrop-filter: blur(6px);
    transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.stat-num {
    display: block; font-size: 26px; font-weight: 800; color: var(--cyan);
    font-family: Consolas, "Courier New", monospace;
    text-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
}
.stat-label { font-size: 12px; color: var(--text-dim); letter-spacing: 2px; }

/* ---------- 布局：桌面双栏并排 / 移动端单列 ---------- */
.layout-grid {
    display: grid; grid-template-columns: 360px minmax(0, 1fr);
    gap: 20px; align-items: start;
}

/* ---------- 卡片 ---------- */
.card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
    margin-bottom: 20px;
}
/* 卡片进化能量边框光效（渐变描边 + 呼吸） */
.card::before {
    content: "";
    position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.55), rgba(0, 229, 160, 0.15) 30%, rgba(255, 166, 60, 0.15) 70%, rgba(255, 166, 60, 0.55));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask-composite: exclude;
    animation: border-breathe 4s ease-in-out infinite;
}
@keyframes border-breathe {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 1; }
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 10px; flex-wrap: wrap; }
.card-title {
    font-size: 18px; font-weight: 700; letter-spacing: 1px; color: var(--text);
    border-left: 4px solid var(--cyan);
    padding-left: 12px;
    margin-bottom: 20px;
}
.card-head .card-title { margin-bottom: 0; }
.card .count { font-size: 13px; color: var(--text-dim); }

/* ---------- 表单 ---------- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-row .required { color: var(--magenta); }
.form-row input,
.form-row select {
    width: 100%; padding: 11px 14px; font-size: 14px;
    color: var(--text);
    background: rgba(7, 11, 20, 0.75);
    border: 1px solid rgba(0, 240, 255, 0.22);
    border-radius: 10px; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row input::placeholder { color: #4d5c73; }
.form-row input:focus,
.form-row select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15), var(--glow);
}
.form-row select option { background: #131c31; color: var(--text); }
.form-row .hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; line-height: 1.7; }

/* ---------- 按钮 ---------- */
.btn {
    position: relative; overflow: hidden;
    display: inline-block; padding: 10px 20px; font-size: 14px; font-weight: 600;
    border: none; border-radius: 10px; cursor: pointer; color: #fff;
    text-decoration: none; text-align: center;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
/* 按钮悬停能量脉冲扫光 */
.btn::after {
    content: "";
    position: absolute; top: 0; left: -80%; width: 55%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.30), transparent);
    transform: skewX(-20deg);
    transition: left 0.45s ease;
}
.btn:hover::after { left: 135%; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(90deg, var(--cyan), var(--green));
    color: #06231c; letter-spacing: 3px;
    box-shadow: 0 0 18px rgba(0, 229, 160, 0.35);
}
.btn-primary:hover { box-shadow: 0 0 28px rgba(0, 229, 160, 0.6); }
.btn-green  { background: linear-gradient(90deg, #00b894, var(--green)); box-shadow: 0 0 12px rgba(0, 229, 160, 0.35); }
/* 复制代码按钮：绿色系，与「已发放」一致；复制成功后变蓝 */
.btn-copy   { background: linear-gradient(90deg, #00b894, var(--green)); color: #06231c; box-shadow: 0 0 12px rgba(0, 229, 160, 0.35); }
.btn-copy:hover { box-shadow: 0 0 22px rgba(0, 229, 160, 0.65); }
.btn-copy.copied { background: linear-gradient(90deg, #3182ce, #5fb8ff); color: #fff; box-shadow: 0 0 12px rgba(95, 184, 255, 0.5); }
.btn-red    { background: linear-gradient(90deg, #e0245e, var(--magenta)); box-shadow: 0 0 12px rgba(255, 46, 110, 0.35); }
.btn-outline {
    background: transparent; color: var(--cyan);
    border: 1px solid var(--line-strong);
}
.btn-outline:hover { background: rgba(0, 240, 255, 0.1); box-shadow: var(--glow); }

/* ---------- 分类筛选 ---------- */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.filter-btn {
    padding: 8px 18px; font-size: 14px; color: var(--text-dim);
    text-decoration: none; border: 1px solid var(--line);
    border-radius: 20px; transition: all 0.2s;
}
.filter-btn:hover { color: var(--cyan); border-color: var(--line-strong); }
.filter-btn.active {
    color: #06231c; font-weight: 700;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    border-color: transparent;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}

/* ---------- 提示条 ---------- */
.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-top: 16px; line-height: 1.6; }
.alert-success { background: rgba(0, 229, 160, 0.12); color: var(--green); border: 1px solid rgba(0, 229, 160, 0.4); }
.alert-error   { background: rgba(255, 46, 110, 0.12); color: #ff7b9d; border: 1px solid rgba(255, 46, 110, 0.4); }

/* ---------- 表格（小屏可横向滚动） ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
thead th {
    background: rgba(0, 240, 255, 0.06);
    color: var(--cyan); font-weight: 600; text-align: left;
    padding: 10px 12px; border-bottom: 1px solid var(--line-strong);
    white-space: nowrap; letter-spacing: 1px;
}
tbody td { padding: 11px 12px; border-bottom: 1px solid rgba(0, 240, 255, 0.08); color: var(--text); }
tbody tr:hover { background: rgba(0, 240, 255, 0.05); }
.op-cell { white-space: nowrap; }
.op-cell .btn + .btn { margin-left: 6px; }

/* ---------- 标签 ---------- */
.tag, .status-tag {
    display: inline-block; padding: 3px 12px; border-radius: 20px;
    font-size: 13px; color: #fff; white-space: nowrap;
}
.tag-kai  { background: linear-gradient(90deg, #ff2e6e, #ff7b9d); box-shadow: 0 0 10px rgba(255, 46, 110, 0.4); }
.tag-wan  { background: linear-gradient(90deg, #3182ce, #5fb8ff); box-shadow: 0 0 10px rgba(95, 184, 255, 0.4); }
.tag-chai { background: linear-gradient(90deg, #8a5cff, #c3a6ff); box-shadow: 0 0 10px rgba(138, 92, 255, 0.4); }
.status-pending  { background: linear-gradient(90deg, #4b5a6e, #7c8ba1); }
.status-granted  { background: linear-gradient(90deg, #00b894, var(--green)); box-shadow: 0 0 10px rgba(0, 229, 160, 0.4); }
.status-rejected { background: linear-gradient(90deg, #e0245e, var(--magenta)); box-shadow: 0 0 10px rgba(255, 46, 110, 0.4); }

/* ---------- 其他 ---------- */
.empty { text-align: center; color: var(--text-dim); font-size: 14px; padding: 30px 0; }
.login-box { max-width: 400px; margin: 40px auto; }

/* =========================================================
   响应式：平板 / 手机单列自适应
   ========================================================= */
@media (max-width: 860px) {
    .layout-grid { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .brand-title { font-size: 24px; letter-spacing: 2px; }
    .site-header { justify-content: center; text-align: center; }
    .brand { flex-direction: column; }
    .header-actions { justify-content: center; }
    .card { padding: 18px; }
}
@media (max-width: 480px) {
    body { padding: 16px 10px 40px; }
    .brand-icon { width: 40px; height: 40px; flex-basis: 40px; font-size: 20px; }
    .btn-primary, .btn-login { width: 100%; }
    .op-cell { display: flex; gap: 6px; flex-wrap: wrap; }
    .op-cell .btn { width: auto; flex: 1 1 auto; margin-left: 0; padding: 6px 10px; font-size: 12px; }
    .stat-num { font-size: 22px; }
}

/* =========================================================
   发放确认弹窗（遮罩 + 居中卡片 + 能量边框）
   ========================================================= */
.modal-mask {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 8, 12, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    padding: 24px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modal-pop 0.2s ease;
}
/* 能量渐变边框 */
.modal-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.55), rgba(0, 229, 160, 0.15) 30%, rgba(255, 166, 60, 0.15) 70%, rgba(255, 166, 60, 0.55));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
}
@keyframes modal-pop {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
.modal-head h3 {
    margin: 0 0 6px;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--amber);
    text-shadow: 0 0 16px rgba(255, 166, 60, 0.4);
}
.modal-question {
    margin: 10px 0 14px;
    font-size: 15px;
    color: var(--text);
}
.modal-info {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed var(--line);
    border-radius: 10px;
}
.modal-info div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}
.modal-info span {
    flex-shrink: 0;
    color: var(--text-dim);
}
.modal-info b {
    text-align: right;
    word-break: break-all;
    color: var(--text);
}
.modal-tip {
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-dim);
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.modal-actions .btn { flex: 0 1 auto; }
.btn-ghost {
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--line);
}
.btn-ghost:hover {
    color: var(--text);
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}
@media (max-width: 480px) {
    .modal-actions { flex-wrap: wrap; }
    .modal-actions .btn { flex: 1 1 auto; }
}
