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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    background-color: #f5f6fa;
}

/* 首页样式 */
.home-page {
    background-image: url('../img/index_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
}

.start-btn {
    position: fixed;
    left: 50%;
    bottom: 10%;
    transform: translateX(-50%);
    width: 240px;
    max-width: 70vw;
    height: auto;
    cursor: pointer;
    z-index: 1000;
    user-select: none;
    -webkit-user-drag: none;
}

/* 规则弹窗 */
.rules-popup {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    color: #1f2d3d;
}

.rules-popup::before {
    content: "";
    width: 56px;
    height: 4px;
    border-radius: 999px;
    align-self: center;
    background: linear-gradient(90deg, #3acfd5, #3a4ed5);
}

.rules-title {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    text-align: center;
}

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    counter-reset: ruleCounter;
    max-height: 40vh;
    overflow: scroll;
}

.rules-list li {
    position: relative;
    padding: 12px 12px 12px 40px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.5;
    background: rgba(58, 79, 213, 0.08);
    color: #2b2f43;
}

.rules-list li::before {
    content: counter(ruleCounter);
    counter-increment: ruleCounter;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3acfd5, #3a4ed5);
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    font-weight: 600;
}

.rules-actions {
    display: flex;
    /* flex-direction: column; */
    justify-content: center;
    gap: 10px;
}

.rules-actions .van-button {
    height: 44px;
    border-radius: 12px;
    font-size: 16px;
}

.rules-actions .van-button--plain {
    border-color: rgba(31, 45, 61, 0.2);
    color: #1f2d3d;
}

/* 游戏页样式 */
.game-page {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.container {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

.canvas-container {
    width: 100%;
    height: 100%;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* 游戏结束弹窗样式 */
.game-over-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #1f2d3d;
}

.game-over-title {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    margin-bottom: 24px;
}

.game-over-score {
    width: 100%;
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: #fff;
}

.score-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.game-over-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.game-over-actions .van-button {
    height: 48px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
}
