/* ===== 基础重置 + 全局 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #0a0e1a;
    background-image: 
        radial-gradient(ellipse at 50% 0%, #1a2440 0%, #0e1428 40%, #0a0e1a 70%),
        radial-gradient(ellipse at 50% 100%, #1a2440 0%, transparent 50%);
    min-height: 100vh;
    min-height: 100dvh;
    color: #e8e0d0;
    position: relative;
    overflow-x: hidden;
}

/* 背景发光层 - 固定且始终可见 */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 120%;
    height: 60%;
    background: radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 120%;
    height: 40%;
    background: radial-gradient(ellipse at 50% 100%, rgba(201, 168, 76, 0.03) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ===== 背景Canvas占位 ===== */
#canvas-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    pointer-events: none;
}

/* ===== 顶部 ===== */
.camp-header {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 22px 0 14px;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 28px;
    margin-bottom: 16px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.8), 
                inset 0 1px 0 rgba(201, 168, 76, 0.15),
                0 0 40px rgba(201, 168, 76, 0.06);
}

.camp-title {
    font-size: 30px;
    font-weight: bold;
    color: #dbb85c;
    letter-spacing: 4px;
    text-shadow: 0 0 40px rgba(201, 168, 76, 0.15);
}

.camp-sub {
    font-size: 13px;
    color: rgba(201, 168, 76, 0.5);
    margin-top: 4px;
    letter-spacing: 3px;
}

/* ===== 登录 ===== */
.login-box {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 360px;
}

.login-form {
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 32px 24px;
    border-radius: 24px;
    width: 100%;
    max-width: 380px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.8),
                inset 0 1px 0 rgba(201, 168, 76, 0.1),
                0 0 40px rgba(201, 168, 76, 0.06);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 24px;
    color: #dbb85c;
    font-weight: 400;
    letter-spacing: 4px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid rgba(201, 168, 76, 0.25);
    background: rgba(45, 47, 53, 0.5);
    color: #f0e8d8;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    border-color: #c9a84c;
    box-shadow: 0 0 25px rgba(201, 168, 76, 0.06);
}

.form-group input::placeholder {
    color: rgba(201, 168, 76, 0.25);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    border: none;
    border-radius: 20px;
    color: #0a0e1a;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 3px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.2);
}

.btn-login:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.error-msg {
    color: #e06050;
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
}

/* ===== 主界面 ===== */
.camp-body {
    position: relative;
    z-index: 10;
    max-width: 780px;
    margin: 0 auto;
}

/* ===== 角色选择 ===== */
.role-selector {
    margin-top: 60px;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 12px 16px;
    border-radius: 24px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.8),
                inset 0 1px 0 rgba(201, 168, 76, 0.1),
                0 0 40px rgba(201, 168, 76, 0.06);
}

.role-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(201, 168, 76, 0.6);
}

.role-info select {
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(201, 168, 76, 0.25);
    background: rgba(45, 47, 53, 0.5);
    color: #f0e8d8;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.role-info select option {
    background: #0a0e1a;
}

.role-extra {
    font-size: 13px;
    color: rgba(201, 168, 76, 0.4);
}

.role-extra .last-login {
    color: rgba(201, 168, 76, 0.3);
}

.point-display {
    font-size: 16px;
    color: #dbb85c;
}

.point-num {
    font-size: 22px;
    font-weight: bold;
    color: #f0d060;
}

/* ===== Tab 菜单 ===== */
.menu-tabs {
    display: flex;
    gap: 4px;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 4px;
    margin-bottom: 12px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.8),
                inset 0 1px 0 rgba(201, 168, 76, 0.1),
                0 0 40px rgba(201, 168, 76, 0.06);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 20px;
    cursor: pointer;
    color: rgba(201, 168, 76, 0.35);
    font-size: 13px;
    transition: all 0.3s;
    letter-spacing: 2px;
}

.tab.active {
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    color: #0a0e1a;
    font-weight: bold;
}

.tab:hover:not(.active) {
    color: rgba(201, 168, 76, 0.6);
}

