*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,"Helvetica Neue",sans-serif;background:#f5f5f5}
.login-box{width:90%;max-width:320px;margin:80px auto;background:#fff;padding:20px;border-radius:8px}
.login-box h2{text-align:center;margin-bottom:20px}
.login-box input{width:100%;height:40px;margin-bottom:12px;padding:0 10px;border:1px solid #ddd;border-radius:4px}
.login-box button{width:100%;height:40px;background:#07c160;color:#fff;border:none;border-radius:4px;font-size:16px}

.container{display:flex;flex-direction:column;height:100vh}
.header{background:#ededed;padding:10px;border-bottom:1px solid #ddd}
.header .row{display:flex;justify-content:space-between;font-size:14px;margin-bottom:4px}
.header .row span{color:#666}
.header .row b{color:#333}
.header .row .red{color:#ff0000}
.header .row .green{color:#00aa00}
#statBtn{border:1px solid #ddd;background:#fff;border-radius:3px}

.history{flex:1;overflow-y:auto;padding:10px;background:#f5f5f5}
.send-box{background:#f5f5f5;padding:8px;border-top:1px solid #ddd;display:flex}
.send-box input{flex:1;height:36px;border:1px solid #ddd;border-radius:4px;padding:0 10px;margin-right:8px}
.send-box button{width:60px;height:36px;background:#07c160;color:#fff;border:none;border-radius:4px}
.send-box #pasteBtn{width:60px;height:36px;background:#fff;color:#333;border:1px solid #ddd;border-radius:4px;margin-right:8px}

.admin-nav{background:#fff;border-bottom:1px solid #ddd;display:flex}
.admin-nav a{flex:1;text-align:center;padding:12px 0;color:#333;text-decoration:none}
.admin-nav a.active{color:#07c160;border-bottom:2px solid #07c160}
.admin-body{padding:10px}
.card{background:#fff;margin-bottom:10px;padding:12px;border-radius:4px}
.card h3{font-size:16px;margin-bottom:8px}
.card table{width:100%;font-size:14px;border-collapse:collapse}
.card th,.card td{padding:6px;border-bottom:1px solid #eee;text-align:left}
.card input[type="date"],.card input[type="number"],.card input[type="text"]{height:32px;border:1px solid #ddd;border-radius:4px;padding:0 8px}
.card button{height:32px;padding:0 12px;background:#07c160;color:#fff;border:none;border-radius:4px}

/* 每条注单样式 */
.msg-item{display:flex;align-items:flex-start;background:#fff;margin-bottom:8px;padding:8px;border-radius:4px;position:relative}
.msg-stat{flex-shrink:0;width:96px;font-size:12px;color:#666;line-height:1.4;padding-right:8px;border-right:1px solid #eee}
.msg-stat .profit{font-weight:bold}
.msg-stat .profit.up{color:#ff0000}
.msg-stat .profit.down{color:#00aa00}
.msg-body{flex:1;padding-left:8px;padding-right:116px;min-width:0}
.msg-body .time{font-size:12px;color:#999}
.msg-body .content{font-size:15px;margin:4px 0;word-break:break-all;white-space:pre-wrap}
.msg-body .op{position:absolute;right:8px;top:8px}
.msg-body .op button{font-size:12px;margin-left:4px;padding:2px 6px;background:#eee;color:#333;border:none;border-radius:3px}
.msg-body .op button:active{background:#ddd}

/* 统计弹窗 */
.modal{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,0.5);z-index:999;display:flex;align-items:center;justify-content:center}
.modal-box{width:90%;max-width:400px;max-height:80vh;background:#fff;border-radius:8px;display:flex;flex-direction:column}
.modal-title{padding:12px 16px;border-bottom:1px solid #eee;font-size:16px;font-weight:bold;display:flex;justify-content:space-between;align-items:center}
.modal-close{font-size:24px;color:#999;cursor:pointer;line-height:1}
.modal-body{flex:1;overflow-y:auto;padding:0 16px 16px}
#statTable{width:100%;border-collapse:collapse;font-size:14px}
#statTable th,#statTable td{padding:8px;border-bottom:1px solid #f0f0f0;text-align:center}
#statTable th{background:#f8f8f8;position:sticky;top:0;cursor:pointer;user-select:none}
#statTable th:active{background:#eee}

/* 紧凑显示一条消息内的多行注单 */
.msg-body .content{white-space:normal!important;margin:2px 0!important;line-height:1.15!important;}
.msg-body .content .bet-line{display:block!important;margin:0!important;padding:0!important;line-height:1.18!important;min-height:0!important;}
.msg-body .content .bet-line + .bet-line{margin-top:1px!important;}
.msg-body .content .content-click,.msg-body .content .odds-click{line-height:1.18!important;}


/* 发送框：粘贴后自动增高 + 清空按钮 */
.send-box{align-items:flex-end;gap:6px}
.send-box textarea#sendInput{flex:1;min-height:38px;height:38px;max-height:none;border:1px solid #ddd;border-radius:4px;padding:8px 10px;margin:0;font-size:16px;line-height:20px;outline:none;resize:none;overflow:hidden;white-space:pre-wrap;word-break:break-word;box-sizing:border-box}
.send-box #clearBtn{background:#fff;color:#333;border:1px solid #ddd;border-radius:4px}

/* ===== 金算盘登录/注册页 ===== */
.auth-page{
    min-height:100vh;
    min-height:100dvh;
    position:relative;
    overflow:hidden;
    background:
        radial-gradient(circle at top left, rgba(255,214,102,.24), transparent 36%),
        radial-gradient(circle at top right, rgba(255,75,75,.14), transparent 32%),
        linear-gradient(180deg, #170f08 0%, #26150d 36%, #382012 100%);
    color:#fff;
}
.auth-bg-layer{
    position:absolute;
    inset:auto;
    border-radius:999px;
    pointer-events:none;
    filter:blur(8px);
    opacity:.75;
}
.auth-bg-layer-1{
    width:180px;height:180px;
    top:56px;left:-44px;
    background:radial-gradient(circle, rgba(255,210,92,.34) 0%, rgba(255,210,92,0) 72%);
}
.auth-bg-layer-2{
    width:220px;height:220px;
    right:-70px;bottom:90px;
    background:radial-gradient(circle, rgba(239,78,52,.26) 0%, rgba(239,78,52,0) 74%);
}
.auth-shell{
    position:relative;
    z-index:1;
    min-height:100vh;
    min-height:100dvh;
    padding:22px 16px calc(24px + env(safe-area-inset-bottom));
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:14px;
}
.auth-top-showcase{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:10px;
    margin-bottom:4px;
}
.abacus-hero{
    position:relative;
    width:128px;
    height:46px;
    border:2px solid rgba(244,200,95,.88);
    border-radius:16px;
    background:linear-gradient(180deg, rgba(64,34,15,.96), rgba(35,18,8,.92));
    box-shadow:0 10px 30px rgba(0,0,0,.26), inset 0 0 0 1px rgba(255,232,175,.12);
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}
.abacus-rail{
    position:absolute;
    left:12px;right:12px;top:50%;height:2px;
    transform:translateY(-50%);
    background:linear-gradient(90deg, rgba(219,168,58,.88), rgba(255,219,117,.98), rgba(219,168,58,.88));
}
.abacus-bead{
    position:relative;
    width:16px;height:16px;border-radius:50%;
    background:radial-gradient(circle at 30% 30%, #fff0a9 0%, #f4bf43 28%, #cf8f1f 68%, #9d5d0e 100%);
    box-shadow:0 2px 10px rgba(0,0,0,.26);
}
.lucky-balls{display:flex;gap:10px;align-items:center;justify-content:center;}
.lucky-ball{
    width:42px;height:42px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    font-size:18px;font-weight:800;color:#fff;
    box-shadow:0 10px 22px rgba(0,0,0,.24), inset 0 2px 6px rgba(255,255,255,.24);
    border:2px solid rgba(255,255,255,.34);
}
.lucky-ball.red{background:linear-gradient(180deg,#ff6d59,#d52a20);}
.lucky-ball.blue{background:linear-gradient(180deg,#6aa7ff,#2c66d6);}
.lucky-ball.green{background:linear-gradient(180deg,#57d86b,#17993b);}
.auth-card{
    width:100%;
    max-width:430px;
    margin:0 auto;
    border-radius:24px;
    padding:20px 16px 18px;
    background:linear-gradient(180deg, rgba(255,252,246,.97), rgba(255,246,231,.96));
    color:#3a2410;
    box-shadow:0 18px 40px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.6);
}
.auth-card.compact-auth-card{padding-top:24px;}
.brand-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:28px;
    padding:0 12px;
    border-radius:999px;
    background:linear-gradient(90deg,#5a2f16,#8d5321);
    color:#ffe7a8;
    font-size:12px;
    font-weight:700;
    letter-spacing:.5px;
    box-shadow:0 6px 14px rgba(0,0,0,.14);
}
.brand-title{
    margin-top:0;
    margin-bottom:18px;
    text-align:center;
    font-size:40px;
    line-height:1.08;
    font-weight:900;
    letter-spacing:2px;
    color:transparent;
    background:linear-gradient(180deg,#fff7cb 0%,#ffd86f 24%,#ffb71f 54%,#f4860c 76%,#9c4700 100%);
    -webkit-background-clip:text;
    background-clip:text;
    text-shadow:0 2px 0 rgba(255,255,255,.18), 0 10px 22px rgba(149,73,0,.18);
    position:relative;
    overflow:hidden;
}
.brand-title::after{
    content:'';
    position:absolute;
    top:0;left:-18%;
    width:40%;height:100%;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,.62), transparent);
    transform:skewX(-20deg);
    animation:brandShine 3.4s linear infinite;
    pointer-events:none;
}
@keyframes brandShine{
    0%{left:-28%;opacity:0;}
    12%{opacity:1;}
    48%{opacity:1;}
    100%{left:110%;opacity:0;}
}
.brand-subtitle{
    margin-top:8px;
    text-align:center;
    font-size:18px;
    font-weight:800;
    color:#8a3f17;
}
.brand-desc{
    margin:8px auto 14px;
    max-width:320px;
    text-align:center;
    font-size:13px;
    line-height:1.65;
    color:#8d6a4c;
}
.auth-alert{
    margin:0 0 12px;
    padding:11px 12px;
    border-radius:14px;
    background:#fff1f1;
    color:#d62f27;
    border:1px solid #ffc6c4;
    font-size:14px;
    line-height:1.45;
}
.auth-form{display:flex;flex-direction:column;gap:12px;}
.auth-field{display:flex;flex-direction:column;gap:6px;}
.auth-field span{
    font-size:14px;
    color:#875f3e;
    font-weight:700;
    padding-left:2px;
}
.auth-field input{
    width:100%;
    height:48px;
    border-radius:14px;
    border:1px solid #e4c8aa;
    background:#fffefb;
    padding:0 14px;
    font-size:16px;
    color:#3a2410;
    outline:none;
    transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.auth-field input:focus{
    border-color:#e39d2f;
    box-shadow:0 0 0 4px rgba(227,157,47,.14);
    transform:translateY(-1px);
}
.auth-submit{
    margin-top:6px;
    width:100%;
    height:50px;
    border:none;
    border-radius:16px;
    font-size:18px;
    font-weight:800;
    color:#fff;
    background:linear-gradient(180deg,#f1b72e,#d88712);
    box-shadow:0 12px 24px rgba(194,110,0,.26), inset 0 1px 0 rgba(255,255,255,.3);
}
.auth-submit:active{transform:translateY(1px);}
.auth-footer-links{
    margin-top:14px;
    text-align:center;
    font-size:14px;
}
.auth-footer-links a{
    color:#8f3d0d;
    text-decoration:none;
    font-weight:700;
}
@media (min-width: 768px){
    .auth-shell{padding:30px 20px;}
    .auth-card{padding:26px 22px 22px;}
    .brand-title{font-size:48px;}
    .brand-subtitle{font-size:20px;}
}

/* ===== v106：登录/注册页精简顶部，去掉算盘图案和红蓝绿圆球 ===== */
.auth-shell.no-top-showcase{
    gap:0;
    justify-content:center;
}
.auth-shell.no-top-showcase .auth-card{
    margin-top:0;
}
.auth-shell.no-top-showcase .brand-title{
    margin-top:2px;
    margin-bottom:18px;
}
.auth-shell.no-top-showcase .brand-badge,
.auth-shell.no-top-showcase .brand-subtitle,
.auth-shell.no-top-showcase .brand-desc,
.auth-shell.no-top-showcase .auth-top-showcase,
.auth-top-showcase.removed{
    display:none!important;
}


/* ===== v116：登录/注册页底部免责声明 ===== */
.auth-disclaimer{
    margin-top:12px;
    text-align:center;
    color:#d60000;
    font-size:11px;
    line-height:1.5;
    font-weight:600;
}
@media (min-width:768px){
    .auth-disclaimer{font-size:12px;}
}
