body {
    overflow: hidden;
    margin: 0;
    font-family: 'SimSun', '宋体', sans-serif;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: url('../assets/jimeng-2025-07-04-9373-大气磅礴的陈塘关城墙，视角从城外向下看，下方是关口，远方天空云层密布，气氛紧张。....jpeg') no-repeat center center;
    background-size: cover;
    overflow: hidden;
}

#game-area {
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 90%;
}

#player-character {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px; /* 根据实际图片调整 */
    height: 200px; /* 根据实际图片调整 */
    background: url('../assets/第一形态.png') no-repeat center center;
    background-size: contain;
    transition: background-image 0.1s step-end, filter 0.3s ease-in-out;
}

#player-character.berserk {
    filter: hue-rotate(330deg) saturate(1.5) brightness(1.1);
}

#info-display {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
    background-size: contain;
    transition: all 0.3s linear;
}

#power-info {
    display: flex;
    align-items: center;
    color: white;
    font-size: 24px;
}

#power-info span {
    margin-right: 10px;
}

#power-value {
    margin-left: 10px;
    min-width: 50px;
    text-align: left;
}

#penalty-info {
    color: #ff4d4d; /* 红色警示 */
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

#penalty-info span {
    margin: 0 5px;
}

#wall-health-info {
    color: #a0d877; /* 代表健康的绿色 */
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

#wall-health-info span {
    margin: 0 5px;
}

#power-bar-container {
    width: 200px;
    height: 20px;
    background-color: #555;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

#power-bar {
    width: 0%; /* 初始为0 */
    height: 100%;
    background-color: #4caf50; /* 绿色 */
    transition: width 0.5s ease-in-out;
}

#taiyi-avatar img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #ffd700;
}

.demon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: url('../assets/字母边框.png') no-repeat center center;
    background-size: contain;
    color: #000; /* 改为黑色字体，提高可读性 */
    font-size: 30px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    user-select: none;
    /* 添加半透明背景确保字母可见 */
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    /* 添加文字阴影提高对比度 */
    text-shadow: 
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        1px 1px 0 #fff,
        0 0 2px rgba(255, 255, 255, 0.8);
}

.weapon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: url('../assets/乾坤圈.png') no-repeat center center;
    background-size: contain;
    transition: all 0.3s linear;
}

.weapon.shenyuanzhu {
    width: 50px;
    height: 50px;
    background: url('../assets/神元珠.png') no-repeat center center !important;
    background-size: contain !important;
    animation: shenyuanzhuGlow 0.8s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

@keyframes shenyuanzhuGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.6)) brightness(1);
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 1)) brightness(1.2);
        transform: scale(1.05);
    }
}

#skills-display {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.skill {
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 10px;
    border: 2px solid #ffd700;
}

.skill img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.skill span {
    color: white;
    font-size: 22px;
    font-weight: bold;
}

#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 100;
}

#game-over-screen.hidden {
    display: none;
}

.hidden {
    display: none;
}

.game-over-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    max-width: 90%;
    max-height: 90%;
}

.game-over-content video {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: opacity 0.5s ease-in-out;
}

#game-over-initial-text {
    transition: opacity 0.5s ease-in-out;
}

#final-stats {
    transition: opacity 0.5s ease-in-out;
}

.game-over-content h1 {
    font-size: 48px;
    color: #ff4d4d;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.game-over-content p {
    font-size: 24px;
    margin: 10px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#final-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#guardian-name {
    padding: 12px 24px;
    font-size: 18px;
    border: 2px solid #ffd700;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

#guardian-name:focus {
    border-color: #ffed4a;
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

#guardian-name::placeholder {
    color: #ccc;
}

#restart-button {
    padding: 15px 30px;
    font-size: 20px;
    cursor: pointer;
    background-color: #ffd700;
    border: none;
    border-radius: 8px;
    color: #333;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#restart-button:hover {
    background-color: #ffed4a;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.explosion {
    position: absolute;
    width: 100px;
    height: 100px;
    background-image: radial-gradient(circle, rgba(255,255,0,1) 0%, rgba(255,159,0,0.8) 40%, rgba(255,0,0,0) 70%);
    border-radius: 50%;
    transform: scale(0);
    animation: explode 0.3s ease-out forwards;
}

@keyframes explode {
    to {
        transform: scale(1.5);
        opacity: 0;
    }
} 