/* ===== 内容区 ===== */
.tab-content {
    background: rgba(10, 14, 26, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 16px;
    border: 1px solid rgba(201, 168, 76, 0.35);
    box-shadow: 0 30px 50px -20px rgba(0,0,0,0.8),
                inset 0 1px 0 rgba(201, 168, 76, 0.08),
                0 0 40px rgba(201, 168, 76, 0.04);
    min-height: 240px;
}

/* ===== 商铺 - flex 布局 ===== */
.shop-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin: -7px;
}

.shop-item {
    flex: 0 0 calc(33.33% - 14px);
    min-width: 150px;
    margin: 7px;
    background: rgba(45, 47, 53, 0.4);
    border-radius: 20px;
    padding: 14px;
    text-align: center;
    border: 1px solid rgba(201, 168, 76, 0.15);
    transition: all 0.3s ease;
}

.shop-item:hover {
    border-color: rgba(201, 168, 76, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(45, 47, 53, 0.5);
}

.item-icon {
    font-size: 11px;
    color: rgba(201, 168, 76, 0.3);
    margin-bottom: 4px;
}

.item-name {
    font-size: 16px;
    font-weight: bold;
    color: #dbb85c;
    margin-bottom: 2px;
}

.item-desc {
    font-size: 11px;
    color: rgba(201, 168, 76, 0.45);
    margin: 4px 0;
    white-space: pre-line;
}

.item-price {
    font-size: 14px;
    color: #f0d060;
    margin: 6px 0;
}

.item-buy {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.item-buy input {
    width: 44px;
    padding: 4px 4px;
    border-radius: 20px;
    border: 1px solid rgba(201, 168, 76, 0.15);
    background: rgba(45, 47, 53, 0.5);
    color: #f0e8d8;
    text-align: center;
    font-size: 13px;
}

.item-buy button {
    padding: 5px 14px;
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    border: none;
    border-radius: 20px;
    color: #0a0e1a;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.item-buy button:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.15);
}

.item-buy button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* ===== 充值 - flex 布局 ===== */
.recharge-box h3 {
    text-align: center;
    color: #dbb85c;
    margin-bottom: 4px;
    font-weight: 400;
    letter-spacing: 3px;
}

.recharge-box .rate {
    text-align: center;
    color: rgba(201, 168, 76, 0.45);
    font-size: 13px;
    margin-bottom: 14px;
}

.recharge-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: -6px;
}

.recharge-item {
    flex: 0 0 calc(33.33% - 12px);
    min-width: 90px;
    max-width: 160px;
    margin: 6px;
    background: rgba(45, 47, 53, 0.4);
    border-radius: 20px;
    padding: 14px 10px;
    text-align: center;
    border: 1px solid rgba(201, 168, 76, 0.15);
    transition: all 0.3s ease;
}

.recharge-item:hover {
    border-color: rgba(201, 168, 76, 0.5);
    transform: translateY(-2px);
}

.r-price {
    font-size: 20px;
    font-weight: bold;
    color: #dbb85c;
}

.r-points {
    font-size: 11px;
    color: rgba(201, 168, 76, 0.45);
    margin: 4px 0 10px;
}

.recharge-item button {
    width: 100%;
    padding: 6px 0;
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    border: none;
    border-radius: 20px;
    color: #0a0e1a;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.recharge-item button:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.15);
}

.recharge-item button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* ===== 离线补给 ===== */
.supply-box {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}
.supply-box h3 {
    color: #dbb85c;
    font-size: 18px;
    margin-bottom: 4px;
    letter-spacing: 2px;
}
.supply-desc {
    color: rgba(201, 168, 76, 0.45);
    font-size: 12px;
    margin-bottom: 16px;
}
.supply-tiers {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.supply-tier {
    flex: 1;
    min-width: 120px;
    background: rgba(45, 47, 53, 0.4);
    border-radius: 12px;
    padding: 12px 8px;
    border: 1px solid rgba(201, 168, 76, 0.1);
    transition: all 0.3s;
    opacity: 0.5;
}
.supply-tier.active {
    border-color: #c9a96e;
    opacity: 1;
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
}
.tier-name {
    font-size: 13px;
    color: #c9a96e;
    font-weight: bold;
    margin-bottom: 4px;
}
.tier-gift {
    font-size: 14px;
    color: #f0d060;
    margin-bottom: 4px;
}
.tier-stat {
    font-size: 11px;
    color: rgba(201, 168, 76, 0.5);
    margin-bottom: 2px;
}
.tier-extra {
    font-size: 11px;
    color: #e8a040;
}
.supply-status {
    color: rgba(201, 168, 76, 0.5);
    font-size: 13px;
    margin-bottom: 12px;
}
.supply-days {
    color: #f0d060;
    font-size: 18px;
    font-weight: bold;
}
.btn-supply {
    display: block;
    width: 200px;
    margin: 0 auto;
    padding: 12px;
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    border: none;
    border-radius: 20px;
    color: #0a0e1a;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}
.btn-supply:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.15);
}
.btn-supply:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}
.supply-success {
    color: #4caf50;
    font-size: 13px;
    margin-top: 10px;
}

