*{margin:0;padding:0;box-sizing:border-box;}

body{
  background:#f0f2f5;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  font-size:14px;
  color:#1f2d3d;
}

/* ===== Auth Pages (login, register, forgot_password) ===== */
.auth-container{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.auth-box{
  max-width:480px;
  width:100%;
  background:#fff;
  border-radius:16px;
  padding:32px 28px;
  box-shadow:0 2px 12px rgba(0,0,0,0.08);
  border:1px solid #e4e7ed;
}
.auth-box.login-box{max-width:420px;}
.auth-box h2{font-size:1.8rem;color:#303133;text-align:center;margin-bottom:8px;}
.auth-box .sub{font-size:0.8rem;color:#909399;text-align:center;margin-bottom:24px;}

/* ===== Form ===== */
.form-group{margin-bottom:20px;}
.form-group label{
  display:block;
  margin-bottom:6px;
  color:#606266;
  font-size:0.85rem;
  font-weight:500;
}
.form-group input{
  width:100%;
  padding:12px 16px;
  background:#fff;
  border:1px solid #dcdfe6;
  border-radius:8px;
  font-size:0.9rem;
  outline:none;
  color:#1f2d3d;
}
.form-group input:focus{
  border-color:#409eff;
  box-shadow:0 0 0 2px rgba(64,158,255,0.2);
}
.form-group .tips{font-size:0.7rem;color:#909399;margin-top:4px;}

/* ===== Buttons ===== */
.btn{
  display:inline-block;
  padding:5px 16px;
  border-radius:6px;
  font-size:0.75rem;
  border:none;
  cursor:pointer;
  transition:0.3s;
  font-weight:500;
}
.btn-block{
  width:100%;
  padding:12px;
  border:none;
  border-radius:8px;
  color:#fff;
  font-weight:500;
  font-size:1rem;
  cursor:pointer;
  margin-top:10px;
}
.btn-primary{background:#409eff;color:#fff;}
.btn-primary:hover{background:#66b1ff;box-shadow:0 2px 8px rgba(64,158,255,0.3);}
.btn-primary:disabled{background:#a0cfff;cursor:not-allowed;}
.btn-danger{background:#f56c6c;color:#fff;}
.btn-danger:hover{background:#f78989;box-shadow:0 2px 8px rgba(245,108,108,0.3);}
.btn-default{background:#fff;border:1px solid #dcdfe6;color:#606266;}
.btn-default:hover{background:#ecf5ff;border-color:#409eff;color:#409eff;}
.btn-success{background:#67c23a;color:#fff;}
.btn-success:hover{background:#85ce61;box-shadow:0 2px 8px rgba(103,194,58,0.3);}
.btn-sm{padding:3px 12px;font-size:0.7rem;}

.btn-secondary{
  flex:1;background:#fff;border:1.5px solid #e4e7ed;
  padding:10px 0;border-radius:10px;color:#606266;
  font-weight:500;font-size:0.9rem;cursor:pointer;
  text-align:center;transition:all 0.2s;
}
.btn-secondary:hover{background:#f8fafc;border-color:#c0c4cc;color:#303133;}

.action-buttons{display:flex;gap:10px;margin-top:0;flex-wrap:wrap;}
.action-buttons .btn-primary{
  flex:1;background:linear-gradient(135deg,#409eff,#2563eb);border:none;
  padding:11px 0;border-radius:12px;color:white;font-weight:600;
  font-size:0.9rem;cursor:pointer;text-align:center;min-width:110px;
  box-shadow:0 4px 14px rgba(37,99,235,0.25);transition:all 0.3s;
}
.action-buttons .btn-primary:hover{
  box-shadow:0 6px 22px rgba(37,99,235,0.4);transform:translateY(-1px);
}
.action-buttons .btn-primary:disabled{opacity:0.45;cursor:not-allowed;transform:none;}
.action-buttons .btn-primary:active{transform:scale(0.97);}
.action-buttons .btn-primary i{margin-right:6px;}


/* ===== Messages ===== */
.error-msg{
  background:#fef0f0;color:#f56c6c;
  padding:10px;border-radius:8px;
  text-align:center;margin-bottom:20px;font-size:0.85rem;
}
.success-msg{
  background:#f0f9eb;color:#67c23a;
  padding:10px;border-radius:8px;
  text-align:center;margin-bottom:20px;font-size:0.85rem;
}

/* ===== Footer links ===== */
.footer-link{
  text-align:center;margin-top:20px;color:#909399;font-size:0.85rem;
  display:flex;gap:12px;justify-content:center;flex-wrap:wrap;
}
.footer-link a{color:#409eff;text-decoration:none;font-size:0.9rem;}
.footer-link a:hover{text-decoration:underline;}

/* ===== Captcha ===== */
.captcha-row{display:flex;gap:12px;align-items:center;}
.captcha-row input{flex:1;}
.captcha-text{
  background:#f5f7fa;padding:12px 16px;border-radius:8px;
  text-align:center;font-weight:bold;font-size:1rem;
  min-width:120px;border:1px solid #dcdfe6;
}
.honeypot{position:absolute;left:-9999px;top:-9999px;opacity:0;height:0;width:0;}

/* ===== Dashboard Layout ===== */
.dashboard-body{
  background:#ebeff3;
  background-image:
    radial-gradient(circle at 15% 20%,rgba(64,158,255,0.04) 0%,transparent 50%),
    radial-gradient(circle at 85% 80%,rgba(103,194,58,0.03) 0%,transparent 50%),
    radial-gradient(circle at 50% 50%,rgba(153,102,255,0.02) 0%,transparent 60%);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  padding:28px 20px 40px;color:#1f2d3d;
  min-height:100vh;
}
.container{max-width:1000px;margin:0 auto;}
.card{
  background:#ffffff;border-radius:18px;
  box-shadow:0 1px 3px rgba(0,0,0,0.04),0 4px 16px rgba(0,0,0,0.04);
  border:none;margin-bottom:18px;overflow:hidden;
  transition:box-shadow 0.3s,transform 0.2s;
}
.card:hover{box-shadow:0 2px 6px rgba(0,0,0,0.05),0 8px 24px rgba(0,0,0,0.06);}
.card-error{
  background:#fff3f3;border-color:#f56c6c;
}
.card-error-inner{padding:12px 24px;color:#f56c6c;font-weight:500;}

/* ===== Dashboard Header ===== */
.card-alert{background:#fff5f5;border:1.5px solid #fde2e2!important;margin-bottom:16px;}

/* ===== Hero Card ===== */
.hero-card{
  background:linear-gradient(145deg,#0f0e1a 0%,#1a1a2e 30%,#16213e 60%,#0f3460 100%);
  border-radius:22px;padding:26px 22px 20px;margin-bottom:18px;
  color:#fff;position:relative;overflow:hidden;
  box-shadow:0 12px 40px rgba(15,52,96,0.35),0 2px 8px rgba(15,52,96,0.15);
}
.hero-card::before{
  content:'';position:absolute;top:-80px;right:-60px;
  width:200px;height:200px;border-radius:50%;
  background:radial-gradient(circle,rgba(64,158,255,0.15),transparent 70%);
}
.hero-card::after{
  content:'';position:absolute;bottom:-50px;left:-40px;
  width:160px;height:160px;border-radius:50%;
  background:radial-gradient(circle,rgba(33,203,243,0.1),transparent 70%);
}
.hero-top{
  display:flex;justify-content:space-between;align-items:center;
  position:relative;z-index:1;margin-bottom:20px;
}
.hero-user{display:flex;align-items:center;gap:14px;}
.hero-avatar{
  width:52px;height:52px;border-radius:50%;object-fit:cover;
  border:3px solid rgba(255,255,255,0.2);
  box-shadow:0 6px 18px rgba(0,0,0,0.3);
}
.hero-greeting{font-size:0.75rem;color:rgba(255,255,255,0.5);margin-bottom:3px;letter-spacing:0.3px;}
.hero-name{font-size:1.2rem;font-weight:700;color:#fff;letter-spacing:0.5px;}
.hero-actions{display:flex;gap:8px;}
.hero-link{
  display:inline-flex;width:38px;height:38px;border-radius:50%;
  align-items:center;justify-content:center;
  background:rgba(255,255,255,0.08);color:rgba(255,255,255,0.75);
  text-decoration:none;font-size:0.85rem;transition:all 0.25s;
  border:1px solid rgba(255,255,255,0.06);
  backdrop-filter:blur(4px);
}
.hero-link:hover{background:rgba(255,255,255,0.18);color:#fff;transform:scale(1.08);}
.hero-link-out{background:rgba(245,108,108,0.18);border-color:rgba(245,108,108,0.25);}
.hero-link-out:hover{background:rgba(245,108,108,0.35);}

.hero-stats{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px;
  position:relative;z-index:1;margin-bottom:16px;
}
.hero-stat{
  background:rgba(255,255,255,0.06);
  border-radius:14px;padding:14px 8px;text-align:center;
  border:1px solid rgba(255,255,255,0.08);
  backdrop-filter:blur(8px);
  transition:all 0.3s;
}
.hero-stat:hover{background:rgba(255,255,255,0.1);border-color:rgba(255,255,255,0.15);transform:translateY(-2px);}
.hero-stat-icon{
  font-size:0.95rem;color:rgba(255,255,255,0.35);margin-bottom:6px;
}
.hero-stat-num{
  display:block;font-size:1.6rem;font-weight:800;
  color:#fff;line-height:1.1;letter-spacing:-0.5px;
  background:linear-gradient(135deg,#fff,rgba(255,255,255,0.85));
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
  background-clip:text;
}
.hero-stat-label{
  font-size:0.62rem;color:rgba(255,255,255,0.35);font-weight:500;margin-top:2px;
}
.hero-progress{position:relative;z-index:1;margin-bottom:18px;}
.hero-progress-bar{
  height:6px;border-radius:6px;background:rgba(255,255,255,0.08);
  overflow:hidden;position:relative;
}
.hero-progress-fill{
  height:100%;border-radius:6px;position:relative;
  background:linear-gradient(90deg,#2196f3,#42a5f5,#21cbf3);
  transition:width 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
  box-shadow:0 0 12px rgba(33,150,243,0.5),0 0 4px rgba(33,203,243,0.3);
}
.hero-progress-fill::after{
  content:'';position:absolute;top:0;right:0;bottom:0;left:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,0.2),transparent);
  animation:shimmer 2s ease-in-out infinite;
}
@keyframes shimmer{
  0%{transform:translateX(-100%);}
  100%{transform:translateX(200%);}
}
.hero-recharge-btn{
  width:100%;padding:12px 0;border:none;border-radius:14px;
  background:rgba(255,255,255,0.1);color:#fff;font-size:0.9rem;
  font-weight:600;cursor:pointer;position:relative;z-index:1;
  border:1px solid rgba(255,255,255,0.1);letter-spacing:0.5px;
  transition:all 0.3s;overflow:hidden;
}
.hero-recharge-btn::before{
  content:'';position:absolute;inset:0;
  background:linear-gradient(135deg,rgba(64,158,255,0.3),rgba(33,203,243,0.2));
  opacity:0;transition:opacity 0.3s;
}
.hero-recharge-btn:hover::before{opacity:1;}
.hero-recharge-btn:hover{
  background:rgba(255,255,255,0.15);border-color:rgba(255,255,255,0.2);
  box-shadow:0 6px 24px rgba(33,150,243,0.3);transform:translateY(-2px);
}
.hero-recharge-btn:disabled{opacity:0.35;cursor:not-allowed;transform:none;}
.hero-recharge-btn:disabled::before{display:none;}
.hero-recharge-btn i{margin-right:8px;}

/* Old header/count card styles - no longer used in dashboard */

/* ===== Query Section ===== */
.query-section{padding:22px 24px;}
.query-section .query-label{
  font-size:0.92rem;font-weight:700;color:#1a1a2e;margin-bottom:14px;
  display:flex;align-items:center;gap:8px;
  padding-left:12px;border-left:3px solid #409eff;
}
.query-section .query-label i{color:#409eff;font-size:0.82rem;}
.query-input-wrap{
  position:relative;margin-bottom:16px;
}
.query-input-icon{
  position:absolute;left:16px;top:50%;transform:translateY(-50%);
  color:#c0c4cc;font-size:1rem;z-index:1;
  transition:color 0.3s;
}
.query-input-wrap:focus-within .query-input-icon{color:#409eff;}
.query-input{
  width:100%;padding:14px 16px 14px 44px;font-size:0.95rem;
  border:2px solid #e8ecf1;border-radius:14px;outline:none;
  background:#fafbfc;transition:all 0.3s;
  font-variant-numeric:tabular-nums;
}
.query-input:focus{
  border-color:#409eff;background:#fff;
  box-shadow:0 0 0 4px rgba(64,158,255,0.07);
}
.query-input:disabled{background:#f5f7fa;cursor:not-allowed;opacity:0.6;}
.query-input::placeholder{color:#c0c4cc;}
.query-tip-text{font-size:0.7rem;color:#c0c4cc;}
.query-tip-row{
  display:flex;gap:12px;margin-top:8px;flex-wrap:wrap;
  justify-content:space-between;align-items:center;
}
/* ===== History ===== */
.history-card{padding:20px 24px;}
.history-title{
  font-size:0.9rem;font-weight:700;color:#303133;
  margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;
  padding-left:12px;border-left:3px solid #67c23a;
}
.history-title i{color:#67c23a;margin-right:5px;}
.history-list{display:flex;flex-wrap:wrap;gap:8px;min-height:28px;}
.history-item{
  background:#f8fafc;
  border:1.5px solid #e8ecf1;border-radius:22px;
  padding:6px 16px;font-size:0.78rem;color:#606266;cursor:pointer;
  transition:all 0.25s;font-weight:500;
}
.history-item:hover{
  background:#ecf5ff;border-color:#409eff;color:#409eff;
  transform:translateY(-2px);
  box-shadow:0 4px 12px rgba(64,158,255,0.15);
}
.clear-history{
  font-size:0.7rem;color:#c0c4cc;cursor:pointer;
  padding:3px 10px;border-radius:12px;transition:all 0.2s;
}
.clear-history:hover{color:#f56c6c;background:#fef0f0;}

/* ===== Result ===== */
.result-card{padding:24px 24px;}
.result-header{
  display:flex;justify-content:space-between;align-items:center;
  margin-bottom:16px;flex-wrap:wrap;gap:10px;
}
.result-title{
  font-size:0.9rem;font-weight:700;color:#303133;
  padding-left:12px;border-left:3px solid #e6a23c;
}
.result-title i{color:#e6a23c;margin-right:6px;}
.result-toolbar{
  display:flex;gap:8px;align-items:center;flex-wrap:wrap;
}
.result-search-group{
  display:flex;align-items:center;background:#f8fafc;
  border:1.5px solid #e4e7ed;border-radius:10px;overflow:hidden;
  transition:border-color 0.2s,box-shadow 0.2s;
}
.result-search-group:focus-within{
  border-color:#409eff;
  box-shadow:0 0 0 3px rgba(64,158,255,0.1);
}
.result-search-icon{
  padding:0 0 0 14px;color:#a8abb2;font-size:0.78rem;
  display:flex;align-items:center;
}
.result-search-group:focus-within .result-search-icon{color:#409eff;}
.result-search-group input{
  border:none;outline:none;background:transparent;
  padding:7px 8px;font-size:0.78rem;color:#303133;
  width:110px;min-width:80px;
}
.result-search-group input::placeholder{color:#c0c4cc;font-size:0.72rem;}
.result-search-group button{
  border:none;background:transparent;cursor:pointer;
  padding:7px 10px;color:#a8abb2;font-size:0.7rem;
  border-left:1px solid #e4e7ed;transition:color 0.2s,background 0.2s;
}
.result-search-group button:hover:not(:disabled){color:#409eff;background:#ecf5ff;}
.result-search-group button:disabled{opacity:0.3;cursor:not-allowed;}
.result-copy-btn{
  background:linear-gradient(135deg,#fdf6ec,#fef3e6);border:1.5px solid #f5dab1;
  padding:6px 16px;border-radius:10px;font-size:0.75rem;cursor:pointer;
  color:#e6a23c;font-weight:600;transition:all 0.25s;
  white-space:nowrap;
}
.result-copy-btn:hover{background:#e6a23c;color:#fff;border-color:#e6a23c;box-shadow:0 3px 12px rgba(230,162,60,0.3);}
.result-copy-btn i{margin-right:5px;}
.result-box{
  background:#fcfdff;border-radius:14px;padding:24px 20px;
  font-family:'SF Mono',Monaco,'Cascadia Code',Consolas,monospace;
  font-size:0.88rem;line-height:1.7;white-space:pre-wrap;
  word-break:break-word;color:#2c3e50;
  max-height:400px;overflow-y:auto;
  border:1.5px solid #e8ecf1;
  border-top:3px solid #409eff;
  border-radius:0 0 14px 14px;
}
.result-box pre{margin:0;font-family:inherit;font-size:inherit;color:inherit;white-space:pre-wrap;}
.result-placeholder{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:28px 0;gap:12px;
}
.result-placeholder-icon{
  font-size:2.5rem;color:#d4dae1;margin-bottom:4px;
  opacity:0.7;
}
.result-placeholder-text{
  font-size:0.88rem;color:#b0b3b8;line-height:1.7;letter-spacing:0.3px;
}
.highlight{background-color:#ffeb3b;color:#000;border-radius:2px;padding:0 2px;}
.current-highlight{background-color:#ff9800;color:#fff;}

/* ===== Modal ===== */
.modal-mask{
  position:fixed;top:0;left:0;width:100%;height:100%;
  background:rgba(0,0,0,0.5);
  display:flex;align-items:center;justify-content:center;
  z-index:1000;visibility:hidden;opacity:0;transition:0.2s;
}
.modal-mask.active{visibility:visible;opacity:1;}
.modal-mask.show{display:flex;}
/* ===== 公告弹窗 ===== */
.announce-dialog {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    max-height: 78vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: announceIn 0.3s ease;
}
@keyframes announceIn { from { transform: scale(0.92) translateY(10px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.announce-header {
    text-align: center;
    padding: 28px 24px 12px;
}
.announce-icon {
    display: inline-flex;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff7e6;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #e6a23c;
}
.announce-title {
    color: #303133;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.announce-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 24px 16px;
    color: #606266;
    line-height: 1.8;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}
.announce-body::-webkit-scrollbar { width: 4px; }
.announce-body::-webkit-scrollbar-thumb { background: #dcdfe6; border-radius: 4px; }
.announce-footer {
    padding: 12px 24px 20px;
    text-align: center;
    border-top: 1px solid #ebeef5;
}
.announce-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 40px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    outline: none;
    width: 100%;
}
.announce-btn-disabled {
    background: #ebeef5;
    color: #c0c4cc;
    cursor: not-allowed;
}
.announce-btn-enabled {
    background: #409eff;
    color: #fff;
}
.announce-btn-enabled:hover {
    background: #337ecc;
}
.announce-btn-enabled:active {
    transform: scale(0.97);
}
}
@keyframes bounceHint{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(4px);}
}
.bounce-hint{animation:bounceHint 1.2s ease-in-out infinite;display:inline-block;}
.modal-container{
  background:#ffffff;border-radius:16px;padding:28px 24px;
  width:90%;max-width:400px;box-shadow:0 20px 60px rgba(0,0,0,0.2);
}
.modal-container h3{font-size:1.15rem;margin-bottom:10px;font-weight:700;color:#303133;}
.modal-container p{font-size:0.85rem;color:#909399;margin-bottom:16px;}
.modal-container input{
  width:100%;padding:12px 16px;border:2px solid #e4e7ed;
  border-radius:10px;margin:12px 0;font-size:0.95rem;
  outline:none;transition:all 0.3s;text-align:center;
  letter-spacing:2px;font-weight:600;
}
.modal-container input:focus{border-color:#409eff;box-shadow:0 0 0 4px rgba(64,158,255,0.08);}
.modal-buttons{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;}
.modal-btn{
  padding:10px 22px;border-radius:10px;border:none;cursor:pointer;
  background:#f5f7fa;border:1px solid #dcdfe6;font-size:0.88rem;
  font-weight:500;transition:all 0.2s;
}
.modal-btn:hover{background:#ecf5ff;border-color:#409eff;color:#409eff;}
.modal-btn:disabled{opacity:0.4;cursor:not-allowed;}
.modal-btn.primary{
  background:linear-gradient(135deg,#409eff,#337ecc);color:white;border:none;
  box-shadow:0 4px 14px rgba(64,158,255,0.3);
}
.modal-btn.primary:hover{box-shadow:0 6px 20px rgba(64,158,255,0.45);transform:translateY(-1px);}
.buy-link-btn{
  background:linear-gradient(135deg,#67c23a,#529b2e);color:white;border:none;
  box-shadow:0 4px 14px rgba(103,194,58,0.3);
}
.buy-link-btn:hover{box-shadow:0 6px 20px rgba(103,194,58,0.45);transform:translateY(-1px);}

/* ===== Promo Card ===== */
.promo-card{
  background:linear-gradient(135deg,#fff8f6,#fff3ed,#fef7f2);
  border:1.5px solid #ffdfcc;border-radius:16px;
  padding:18px 24px;margin-bottom:18px;
  display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:12px;
  box-shadow:0 2px 16px rgba(238,90,36,0.06);
  transition:box-shadow 0.3s;
}
.promo-card:hover{box-shadow:0 4px 24px rgba(238,90,36,0.1);}
.promo-link{
  background:linear-gradient(135deg,#ff6b6b,#ee5a24);
  color:#fff;padding:11px 30px;border-radius:30px;
  text-decoration:none;font-weight:700;font-size:0.9rem;
  transition:0.3s;box-shadow:0 4px 16px rgba(238,90,36,0.35);
  white-space:nowrap;letter-spacing:0.3px;
}
.promo-link:hover{transform:translateY(-2px) scale(1.03);box-shadow:0 8px 28px rgba(238,90,36,0.45);}
.free-link{
  color:#ee5a24;text-decoration:none;font-size:0.73rem;font-weight:600;
  padding:5px 14px;border-radius:14px;
  background:rgba(238,90,36,0.06);transition:all 0.2s;
}
.free-link:hover{background:rgba(238,90,36,0.12);color:#ff6b6b;text-decoration:none;}

/* ===== Profile Page ===== */
.profile-page{padding:24px 20px;}
.profile-page .container{max-width:600px;}
.profile-page .header{
  display:block;
  justify-content:normal;
  gap:normal;
}
.profile-page .container{max-width:600px;}
.profile-content{padding:24px;}
.avatar-area{text-align:center;margin-bottom:24px;}

/* ===== Admin Panel ===== */
.admin-body{
  background:linear-gradient(135deg,#f0f2f5 0%,#e8ecf1 100%);
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  padding:12px 8px 20px;font-size:14px;color:#1f2d3d;
  min-height:100vh;
}
.admin-container{max-width:1000px;margin:0 auto;}

.top-header{
  background:linear-gradient(135deg,#1a1a2e 0%,#16213e 50%,#0f3460 100%);
  border-radius:16px;padding:16px 24px;margin-bottom:14px;
  display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:10px;
  box-shadow:0 8px 32px rgba(15,52,96,0.25);
  position:relative;overflow:hidden;
}
.top-header::before{
  content:'';position:absolute;top:-60px;right:-40px;
  width:180px;height:180px;
  background:radial-gradient(circle,rgba(64,158,255,0.15) 0%,transparent 70%);
  border-radius:50%;
}
.top-header::after{
  content:'';position:absolute;bottom:-40px;left:20%;
  width:120px;height:120px;
  background:radial-gradient(circle,rgba(102,126,234,0.1) 0%,transparent 70%);
  border-radius:50%;
}
.header-left{display:flex;align-items:center;gap:14px;position:relative;z-index:1;}
.header-logo{
  width:44px;height:44px;border-radius:12px;
  background:linear-gradient(135deg,#409eff 0%,#667eea 100%);
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-size:1.3rem;
  box-shadow:0 4px 15px rgba(64,158,255,0.4);
  flex-shrink:0;overflow:hidden;
}
.header-logo img{width:100%;height:100%;object-fit:cover;}
.header-info h1{color:#fff;font-size:1.05rem;font-weight:700;margin:0;display:flex;align-items:center;gap:8px;}
.header-badge{
  display:inline-block;font-size:0.55rem;font-weight:500;
  background:rgba(64,158,255,0.25);color:#7ec8ff;
  padding:2px 8px;border-radius:10px;border:1px solid rgba(64,158,255,0.3);
}
.header-info p{color:rgba(255,255,255,0.55);font-size:0.7rem;margin:3px 0 0 0;}
.header-actions{display:flex;align-items:center;gap:8px;position:relative;z-index:1;}
.header-btn{
  color:rgba(255,255,255,0.8);text-decoration:none;
  font-size:0.75rem;padding:7px 14px;border-radius:8px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.1);
  transition:all 0.2s;
  display:flex;align-items:center;gap:5px;
}
.header-btn:hover{background:rgba(255,255,255,0.15);color:#fff;border-color:rgba(255,255,255,0.2);}
.header-btn.logout{background:rgba(245,108,108,0.15);border-color:rgba(245,108,108,0.2);color:#f78989;}
.header-btn.logout:hover{background:rgba(245,108,108,0.25);color:#f56c6c;}

.top-nav{
  display:none;gap:2px;padding:6px;margin:12px 0 20px;
  background:#fff;border-radius:12px;
  box-shadow:0 2px 12px rgba(0,0,0,0.06);
  position:relative;z-index:2;
}
.top-nav-item{
  flex:1;display:flex;align-items:center;justify-content:center;
  gap:5px;padding:10px 8px;border-radius:8px;
  text-decoration:none;color:#606266;font-size:0.8rem;font-weight:500;
  transition:all 0.2s;
}
.top-nav-item:hover{background:#f0f5ff;color:#409eff;}
.top-nav-item.active{background:#ecf5ff;color:#409eff;font-weight:600;}
.top-nav-item i{font-size:0.85rem;}

.page{display:none;}
.page.active{display:block;}
.page-card{
  background:#fff;border-radius:14px;
  border:1px solid rgba(228,231,237,0.6);
  overflow:hidden;margin-bottom:12px;
  box-shadow:0 2px 12px rgba(0,0,0,0.04);
}
.page-card .card-title{
  padding:12px 18px;
  background:linear-gradient(90deg,#f8f9fc,#fff);
  border-bottom:1px solid #e4e7ed;
  font-weight:700;font-size:0.9rem;color:#303133;
}
.page-card .card-title span{font-weight:400;font-size:0.7rem;color:#909399;}
.page-card .card-body{padding:14px 18px;}

/* ===== Stats Grid ===== */
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:5px;}
.stat-card{
  background:#fff;border-radius:12px;padding:16px 12px;
  text-align:center;border:1px solid #ebeef5;
  box-shadow:0 1px 3px rgba(0,0,0,0.04);
}
.stat-card.clickable{cursor:pointer;border-left-width:3px;}
.stat-card.clickable:hover{box-shadow:0 2px 12px rgba(0,0,0,0.08);}
.stat-card.action-danger{border-left:3px solid #f56c6c;border-radius:12px;}
.stat-card.action-danger .stat-label{color:#f56c6c;}
.stat-card.action-warning{border-left:3px solid #e6a23c;border-radius:12px;}
.stat-card.action-warning .stat-label{color:#e6a23c;}
.stat-card.action-info{border-left:3px solid #409eff;border-radius:12px;}
.stat-card.action-info .stat-label{color:#409eff;}
.stat-card.success-card{border-top:3px solid #67c23a;border-radius:12px;}
.stat-card.purple-card{border-top:3px solid #764ba2;border-radius:12px;}
.stat-number{font-size:1.8rem;font-weight:800;color:#303133;line-height:1.2;letter-spacing:-0.5px;}
.stat-label{font-size:0.7rem;color:#909399;margin-top:4px;font-weight:500;}
.stat-card .highlight{color:#f56c6c;}
.stat-card .success{color:#67c23a;}
.stat-card .warning{color:#e6a23c;}
.stat-card .purple{color:#764ba2;}

/* ===== Tables ===== */
.filter-bar{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px;align-items:center;}
.filter-bar input,.filter-bar select{
  padding:5px 10px;border:1px solid #dcdfe6;
  border-radius:6px;font-size:0.75rem;outline:none;
  background:#fafbfc;
}
.filter-bar input:focus,.filter-bar select:focus{
  border-color:#409eff;box-shadow:0 0 0 3px rgba(64,158,255,0.1);background:#fff;
}
.filter-bar button{padding:5px 14px;border-radius:6px;font-size:0.75rem;border:none;cursor:pointer;}

.table-responsive{overflow-x:auto;}
table{width:100%;border-collapse:collapse;font-size:0.78rem;}
th,td{border-bottom:1px solid #ebeef5;padding:10px 8px;text-align:left;}
th{
  background:#f7f9fc;font-weight:700;color:#606266;
  font-size:0.65rem;text-transform:uppercase;letter-spacing:0.5px;
}
td{vertical-align:middle;}
tr:hover td{background:#f8faff;}

.action-icons{display:flex;gap:4px;flex-wrap:wrap;align-items:center;}
.action-icons button{
  color:#606266;font-size:0.65rem;padding:3px 10px;border-radius:5px;
  background:#f5f7fa;border:1px solid #e4e7ed;cursor:pointer;
}
.action-icons button:hover{background:#ecf5ff;border-color:#409eff;color:#409eff;}
.action-icons button.danger{color:#f56c6c;}
.action-icons button.danger:hover{background:#fef0f0;border-color:#f56c6c;}
.action-icons .count-click{
  font-weight:700;font-size:1.3rem;color:#409eff;cursor:pointer;
  padding:2px 8px;border-radius:4px;min-width:40px;
  display:inline-block;text-align:center;background:transparent;border:1px dashed transparent;
}
.action-icons .count-click:hover{background:#ecf5ff;border-color:#409eff;}
.action-icons .count-click.editing{border-color:#409eff;background:#ecf5ff;}
.action-icons .count-input{
  width:60px;padding:3px 6px;border:1px solid #409eff;
  border-radius:4px;font-size:0.9rem;text-align:center;
  font-weight:700;color:#409eff;display:none;background:#fff;
}
.action-icons .user-btn{
  display:inline-block;font-size:0.65rem;padding:2px 8px;border-radius:4px;
  text-decoration:none;
}
.action-icons .user-btn.act-edit{color:#e6a23c;border:1px solid #e6a23c;background:#fef9f0;}
.action-icons .user-btn.act-edit:hover{background:#e6a23c;color:#fff;}
.action-icons .user-btn.act-del{color:#f56c6c;border:1px solid #f56c6c;background:#fef5f5;}
.action-icons .user-btn.act-del:hover{background:#f56c6c;color:#fff;}

/* User action buttons (standalone, outside .action-icons) */
.user-btn{
  display:inline-block;font-size:0.65rem;padding:3px 10px;border-radius:4px;
  text-decoration:none;font-weight:500;
}
.user-btn.act-edit{color:#e6a23c;border:1px solid #e6a23c;background:#fef9f0;}
.user-btn.act-edit:hover{background:#e6a23c;color:#fff;}
.user-btn.act-del{color:#f56c6c;border:1px solid #f56c6c;background:#fef5f5;}
.user-btn.act-del:hover{background:#f56c6c;color:#fff;}

/* ===== Tabs ===== */
.tab-bar{
  display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px;
  border-bottom:2px solid #f0f2f5;padding-bottom:8px;
}
.tab-btn{
  background:#f5f7fa;border:1px solid #e4e7ed;
  border-radius:16px;padding:3px 14px;color:#606266;
  text-decoration:none;font-size:0.7rem;cursor:pointer;
  font-weight:500;
}
.tab-btn:hover{background:#ecf5ff;border-color:#409eff;color:#409eff;}
.tab-btn.active{
  background:#409eff;color:#fff;border-color:#409eff;
  box-shadow:0 2px 8px rgba(64,158,255,0.25);
}

/* ===== Pagination ===== */
.pagination{display:flex;gap:4px;margin-top:10px;flex-wrap:wrap;}
.pagination a{
  background:#fff;border:1px solid #dcdfe6;
  padding:3px 10px;border-radius:4px;text-decoration:none;
  color:#606266;font-size:0.7rem;cursor:pointer;
}
.pagination a:hover{background:#ecf5ff;border-color:#409eff;color:#409eff;}
.pagination a.active{
  background:#409eff;color:#fff;border-color:#409eff;
  box-shadow:0 2px 8px rgba(64,158,255,0.2);
}

/* ===== Cards Stats ===== */
.cards-stats{
  background:linear-gradient(135deg,#e6f7ff,#f0faff);
  border:1px solid #91d5ff;border-radius:8px;
  padding:8px 14px;margin-bottom:10px;text-align:center;
}
.cards-stats span{font-weight:700;font-size:0.85rem;margin:0 12px;}
.cards-stats .total{color:#409eff;}
.cards-stats .unused{color:#67c23a;cursor:pointer;}
.cards-stats .used{color:#909399;cursor:pointer;}
.cards-stats span:hover{opacity:0.7;}

/* ===== Bottom Nav ===== */
.bottom-nav{
  display:flex;position:fixed;bottom:0;left:0;right:0;
  background:#fff;border-top:1px solid #e4e7ed;
  padding:6px 0;z-index:999;justify-content:space-around;
  box-shadow:0 -4px 20px rgba(0,0,0,0.05);
}
.bottom-nav .nav-item{
  display:flex;flex-direction:column;align-items:center;
  text-decoration:none;color:#909399;font-size:0.5rem;
  padding:2px 0;min-width:44px;border:none;
  background:none;cursor:pointer;
}
.bottom-nav .nav-item.active{color:#409eff;}
.bottom-nav .nav-item:active{transform:scale(0.92);}
.bottom-nav .nav-icon{font-size:1.2rem;line-height:1.3;}
.bottom-nav .nav-label{font-size:0.5rem;margin-top:2px;font-weight:500;}

/* ===== FAB ===== */
.fab-group{
  display:none;position:fixed;bottom:65px;right:12px;
  flex-direction:column;gap:6px;z-index:998;
}
.fab-btn{
  width:44px;height:44px;border-radius:50%;border:none;
  box-shadow:0 4px 15px rgba(0,0,0,0.15);
  display:flex;flex-direction:column;align-items:center;
  justify-content:center;color:#fff;font-size:0.45rem;
  cursor:pointer;
}
.fab-btn:active{transform:scale(0.9);}
.fab-btn .fab-icon{font-size:1.1rem;}
.fab-btn.primary{background:#409eff;}
.fab-btn.success{background:#67c23a;}

/* ===== Toast ===== */
.toast{
  position:fixed;top:20px;left:50%;transform:translateX(-50%);
  padding:10px 22px;border-radius:8px;color:#fff;z-index:9999;
  font-size:0.85rem;box-shadow:0 4px 20px rgba(0,0,0,0.15);
  display:none;animation:toastIn 0.3s;font-weight:500;
}
@keyframes toastIn{from{transform:translateX(-50%) translateY(-20px);opacity:0;}to{transform:translateX(-50%) translateY(0);opacity:1;}}
.toast.success{background:#67c23a;}
.toast.error{background:#f56c6c;}
.toast.info{background:#409eff;}

/* ===== Modal Overlay (admin) ===== */
.modal-overlay{
  display:none;position:fixed;top:0;left:0;width:100%;height:100%;
  background:rgba(0,0,0,0.5);z-index:1000;
  align-items:center;justify-content:center;
}
.modal-overlay.show{display:flex;}
.modal-content{
  background:#fff;border-radius:16px;padding:20px;
  width:92%;max-width:440px;max-height:90vh;
  overflow-y:auto;animation:modalIn 0.3s;
  box-shadow:0 20px 60px rgba(0,0,0,0.2);
}
@keyframes modalIn{from{transform:scale(0.92) translateY(10px);opacity:0;}to{transform:scale(1) translateY(0);opacity:1;}}
.modal-content h3{margin-bottom:10px;font-size:1rem;border-bottom:2px solid #f0f2f5;padding-bottom:8px;font-weight:700;}
.safety-modal-header{text-align:center;margin-bottom:16px;padding-bottom:12px;border-bottom:1px solid #f0f2f5;}
.safety-modal-header h3{margin:6px 0 2px 0;font-size:1.05rem;border-bottom:none;padding-bottom:0;}
.safety-modal-header i{display:inline-block;background:#fff3e0;width:40px;height:40px;line-height:40px;border-radius:50%;margin-bottom:4px;}
.modal-content .form-group{margin-bottom:10px;}
.modal-content label{display:block;margin-bottom:3px;font-weight:600;font-size:0.8rem;color:#303133;}
.modal-content input,.modal-content select,.modal-content textarea{
  width:100%;padding:6px 10px;border:1px solid #dcdfe6;
  border-radius:6px;font-size:0.85rem;outline:none;
  background:#fafbfc;
}
.modal-content input:focus,.modal-content select:focus,.modal-content textarea:focus{
  border-color:#409eff;box-shadow:0 0 0 3px rgba(64,158,255,0.1);background:#fff;
}

/* ===== Settings ===== */
.flex-between{
  display:flex;justify-content:space-between;align-items:center;
  flex-wrap:wrap;gap:6px;margin-bottom:10px;
}
.settings-buttons{display:flex;flex-direction:column;gap:10px;}
.settings-btn{
  display:flex;align-items:center;
  width:100%;padding:14px 16px;border:none;
  background:#fff;cursor:pointer;font-size:0.85rem;
  border-radius:12px;box-shadow:0 1px 4px rgba(0,0,0,0.06);
  text-align:left;color:#303133;
  transition:all 0.2s;
}
.settings-btn:hover{
  background:#fff;color:#409eff;
  box-shadow:0 4px 14px rgba(64,158,255,0.15);
  transform:translateY(-1px);
}
.settings-btn-icon{
  width:38px;height:38px;border-radius:10px;
  display:flex;align-items:center;justify-content:center;
  margin-right:14px;font-size:1rem;flex-shrink:0;
}
.settings-btn-label{flex:1;font-weight:500;}
.settings-btn-arrow{color:#c0c4cc;font-size:0.75rem;margin-left:8px;}
.settings-btn:hover .settings-btn-arrow{color:#409eff;}

.cleanup-section{
  background:#f8f9fb;border-radius:10px;padding:14px;margin-bottom:10px;
  border:1px solid #ebeef5;
}
.cleanup-section-title{
  font-size:0.82rem;font-weight:600;color:#303133;margin-bottom:10px;
  padding-bottom:8px;border-bottom:1px solid #e4e7ed;
}
.cleanup-section-title i{margin-right:6px;}
.cleanup-btn-row{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;}
.cleanup-btn{
  padding:5px 12px;border-radius:6px;font-size:0.72rem;
  border:1px solid #dcdfe6;background:#fff;color:#303133;
  cursor:pointer;white-space:nowrap;
}
.cleanup-btn:hover{background:#f5f7fa;border-color:#c0c4cc;}
.cleanup-btn i{margin-right:3px;font-size:0.65rem;}
.cleanup-btn.danger{color:#f56c6c;border-color:#fde2e2;background:#fef0f0;}
.cleanup-btn.danger:hover{background:#fde2e2;}
.cleanup-date-row{display:flex;gap:6px;align-items:center;}
.cleanup-date-row label{font-size:0.7rem;color:#909399;white-space:nowrap;}
.cleanup-date-row input[type="date"]{
  flex:1;padding:5px 8px;border:1px solid #dcdfe6;
  border-radius:6px;font-size:0.72rem;background:#fff;outline:none;
}
.cleanup-date-row input[type="date"]:focus{border-color:#409eff;}
.cleanup-hint{font-size:0.6rem;color:#b0b3b8;margin-top:8px;text-align:center;}

/* ===== Log Tags ===== */
.log-api-tag{display:inline-block;padding:1px 8px;border-radius:10px;font-size:0.55rem;font-weight:600;}
.log-api-tag.api1{background:#ecf5ff;color:#409eff;}
.log-api-tag.api2{background:#f0f9ec;color:#67c23a;}
.log-api-tag.unknown{background:#f5f7fa;color:#909399;}

/* ===== Status Dots ===== */
.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:4px;}
.status-dot.unused{background:#67c23a;}
.status-dot.used{background:#909399;}

/* ===== Loading ===== */
.loading-placeholder{text-align:center;padding:30px;color:#909399;font-size:0.85rem;}
.loading-placeholder .spinner{
  display:inline-block;width:22px;height:22px;
  border:3px solid #e4e7ed;border-top-color:#409eff;
  border-radius:50%;animation:spin 0.7s linear infinite;
  margin-right:8px;vertical-align:middle;
}
@keyframes spin{to{transform:rotate(360deg);}}

/* ===== Back Button ===== */
.back-btn{
  display:inline-block;margin-bottom:15px;padding:6px 12px;
  background:#409eff;color:#fff;border-radius:4px;text-decoration:none;
}
.back-btn:hover{background:#66b1ff;}

/* ===== Login Header ===== */
.login-header{text-align:center;margin-bottom:28px;}
.login-header h2{font-size:1.6rem;font-weight:600;color:#303133;margin-bottom:8px;}
.login-header p{font-size:0.8rem;color:#909399;}

/* ===== Responsive ===== */
@media (max-width:768px){
  .admin-body{padding:4px 3px 55px;font-size:12px;}
  .top-header{padding:10px 12px;border-radius:12px;margin-bottom:10px;}
  .header-logo{width:34px;height:34px;font-size:0.9rem;border-radius:10px;}
  .header-btn{font-size:0.6rem;padding:4px 8px;}
  .top-nav-item{font-size:0.65rem;padding:6px 2px;gap:3px;}
  .top-nav-item i{font-size:0.7rem;}
  .stats-grid{grid-template-columns:repeat(3,1fr);gap:5px;}
  .stat-card{padding:8px 4px;}
  .stat-card .stat-number{font-size:1.1rem;}
  .stat-card .stat-label{font-size:0.5rem;}
  .filter-bar{flex-direction:column;align-items:stretch;}
  .filter-bar form{display:flex;flex-direction:column;gap:3px;}
  .filter-bar input,.filter-bar select{width:100%;}
  .page-card .card-title{font-size:0.8rem;padding:8px 12px;}
  .page-card .card-body{padding:8px 10px;}
  .cards-stats span{font-size:0.7rem;margin:0 5px;}
  .flex-between{flex-direction:column;align-items:stretch;}
  .tab-bar{justify-content:center;}
  .tab-btn{font-size:0.6rem;padding:2px 8px;}
  .pagination{justify-content:center;}
  .pagination a{padding:2px 6px;font-size:0.6rem;}
  .modal-content{width:95%;padding:12px;}
  .bottom-nav .nav-icon{font-size:1rem;}
  .remain-number{font-size:1.4rem;white-space:normal;word-break:break-word;}
  .hero-stats{gap:6px;}
  .hero-stat{padding:8px 4px;}
  .hero-stat-num{font-size:1.15rem;}
}
@media (max-width:600px){
  .hero-top{flex-direction:column;text-align:center;gap:10px;}
  .hero-actions{justify-content:center;}
  .hero-stats{grid-template-columns:repeat(3,1fr);gap:6px;}
  .action-buttons{flex-direction:column;}
  .query-section,.card{padding:16px !important;}
  .result-box{padding:20px 16px;min-height:120px;}
  .result-toolbar{justify-content:center;}
  .result-search-group input{width:80px;}
  .promo-card{flex-direction:column;text-align:center;padding:12px 16px;}
}
@media (max-width:400px){
  .stats-grid{grid-template-columns:repeat(2,1fr);}
}
.desktop-table{display:block;}
.mobile-card{display:none;}

@media (max-width:768px){
  .desktop-table{display:none !important;}
  .mobile-card{display:block !important;}
  .bottom-nav{display:flex !important;}
  .fab-group{display:flex !important;}
  .top-nav{display:none !important;}
}

@media (min-width:769px){
  .desktop-table{display:block !important;}
  .mobile-card{display:none !important;}
  .bottom-nav{display:none !important;}
  .fab-group{display:none !important;}
  .top-nav{display:flex !important;}
}

/* ===== Auth Pages Redesign (login, register, forgot_password) ===== */
.auth-container{
  min-height:100vh;
  display:flex;align-items:center;justify-content:center;
  padding:24px 16px;
  background:linear-gradient(135deg,#e8ecf1 0%,#f0f2f5 50%,#eef2f7 100%);
}
.login-container,
.register-container,
.reset-container{
  width:100%;background:#fff;
  border-radius:20px;overflow:hidden;
  box-shadow:0 8px 32px rgba(0,0,0,0.08),0 2px 8px rgba(0,0,0,0.04);
}
.login-container{max-width:420px;}
.register-container{max-width:480px;}
.reset-container{max-width:420px;}

/* Auth card header */
.auth-card-header{
  background:linear-gradient(135deg,#1a1a2e 0%,#16213e 40%,#0f3460 100%);
  padding:28px 24px 22px;text-align:center;color:#fff;
  position:relative;overflow:hidden;
}
.auth-card-header::before{
  content:'';position:absolute;
  top:-50%;right:-30%;width:200px;height:200px;
  background:rgba(255,255,255,0.03);
  border-radius:50%;
}
.auth-card-header .auth-icon{
  width:56px;height:56px;border-radius:14px;
  background:linear-gradient(135deg,#409eff 0%,#667eea 100%);
  display:inline-flex;align-items:center;justify-content:center;
  font-size:1.6rem;font-weight:700;margin-bottom:12px;
  box-shadow:0 4px 16px rgba(64,158,255,0.3);
  overflow:hidden;
}
.auth-card-header .auth-icon img{
  width:100%;height:100%;object-fit:cover;
}
.auth-card-header h2{font-size:1.3rem;font-weight:600;margin-bottom:4px;}
.auth-card-header .auth-sub{font-size:0.75rem;color:rgba(255,255,255,0.6);}
.auth-card-header .auth-sub i{margin:0 4px;}

/* Auth card body */
.auth-card-body{padding:28px 24px;}

/* Auth form inputs */
.auth-card-body .input-group{margin-bottom:18px;}
.auth-card-body .input-group label{
  display:block;margin-bottom:5px;color:#606266;
  font-size:0.8rem;font-weight:500;
}
.auth-card-body .input-group input{
  width:100%;padding:11px 14px;
  background:#f8fafc;border:1.5px solid #e4e7ed;
  border-radius:10px;font-size:0.88rem;outline:none;
  color:#303133;transition:all 0.2s;
}
.auth-card-body .input-group input:focus{
  background:#fff;border-color:#409eff;
  box-shadow:0 0 0 3px rgba(64,158,255,0.08);
}
.auth-card-body .input-group input::placeholder{color:#c0c4cc;}

/* Auth submit button */
.auth-submit-btn{
  width:100%;padding:12px;
  background:linear-gradient(135deg,#409eff,#2563eb);
  border:none;border-radius:12px;color:#fff;
  font-weight:600;font-size:0.95rem;cursor:pointer;
  margin-top:8px;transition:all 0.3s;
  box-shadow:0 4px 14px rgba(37,99,235,0.25);
}
.auth-submit-btn:hover{
  box-shadow:0 6px 22px rgba(37,99,235,0.4);
  transform:translateY(-1px);
}
.auth-submit-btn:disabled{opacity:0.5;cursor:not-allowed;transform:none;box-shadow:none;}
.auth-submit-btn:active{transform:scale(0.97);}
.auth-submit-btn i{margin-right:6px;}

/* Auth footer links */
.auth-footer{
  text-align:center;margin-top:20px;padding-top:18px;
  border-top:1px solid #f0f0f0;color:#909399;font-size:0.82rem;
}
.auth-footer a{color:#409eff;text-decoration:none;font-weight:500;}
.auth-footer a:hover{text-decoration:underline;}

/* Error / success in auth card body */
.auth-card-body .error-msg{margin-bottom:16px;}
.auth-card-body .error-msg,.auth-card-body .success-msg{margin-bottom:16px;}

/* ===== Profile Page Upgrade ===== */
.profile-card{
  width:100%;max-width:520px;background:#fff;
  border-radius:20px;overflow:hidden;
  box-shadow:0 8px 32px rgba(0,0,0,0.08),0 2px 8px rgba(0,0,0,0.04);
}
.profile-header{
  background:linear-gradient(135deg,#1a1a2e 0%,#16213e 40%,#0f3460 100%);
  padding:32px 24px;text-align:center;color:#fff;
  position:relative;overflow:hidden;
}
.profile-header::before{
  content:'';position:absolute;
  top:-60%;right:-40%;width:240px;height:240px;
  background:rgba(255,255,255,0.03);
  border-radius:50%;
}
.profile-avatar{
  width:80px;height:80px;border-radius:50%;
  border:3px solid rgba(255,255,255,0.3);
  margin-bottom:12px;object-fit:cover;
  background:#0f3460;
}
.profile-header h2{font-size:1.2rem;font-weight:600;margin-bottom:4px;}
.profile-header .profile-sub{font-size:0.75rem;color:rgba(255,255,255,0.55);}
.profile-body{padding:28px 24px;}
.profile-body .form-group{margin-bottom:18px;}
.profile-body .form-group label{
  display:block;margin-bottom:5px;color:#606266;
  font-size:0.8rem;font-weight:500;
}
.profile-body .form-group input{
  width:100%;padding:11px 14px;
  background:#f8fafc;border:1.5px solid #e4e7ed;
  border-radius:10px;font-size:0.88rem;outline:none;
  color:#303133;transition:all 0.2s;
}
.profile-body .form-group input:focus{
  background:#fff;border-color:#409eff;
  box-shadow:0 0 0 3px rgba(64,158,255,0.08);
}
.profile-body .tips{font-size:0.7rem;color:#909399;margin-top:4px;}
.profile-submit-btn{
  width:100%;padding:12px;
  background:linear-gradient(135deg,#409eff,#2563eb);
  border:none;border-radius:12px;color:#fff;
  font-weight:600;font-size:0.95rem;cursor:pointer;
  margin-top:8px;transition:all 0.3s;
  box-shadow:0 4px 14px rgba(37,99,235,0.25);
}
.profile-submit-btn:hover{
  box-shadow:0 6px 22px rgba(37,99,235,0.4);
  transform:translateY(-1px);
}
.profile-submit-btn:disabled{opacity:0.5;cursor:not-allowed;transform:none;box-shadow:none;}
.profile-footer{
  text-align:center;padding:0 24px 24px;
  display:flex;gap:16px;justify-content:center;flex-wrap:wrap;
}
.profile-footer a{
  color:#606266;text-decoration:none;font-size:0.85rem;
  padding:8px 16px;border-radius:8px;
  background:#f5f7fa;transition:all 0.2s;
}
.profile-footer a:hover{background:#ecf5ff;color:#409eff;}

/* ===== Legacy compatibility classes ===== */

/* Honeypot */
.honeypot{position:absolute;left:-9999px;top:-9999px;opacity:0;height:0;width:0;}

/* Tips (used both inside and outside .form-group) */
.tips{font-size:0.7rem;color:#909399;margin-top:4px;}

/* Card title standalone (rz.php and others) */
.card-title{font-size:1rem;font-weight:600;color:#303133;}

/* rz.php */
.card-header{
  padding:12px 20px;background:#fafbfc;
  border-bottom:1px solid #e4e7ed;
}
.card-header .card-title{font-size:1rem;font-weight:600;color:#303133;}
.card-content{padding:20px;}
.card-content.collapsed{display:none;}

.card-title{cursor:pointer;user-select:none;}
.card-title:hover{background:#f5f7fa;}
.card-body.collapsed{display:none;}

/* ===== Invite Card ===== */
.invite-card {
    background: linear-gradient(135deg, #fff9f9, #fff5f0);
    border: 1px solid #fde2d3;
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
    box-shadow: 0 2px 16px rgba(245,108,108,0.06), 0 1px 4px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}
.invite-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,108,108,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.invite-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.invite-head-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f56c6c, #f89880);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(245,108,108,0.25);
}
.invite-head-text {
    flex: 1;
    min-width: 0;
}
.invite-head-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #303133;
    display: block;
    letter-spacing: 0.02em;
}
.invite-head-desc {
    font-size: 0.68rem;
    color: #909399;
    display: block;
    margin-top: 2px;
}
.invite-head-desc strong {
    color: #e6a23c;
    font-weight: 800;
}
.invite-badge {
    font-size: 0.68rem;
    color: #67c23a;
    background: #f0f9eb;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(103,194,58,0.12);
}
.invite-progress-section {
    margin-bottom: 4px;
    position: relative;
}
.invite-progress-bar {
    height: 8px;
    background: #fef0e4;
    border-radius: 5px;
    overflow: visible;
    margin-bottom: 8px;
    position: relative;
}
.invite-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f56c6c, #f89880, #f56c6c);
    border-radius: 5px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.invite-progress-steps {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
}
.invite-step-dot {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #fde2d3;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.invite-step-dot.filled {
    background: #f56c6c;
    border-color: #f56c6c;
    box-shadow: 0 0 0 2px rgba(245,108,108,0.2);
}
.invite-progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}
.invite-progress-text {
    font-size: 0.78rem;
    font-weight: 800;
    color: #f56c6c;
}
.invite-progress-tip {
    font-size: 0.68rem;
    color: #909399;
}
.invite-progress-tip strong {
    color: #e6a23c;
    font-weight: 800;
}
.invite-progress-tip.done {
    color: #67c23a;
    font-weight: 700;
}
.invite-progress-daily {
    font-size: 0.65rem;
    color: #909399;
    width: 100%;
    margin-top: 4px;
    padding: 6px 10px;
    background: #f0f9ff;
    border-radius: 8px;
    text-align: center;
}
.invite-progress-daily strong {
    color: #409eff;
    font-weight: 800;
}
.invite-continue-btn {
    width: 100%;
    margin-top: 8px;
    padding: 8px 0;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #67c23a, #529b2e);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s;
    box-shadow: 0 3px 10px rgba(103,194,58,0.25);
}
.invite-continue-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(103,194,58,0.3);
}
.invite-share {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #fde8d8;
    padding-top: 12px;
    margin-top: 4px;
}
.invite-share-label {
    font-size: 0.7rem;
    color: #909399;
    white-space: nowrap;
}
.invite-share-main {
    margin-left: auto;
    padding: 7px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #409eff, #3682d9);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.25s;
    box-shadow: 0 3px 10px rgba(64,158,255,0.2);
}
.invite-share-main:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(64,158,255,0.3);
}

/* ===== Share Modal ===== */
.share-dialog {
    background: #fff;
    border-radius: 14px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 24px 20px;
    animation: modalIn 0.25s;
}
.share-dialog-header {
    text-align: center;
    margin-bottom: 20px;
}
.share-dialog-icon {
    display: inline-block;
    width: 44px;
    height: 44px;
    line-height: 44px;
    border-radius: 50%;
    background: #ecf5ff;
    color: #409eff;
    font-size: 1.1rem;
    margin-bottom: 8px;
}
.share-dialog-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #303133;
    margin: 0 0 4px 0;
}
.share-dialog-header p {
    font-size: 0.72rem;
    color: #909399;
    margin: 0;
}
.share-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.share-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #ebeef5;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.share-option:hover { background: #fafbfc; }
.share-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.share-option-icon.qq { background: #e6f7ff; color: #12b7f5; }
.share-option-icon.wechat { background: #e8f8ee; color: #07c160; }
.share-option-icon.copy { background: #ecf5ff; color: #409eff; }
.share-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.share-option-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #303133;
}
.share-option-desc {
    font-size: 0.68rem;
    color: #909399;
}
.share-dialog-footer { text-align: center; }
.share-close-btn {
    padding: 8px 32px;
    border: none;
    border-radius: 8px;
    background: #f5f7fa;
    color: #606266;
    font-size: 0.8rem;
    cursor: pointer;
}

/* ===== Ads Card ===== */
.ad-card {
    background: linear-gradient(135deg, #f0f4ff, #f6f7fa);
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    padding: 0 14px;
    margin: 10px 0;
    height: 34px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: box-shadow 0.2s;
    overflow: hidden;
    position: relative;
}
.ad-card:hover { box-shadow: 0 1px 6px rgba(64,158,255,0.1); }
.ad-tag {
    font-size: 0.6rem;
    color: #fff;
    background: linear-gradient(135deg, #409eff, #337ecc);
    padding: 1px 7px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.ad-slide-wrap {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.ad-slide-item {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.ad-slide-item.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.ad-slide-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.ad-slide-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #303133;
    white-space: nowrap;
}
.ad-dots {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}
.ad-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d0d4dd;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ad-dot.active {
    background: #409eff;
    width: 14px;
    border-radius: 3px;
}

/* ===== Visit Stats ===== */
.visit-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 0;
    font-size: 0.7rem;
    color: #a8abb2;
    border-top: 1px solid #ebeef5;
    margin-top: 8px;
}
.visit-stats span { display: flex; align-items: center; gap: 4px; }
.visit-stats i { font-size: 0.75rem; }

/* ===== Safety Modal ===== */
#safetyModal { display: none; visibility: hidden; opacity: 0; }
#safetyModal.active { display: flex; visibility: visible; opacity: 1; }
.safety-dialog {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 28px 24px;
}
.safety-dialog-header {
    text-align: center;
    margin-bottom: 16px;
}
.safety-dialog-icon {
    display: inline-block;
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    background: #fff3e0;
    color: #fb8c00;
    font-size: 1.25rem;
    margin-bottom: 8px;
}
.safety-dialog-header h3 {
    font-size: 1.05rem;
    color: #303133;
    margin: 4px 0 0 0;
    font-weight: 700;
}
.safety-dialog-body {
    max-height: 40vh;
    overflow-y: auto;
    font-size: 0.85rem;
    color: #606266;
    line-height: 1.7;
    padding: 12px 14px;
    background: #fafbfc;
    border-radius: 8px;
    margin-bottom: 20px;
}
.safety-dialog-footer { text-align: center; }
.safety-btn {
    padding: 10px 36px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #409eff, #2563eb);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.safety-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}
.safety-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
