html {
    -ms-touch-action: none;
}

body,
canvas,
div {
    display: block;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -khtml-user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Remove spin of input type number */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none;
    margin: 0;
    /* <-- Apparently some margin are still there even though it's hidden */
}

body {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    margin: 0;
    cursor: default;
    color: #888;
    background-color: #333;
    text-align: center;
    font-family: Helvetica, Verdana, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    /* fix bug: https://github.com/cocos-creator/2d-tasks/issues/791 */
    /* overflow cannot be applied in Cocos2dGameContainer, 
  otherwise child elements will be hidden when Cocos2dGameContainer rotated 90 deg */
    overflow: hidden;
}

#Cocos2dGameContainer {
    position: absolute;
    margin: 0;
    left: 0px;
    top: 0px;
    display: -webkit-box;
    -webkit-box-orient: horizontal;
    -webkit-box-align: center;
    -webkit-box-pack: center;
}

canvas {
    background-color: rgba(0, 0, 0, 0);
}

a:link,
a:visited {
    color: #666;
}

a:active,
a:hover {
    color: #666;
}

p.header {
    font-size: small;
}

p.footer {
    font-size: x-small;
}

#splash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff url(./singleColor.png) no-repeat center;
    background-size: 100%;
}

.progress-bar {
    background-color: #1a1a1a;
    position: absolute;
    left: 25%;
    top: 80%;
    height: 15px;
    padding: 5px;
    width: 50%;
    /*margin: 0 -175px;         */
    border-radius: 5px;
    box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
}

.progress-bar span {
    display: block;
    height: 100%;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
    transition: width .4s ease-in-out;
    background-color: #34c2e3;
}

.stripes span {
    background-size: 30px 30px;
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
    animation: animate-stripes 1s linear infinite;
}

@keyframes animate-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 0;
    }
}

marquee {
    padding:0px 5px;
    letter-spacing: 2px;
    color: #ff1e77;
    padding-top: 2px;
    width: 100%;					/*这里可以设置滚动的宽度*/
    height: 20px;					/*这里可以设置滚动的高度*/
    border: thin solid darkgray;	/*这里可以设置边框的样式*/
    margin-top: 10px;
    margin-left: -10px;
}
p {
    font-weight: bold;
}

/* 排行榜容器 - 固定在右上角 */
#leaderboard-container {
    position: fixed;
    top: 40px;
    right: 10px;
    z-index: 9999;
    font-family: Arial, sans-serif;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

/* 折叠状态 */
#leaderboard-container.collapsed {
    width: 30px;
    height: 30px;
    overflow: hidden;
}

/* 展开状态 */
#leaderboard-container.expanded {
    width: 300px;
    min-height: 400px;
}

/* 切换按钮 */
#toggle-btn {
    position: absolute;
    top: 0px;
    right: 0px;
    background: none;
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    text-align: center;
    vertical-align: middle;
    transition: transform 0.3s;
}


#toggle-btn:hover {
    transform: scale(1.2);
}

/* 标题 */
#leaderboard-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 排行榜列表 */
#leaderboard-list {
    padding: 15px;
    max-height: 360px;
    overflow-y: auto;
}

.rank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: background 0.2s;
}

.rank-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.rank-number {
    width: 30px;
    font-weight: bold;
    color: #FFD700;
}

.rank-1 .rank-number {
    color: #FFD700;
}

.rank-2 .rank-number {
    color: #C0C0C0;
}

.rank-3 .rank-number {
    color: #CD7F32;
}

.username {
    flex: 1;
    margin: 0 15px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.score {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #00ff88;
}