/* ===== Toast 提示 ===== */
.toast {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 18px 32px;
    border-radius: 20px;
    color: #0a0e1a;
    font-size: 17px;
    z-index: 10010;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.9);
    max-width: 90%;
    text-align: center;
    font-weight: bold;
    animation: fadeInToast 0.3s ease;
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    border: 1px solid rgba(201, 168, 76, 0.3);
}

.toast.success {
    background: #1a6e3a;
    color: #e8e0d0;
}
.toast.error {
    background: #8b1a1a;
    color: #e8e0d0;
}
.toast.info {
    background: #1a3a5a;
    color: #e8e0d0;
}

@keyframes fadeInToast {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ===== Confirm 确认框 ===== */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.confirm-box {
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 24px 28px;
    border-radius: 24px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    min-width: 280px;
    max-width: 90%;
    text-align: center;
    animation: scaleIn 0.25s ease;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.9);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirm-box p {
    color: #f0e8d8;
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.6;
    white-space: pre-line;
}

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

.confirm-btns button {
    padding: 8px 28px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-confirm-yes {
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    color: #0a0e1a;
}

.btn-confirm-yes:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.15);
}

.btn-confirm-no {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(201, 168, 76, 0.5);
}

.btn-confirm-no:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== 发货进度条 ===== */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

.progress-box {
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 24px 32px;
    border-radius: 24px;
    border: 1px solid rgba(201, 168, 76, 0.4);
    text-align: center;
    min-width: 260px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.9);
}

.progress-box p {
    color: #f0e8d8;
    font-size: 15px;
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 16px;
    background: rgba(45, 47, 53, 0.5);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 76, 0.15);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #a08030, #c9a84c, #f0d080);
    border-radius: 20px;
    transition: width 0.3s ease;
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.1);
}

.progress-text {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(201, 168, 76, 0.4);
}

/* ===== 窄屏适配 ===== */
@media screen and (max-width: 600px) {
    .shop-item {
        flex: 0 0 calc(50% - 8px);
        min-width: 110px;
        padding: 12px;
    }

    .recharge-item {
        flex: 0 0 calc(50% - 8px);
        min-width: 80px;
    }

    .camp-title {
        font-size: 24px;
    }
    .login-form {
        padding: 24px 18px;
        border-radius: 24px;
    }
    .toast {
        font-size: 15px;
        padding: 14px 20px;
        top: 35%;
    }
    .confirm-box {
        min-width: auto;
        padding: 20px 18px;
    }
    .progress-box {
        min-width: auto;
        padding: 18px 20px;
    }
    .camp-header {
        border-radius: 24px;
    }
    .role-selector {
        border-radius: 24px;
    }
    .menu-tabs {
        border-radius: 24px;
    }
    .tab-content {
        border-radius: 24px;
    }
    .login-form {
        border-radius: 24px;
    }
}

@media screen and (max-width: 400px) {
    .shop-item {
        flex: 0 0 100%;
        min-width: auto;
        padding: 12px;
    }

    .recharge-item {
        flex: 0 0 100%;
        min-width: auto;
        max-width: 200px;
        margin: 0 auto;
    }

    .menu-tabs {
        flex-wrap: wrap;
    }
    .tab {
        flex: 1 0 30%;
        padding: 6px 0;
        font-size: 12px;
    }
    .role-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .point-display {
        text-align: right;
    }
}

