* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 24px;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

#hud {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
    font-family: 'Arial', sans-serif;
}

.hud-item {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 5px;
    border-left: 3px solid #0099ff;
    display: flex;
    align-items: center;
}

.hud-label {
    color: #999;
    margin-right: 5px;
    font-size: 16px;
}

.hud-tip {
    margin-left: 10px;
    font-size: 12px;
    color: #aaa;
    opacity: 0.7;
}

#score-value {
    font-size: 22px;
    color: #f39c12;
    text-shadow: 0 0 5px rgba(243, 156, 18, 0.7);
}

#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.loading-content {
    text-align: center;
    width: 80%;
    max-width: 500px;
}

.loading-content h1 {
    margin-bottom: 20px;
    font-size: 32px;
    color: #00a2ff;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.8);
}

.loader {
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid #00a2ff;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#loading-progress {
    font-size: 18px;
    margin: 20px 0;
    color: #ffffff;
}

#start-button {
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(to right, #0066cc, #00ccff);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 150, 255, 0.7);
    transition: all 0.3s ease;
    animation: pulse 1.5s infinite;
}

#start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 150, 255, 1);
}

.hidden {
    display: none !important;
}

/* 添加一些动画效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

#crosshair {
    animation: pulse 1s infinite;
}

/* 暂停游戏时的解锁消息 */
.unlock-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    text-align: center;
    z-index: 20;
    cursor: pointer;
    border: 2px solid rgba(0, 150, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 150, 255, 0.3);
}

.unlock-message p {
    margin: 10px 0;
}

.unlock-message p:first-child {
    font-size: 24px;
    font-weight: bold;
}

.unlock-message p:last-child {
    font-size: 18px;
    opacity: 0.8;
}

/* 点击进入游戏提示 */
.click-prompt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(0, 150, 255, 0.8);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 15px 30px;
    border-radius: 10px;
    animation: pulse 1.5s infinite;
    cursor: pointer;
    z-index: 15;
}

/* 游戏控制提示 */
.controls-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 2px solid rgba(155, 89, 182, 0.7);
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.5);
    z-index: 50;
    animation: fadeIn 0.5s, fadeOut 0.5s 4.5s;
}

.tip-content h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #9b59b6;
    font-size: 20px;
}

.tip-content ul {
    list-style-type: none;
    padding: 0;
}

.tip-content li {
    margin: 8px 0;
    text-align: left;
    font-size: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.death-message {
    background-color: rgba(20, 20, 20, 0.9);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid rgba(255, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.death-message h2 {
    color: #ff3333;
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.death-message p {
    color: white;
    font-size: 20px;
    margin-bottom: 30px;
}

#restart-button {
    background: linear-gradient(to right, #cc0000, #ff3333);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
}

#restart-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.7);
}

/* 状态消息显示 */
.status-message {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 18px;
    text-align: center;
    pointer-events: none;
    animation: fadeInOut 2s ease-in-out;
    z-index: 100;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    80% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}
