* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Press Start 2P', cursive;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 18px;
    margin-bottom: 15px;
    line-height: 1.8; /* 增加行高 */
    position: relative;
    border-radius: 4px;

}

.author {
    font-size: 14px; /* 略微放大 */
    margin-bottom: 20px;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 3px;
    transform: rotate(0.5deg); /* 相反方向的轻微倾斜 */
    position: relative;
    letter-spacing: 1px;
}

/* 添加鼠标悬停效果 */
.header h1:hover, .author:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.description {
    font-family: 'VT323', monospace;
    font-size: 20px;
    line-height: 1.0;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 10px;
    
    border-radius: 5px;
}

.game-area {
    position: relative;
    height: 300px;
    background-color: #fff;
    border: 2px solid #000;
    overflow: hidden;
    margin-bottom: 30px;
}

#character {
    position: absolute;
    width: 30px;
    height: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><rect x="2" y="0" width="6" height="6" fill="black"/><rect x="0" y="6" width="10" height="4" fill="black"/><rect x="3" y="2" width="1" height="1" fill="white"/><rect x="6" y="2" width="1" height="1" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    bottom: 60px;
    left: 50px;
    transition: transform 0.1s;
    z-index: 10;
}

.ground {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background-color: #333;
}

.manifesto-point {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
    animation: float 2s infinite ease-in-out;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

#point1 { bottom: 80px; left: 150px; }
#point2 { bottom: 80px; left: 300px; }
#point3 { bottom: 80px; left: 450px; }
#point4 { bottom: 80px; left: 600px; }

.badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.badge {
    width: 25px;
    height: 25px;
    background-color: #ccc;
    border: 2px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border-radius: 50%;
    opacity: 0.5;
}

.badge.collected {
    background-color: gold;
    opacity: 1;
}

.controls-info {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 8px;
    color: white;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background-color: #fff;
    border: 3px solid #000;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: none;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    background-color: #000080;
    color: white;
    padding: 5px 10px;
}

.modal-title {
    font-size: 14px;
}

.close-button {
    cursor: pointer;
    font-weight: bold;
}

.modal-content {
    padding: 20px;
    font-size: 12px;
}

.example {
    margin-top: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border-left: 5px solid #ccc;
}

.example-text {
    font-size: 10px;
    font-style: italic;
}

.ending-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background-color: #000;
    color: #fff;
    padding: 30px;
    text-align: center;
    z-index: 200;
    display: none;
}

.ending-message h2 {
    margin-bottom: 20px;
    font-size: 16px;
}

.ending-message button {
    margin-top: 20px;
    padding: 10px 20px;
    font-family: 'Press Start 2P', cursive;
    background-color: #fff;
    color: #000;
    border: none;
    cursor: pointer;
}

/* 响应式布局 */
@media (max-width: 600px) {
    .header h1 {
        font-size: 14px;
    }
    
    .game-area {
        height: 250px;
    }
    
    .modal-title {
        font-size: 12px;
    }
    
    .modal-content {
        font-size: 10px;
    }
}