/* ===== 窗口/小屏额外优化 ===== */
@media screen and (max-width: 1024px) and (min-height: 600px) {

    body {
        background-image: 
            radial-gradient(ellipse at 50% 0%, #1a2440 0%, #0e1428 80%, #0a0e1a 100%),
            radial-gradient(ellipse at 50% 100%, #1a2440 0%, transparent 50%);
    }

    /* 背景发光层 - 固定且始终可见 */
    body::before {
        background: radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.06) 0%, transparent 100%);
    }

}

@media screen and (max-width: 768px) {
    body {
        background-image: 
            radial-gradient(ellipse at 50% 0%, #1a2440 0%, #0e1428 80%, #0a0e1a 100%),
            radial-gradient(ellipse at 50% 100%, #1a2440 0%, transparent 50%);
    }

    /* 背景发光层 - 固定且始终可见 */
    body::before {
        background: radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.06) 0%, transparent 100%);
    }
}

.rank-box {
    max-width: 500px;
    margin: 0 auto;
}

.rank-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.rank-tab {
    padding: 6px 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #aaa;
}
.rank-tab.active {
    background: #c9a96e;
    color: #1a1a1a;
    font-weight: bold;
}
.rank-tab:hover {
    background: rgba(201,169,110,0.3);
    color: #fff;
}
.rank-info {
    font-size: 11px;
    color: #666;
    margin-bottom: 12px;
    text-align: center;
}
.rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.rank-table th {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: #c9a96e;
    text-align: left;
    font-weight: normal;
}
.rank-table td {
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.rank-num {
    color: #c9a96e;
    font-weight: bold;
}
.rank-empty {
    text-align: center;
    color: #666;
    padding: 30px;
    font-size: 13px;
}

.rank-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    justify-content: center;
}
.rank-tab {
    padding: 8px 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: #999;
    transition: all 0.2s;
}
.rank-tab.active {
    background: linear-gradient(135deg, #c9a96e, #b8944e);
    color: #1a1a1a;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(201,169,110,0.3);
}
.rank-tab:hover {
    background: rgba(201,169,110,0.2);
    color: #fff;
}
.rank-info {
    font-size: 11px;
    color: #555;
    margin-bottom: 16px;
    text-align: center;
}
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rank-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    transition: background 0.2s;
}
.rank-item:hover {
    background: rgba(255,255,255,0.06);
}
.rank-item.rank-1 {
    background: linear-gradient(135deg, rgba(255,215,0,0.12), rgba(255,215,0,0.04));
    border: 1px solid rgba(255,215,0,0.2);
}
.rank-item.rank-2 {
    background: linear-gradient(135deg, rgba(192,192,192,0.1), rgba(192,192,192,0.03));
    border: 1px solid rgba(192,192,192,0.15);
}
.rank-item.rank-3 {
    background: linear-gradient(135deg, rgba(205,127,50,0.1), rgba(205,127,50,0.03));
    border: 1px solid rgba(205,127,50,0.15);
}
.rank-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #999;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
    margin-right: 12px;
}
.rank-badge.top3 {
    width: 36px;
    height: 36px;
    font-size: 16px;
    color: #1a1a1a;
}
.rank-1 .rank-badge.top3 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    box-shadow: 0 2px 8px rgba(255,215,0,0.3);
}
.rank-2 .rank-badge.top3 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    box-shadow: 0 2px 8px rgba(192,192,192,0.3);
}
.rank-3 .rank-badge.top3 {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    box-shadow: 0 2px 8px rgba(205,127,50,0.3);
}
.rank-player {
    flex: 1;
    min-width: 0;
}
.rank-player-name {
    font-size: 16px;
    display: block;
}
.rank-player-race {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}
.rank-value {
    font-size: 16px;
    font-weight: bold;
    color: #c9a96e;
    flex-shrink: 0;
    margin-left: 10px;
}
.rank-empty {
    text-align: center;
    color: #555;
    padding: 40px;
    font-size: 14px;
}

