* {
    margin: 0;
    padding: 0;
}

body {
    background-color: black;
}

/*这一句是用来解决在安卓上的点击出现篮框问题*/
body {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}


/*下面是解决ios上去除微信点击蓝色边框 */
a:focus,
input:focus,
p:focus,
div:focus {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-user-modify: read-write-plaintext-only;
}



.main {
    width: 300px;
    height: 300px;
    margin: 0 auto;
    margin-top: 100px;
    position: relative;
}

/* 木鱼棒 */
.mubang {
    position: absolute;
    top: 155px;
    left: 0px;
    width: 200px;
    height: 200px;
    background: url('./img/stick.png') no-repeat;
    background-size: contain;
    transform: rotate(-40deg);
    transform-origin: 10px 70px;
    cursor: pointer;
}

.move {
    animation: move 0.5s linear alternate;
}

.auto_move {
    animation: move 0.5s linear alternate infinite;
}

@keyframes move {
    0% {
        transform: rotate(-40deg);
    }

    100% {
        transform: rotate(-18deg);
    }
}

/* 木鱼 */
.muyu {
    position: absolute;
    top: 150px;
    left: 45px;
    width: 220px;
    height: 220px;
    background: url('./img/muyu.png') no-repeat;
    transition: all 0.5s;
    cursor: pointer;
}

.muyu:active {
    transform: scale(0.9);
}

.music {
    display: none;
}

/* 自动开关 + 排行榜按钮 */
.control {
    width: 200px;
    margin: 0 auto;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auto {
    width: 18px;
    height: 18px;
}

.auto_name {
    color: white;
    font-size: 14px;
    white-space: nowrap;
}

/* 计数器 */
.count {
    line-height: 24px;
    margin: 0 auto;
    margin-top: 8px;
    color: white;
    font-size: 14px;
    text-align: center;
}

.num {
    color: #ff9607;
    font-size: 16px;
}

#tips {
    position: absolute;
    visibility: hidden;
    color: #ff9607;
    font-size: 26px;
    margin: 0 auto;
    top: 120px;
    left: 40%;
    opacity: 0;
}

@keyframes merit-float {
    0% {
        visibility: visible;
        opacity: 1;
        top: 120px;
    }
    100% {
        visibility: hidden;
        opacity: 0;
        top: 60px;
    }
}

#tips.animate {
    animation: merit-float 0.5s ease-out forwards;
}

/* 登录悬浮条 - 已登录状态 */
.login-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c8 100%);
    border-bottom: 2px solid #d4a017;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-sizing: border-box;
}

.login-btns {
    display: flex;
    gap: 8px;
}

.login-bar .user-name {
    color: #8b6914;
    font-size: 14px;
}

.login-bar .user-merit {
    color: #d4a017;
    font-size: 14px;
    margin-left: 15px;
}

.logout-btn {
    background: #d4a017;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.logout-btn:hover {
    background: #b8860b;
}

/* 未登录提示条 */
.unlogin-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c8 100%);
    border-bottom: 2px solid #d4a017;
    padding: 8px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    box-sizing: border-box;
}

.unlogin-bar span {
    color: #8b6914;
    font-size: 14px;
}

.to-login-btn {
    background: #d4a017;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.to-login-btn:hover {
    background: #b8860b;
}

/* 全局统计 */
.global-stats {
    line-height: 24px;
    margin: 0 auto;
    margin-top: 8px;
    color: white;
    font-size: 14px;
    text-align: center;
}

.global-stats .num {
    color: #ff9607;
    font-size: 16px;
}

/* 统计面板容器 - 响应式布局 */
.stats-panel {
    position: fixed;
    bottom: 5px;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 70%, transparent 100%);
    z-index: 50;
}

@media (min-width: 768px) {
    .stats-panel {
        position: static;
        background: none;
        padding: 10px 20px;
    }
}

/* 主内容区域 - 响应式 */
.main {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    padding-top: 40vh;
}

@media (min-width: 768px) {
    .main {
        padding-top: 25vh;
    }
}

/* 排行榜按钮 */
.rank-btn {
    background: #d4a017;
    color: #fff;
    border: none;
    padding: 4px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.rank-btn:hover {
    background: #b8860b;
}

/* 排行榜面板 */
.rank-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200;
    overflow-y: auto;
}

.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c8 100%);
    border-bottom: 2px solid #d4a017;
}

.rank-header h3 {
    color: #8b6914;
    margin: 0;
    font-size: 18px;
}

.close-rank {
    font-size: 28px;
    color: #8b6914;
    cursor: pointer;
    line-height: 1;
}

.close-rank:hover {
    color: #d4a017;
}

/* 排行榜列表 */
.rank-list {
    padding: 10px 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #333;
    color: #fff;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-item .rank-num {
    width: 30px;
    font-size: 16px;
    font-weight: bold;
    color: #d4a017;
}

.rank-item .rank-num.top1 { color: #ffd700; }
.rank-item .rank-num.top2 { color: #c0c0c0; }
.rank-item .rank-num.top3 { color: #cd7f32; }

.rank-item .rank-name {
    flex: 1;
    font-size: 14px;
    color: #ccc;
}

.rank-item .rank-merit {
    font-size: 14px;
    color: #ff9607;
}

.rank-loading {
    text-align: center;
    color: #888;
    padding: 30px;
}

.rank-empty {
    text-align: center;
    color: #888;
    padding: 30px;
}

.rank-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
}

.rank-page-btn {
    background: #D4A017;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.rank-page-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#rankPageInfo {
    color: #8b6914;
    font-size: 14px;
}

/* 联系开发人员弹窗 */
.contact-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.contact-dialog.active {
    display: flex;
}

.contact-content {
    background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c8 100%);
    border: 2px solid #d4a017;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    position: relative;
}

.contact-close {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 24px;
    color: #8b6914;
    cursor: pointer;
}

.contact-title {
    color: #8b6914;
    font-size: 18px;
    margin-bottom: 10px;
}

.contact-remark {
    color: #8b6914;
    font-size: 14px;
    margin-top: 8px;
}

.contact-qrcode {
    width: 200px;
    height: 200px;
    border-radius: 8px;
}