.rank-title-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: url('/img/title-rt1.png') no-repeat;
    vertical-align: middle;
    margin-left: 4px;
    cursor: pointer;
}
.title-preview {
    position: fixed;
    width: 231px;
    height: 55px;
    background: url('/img/title-rt1.png') no-repeat;
    z-index: 999;
    pointer-events: none;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.title-display {
    width: 231px;
    height: 55px;
    margin: 0 auto -55px auto;
    background: url('/img/title-rt1.png') no-repeat;
}

.security-box {
    max-width: 300px;
    margin: 0 auto;
}

.veteran-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.veteran-modal {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 30px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 14px; right: 16px;
    font-size: 18px;
    color: #666;
    cursor: pointer;
}
.modal-close:hover { color: #fff; }
.veteran-modal h2 {
    color: #c9a96e;
    font-size: 20px;
    margin-bottom: 14px;
}
.veteran-desc {
    color: #999;
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.6;
}
.veteran-form input {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}
.veteran-story {
    text-align: left;
    padding: 16px 0;
}
.story-line {
    color: #ccc;
    font-size: 14px;
    margin: 6px 0;
    animation: fadeIn 1s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.title-select p {
    color: #c9a96e;
    margin: 14px 0 10px;
    font-size: 14px;
}
.title-options {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.title-option {
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    padding: 4px;
    transition: border-color 0.2s;
}
.title-option.selected {
    border-color: #c9a96e;
}
.title-option:hover {
    border-color: rgba(201,169,110,0.5);
}
.title-big {
    width: 231px;
    height: 55px;
    background: url('/img/title-rt1.png') no-repeat;
}
.player-list {
    text-align: left;
}
.player-item {
    padding: 10px;
    margin: 4px 0;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    cursor: pointer;
    color: #ccc;
    font-size: 14px;
    transition: background 0.2s;
}
.player-item:hover {
    background: rgba(201,169,110,0.15);
    color: #fff;
}
.veteran-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}
.btn-text {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #999;
    font-size: 12px;
    padding: 8px 16px;
    cursor: pointer;
}
.btn-text:hover {
    background: rgba(255,255,255,0.1);
    color: #ccc;
}

.pay-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pay-modal {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 12px;
    padding: 28px;
    max-width: 360px;
    width: 90%;
    text-align: center;
}
.pay-modal h2 {
    color: #dbb85c;
    font-size: 18px;
    margin-bottom: 10px;
}
.pay-desc {
    color: #999;
    font-size: 13px;
    margin-bottom: 14px;
}
.pay-qrcode-box {
    width: 220px;
    height: 220px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pay-qrcode {
    width: 200px;
    height: 200px;
}
.pay-loading {
    color: #999;
    font-size: 13px;
}
.pay-status {
    color: #c9a96e;
    font-size: 13px;
    margin: 10px 0 4px;
}
.pay-tip {
    color: #666;
    font-size: 11px;
    margin-top: 6px;
}

.item-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin: 0 auto 6px auto;
    display: block;
}
.btn-preview {
    padding: 5px 0;
    width: 55%;
    background: rgba(201, 168, 76, 0.15);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 20px;
    color: #c9a96e;
    font-size: 12px;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.2s;
}
.btn-preview:hover {
    background: rgba(201, 168, 76, 0.25);
    color: #fff;
}
.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preview-modal {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}
.preview-modal h2 {
    color: #dbb85c;
    font-size: 20px;
    margin-bottom: 12px;
}
.preview-img {
    width: 260px;
    height: 150px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    background: rgba(255,255,255,0.03);
    border-radius: 6px;
}
.preview-desc {
    color: #999;
    font-size: 16px;
    margin-top: 10px;
    white-space: pre-line;
    text-align: left;
    line-height: 1.6;
}
.preview-price {
    color: #f0d060;
    font-size: 18px;
    font-weight: bold;
    margin-top: 6px;
}

.shop-category-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    justify-content: center;
}
.shop-cat-tab {
    padding: 6px 14px;
    background: rgba(255,255,255,0.06);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #999;
    transition: all 0.2s;
}
.shop-cat-tab.active {
    background: linear-gradient(135deg, #c9a96e, #b8944e);
    color: #1a1a1a;
    font-weight: bold;
}
.shop-cat-tab:hover {
    background: rgba(201,169,110,0.2);
    color: #fff;
}

.security-sub-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    justify-content: center;
}
.security-sub-tab {
    padding: 6px 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #999;
    transition: all 0.2s;
}
.security-sub-tab.active {
    background: linear-gradient(135deg, #c9a96e, #b8944e);
    color: #1a1a1a;
    font-weight: bold;
}
.security-sub-tab:hover {
    background: rgba(201,169,110,0.2);
    color: #fff;
}

.shop-cat-tab.active,
.security-sub-tab.active,
.rank-tab.active {
    pointer-events: none;
}

.trader-box {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.trader-box h3 {
    color: #dbb85c;
    font-size: 18px;
    margin-bottom: 4px;
    letter-spacing: 2px;
}
.trader-desc {
    color: rgba(201, 168, 76, 0.5);
    font-size: 12px;
    margin-bottom: 4px;
}
.trader-warning {
    color: #f44;
    font-size: 12px;
    margin-bottom: 16px;
}
.trader-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}
.trader-card {
    flex: 1 1 0;
    min-width: 0;
    max-width: 365px;
    width: calc(50% - 6px);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201, 168, 76, 0.15);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    box-sizing: border-box;
}
.trader-info h4 {
    color: #dbb85c;
    font-size: 16px;
    margin-bottom: 4px;
}
.trader-location {
    color: #999;
    font-size: 12px;
    margin-bottom: 8px;
}
.trader-info p {
    color: #ccc;
    font-size: 13px;
    margin: 4px 0;
}
.trader-link {
    color: #4caf50;
    text-decoration: none;
}
.trader-link:hover {
    text-decoration: underline;
}
.trader-notice {
    margin-top: 12px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    color: #999;
    font-size: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
}
.trader-edit textarea {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    box-sizing: border-box;
    resize: vertical;
}
.btn-edit {
    padding: 6px 16px;
    background: rgba(201, 168, 76, 0.15);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 20px;
    color: #c9a96e;
    font-size: 12px;
    cursor: pointer;
    margin-top: 10px;
}
.btn-edit:hover {
    background: rgba(201, 168, 76, 0.25);
    color: #fff;
}

.btn-copy {
    padding: 2px 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: #999;
    font-size: 10px;
    cursor: pointer;
    margin-left: 4px;
}
.btn-copy:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.tab-content.trader-content {
    max-width: 780px;
    margin: 0 auto;
}

.btn-invite {
    padding: 6px 14px;
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    border: none;
    border-radius: 20px;
    color: #0a0e1a;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}
.btn-invite:hover {
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.2);
}

.invite-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
}
.invite-modal {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 12px;
    padding: 28px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}
.invite-modal h2 {
    color: #dbb85c;
    font-size: 18px;
    margin-bottom: 8px;
}
.invite-desc {
    color: #999;
    font-size: 12px;
    margin-bottom: 16px;
}
.invite-section {
    margin-bottom: 14px;
    text-align: left;
}
.invite-section label {
    display: block;
    color: #999;
    font-size: 16px;
    margin: 12px;
}
.invite-code-box,
.invite-link-box {
    display: flex;
    align-items: center;
    gap: 8px;
}
.invite-code {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 6px;
    color: #f0d060;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
}
.invite-link-text {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #4caf50;
    font-size: 11px;
    word-break: break-all;
}
.invite-stats {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}
.invite-stat {
    flex: 1;
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
.invite-stat-num {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #f0d060;
}
.invite-stat-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}
.invite-rules {
    text-align: left;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 12px;
    color: #999;
    font-size: 12px;
    line-height: 1.8;
}
.invite-rules p:first-child {
    color: #c9a96e;
    font-weight: bold;
}

.invite-desc {
    color: #c9a96e;
    font-size: 13px;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.invite-link-text {
    flex: 1;
    padding: 12px;
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 6px;
    color: #4caf50;
    font-size: 11px;
    font-weight: bold;
    word-break: break-all;
}
.btn-copy-invite {
    padding: 10px 20px;
    background: linear-gradient(180deg, #f0d080 0%, #c9a84c 50%, #a08030 100%);
    border: none;
    border-radius: 6px;
    color: #0a0e1a;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}
.btn-copy-invite:hover {
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

.recharge-item {
    position: relative;
    overflow: hidden;
}
.r-badge {
    position: absolute;
    top: 12px;
    left: -30px;
    background: linear-gradient(135deg, #f0d060, #c9a84c);
    color: #0a0e1a;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 30px;
    transform: rotate(-45deg);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}