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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #0a0a0a;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.screen {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

#start-screen {
    display: none;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #2d2d2d 100%);
    background-attachment: fixed;
    overflow: hidden;
}

.start-content {
    text-align: center;
    padding: 40px 30px;
    max-width: 450px;
    width: 90%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 25px;
    border: 3px solid rgba(220, 53, 69, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.game-title {
    font-size: clamp(28px, 8vw, 42px);
    color: #dc3545;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

.game-subtitle {
    font-size: clamp(14px, 3vw, 18px);
    color: #ff6b6b;
    margin-bottom: 35px;
    line-height: 1.6;
}

.btn-start {
    width: 100%;
    padding: 18px 30px;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 35px;
    cursor: pointer;
    margin-bottom: 35px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
}

.btn-start:active {
    transform: translateY(-1px);
}

.game-rules {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    padding: 22px;
    text-align: left;
    border: 2px solid rgba(220, 53, 69, 0.4);
}

.game-rules h3 {
    color: #dc3545;
    margin-bottom: 18px;
    font-size: clamp(15px, 3vw, 18px);
    text-align: center;
}

.game-rules ul {
    list-style: none;
    color: #ffcccc;
    font-size: clamp(13px, 2.5vw, 15px);
    line-height: 2;
}

.game-rules li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.game-rules li::before {
    content: '🎯';
    position: absolute;
    left: 0;
    font-size: clamp(12px, 2.5vw, 14px);
}

#game-screen {
    display: none;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    cursor: none;
    z-index: 1;
}

#game-header {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 2vw, 20px);
    padding: clamp(8px, 2vw, 12px);
    background: rgba(0, 0, 0, 0.85);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 2px solid #dc3545;
}

.header-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(4px, 1.5vw, 8px);
    padding: clamp(6px, 1.5vw, 10px) clamp(10px, 2.5vw, 18px);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.health-item {
    border-color: #28a745;
}

.header-item .label {
    font-size: clamp(10px, 2vw, 14px);
    color: #ffcccc;
    font-weight: bold;
    white-space: nowrap;
}

.header-item .value {
    font-size: clamp(14px, 3vw, 20px);
    font-weight: bold;
    color: #dc3545;
    min-width: clamp(25px, 6vw, 40px);
    text-align: center;
}

.health-value {
    color: #28a745 !important;
}

.health-value.low {
    color: #ffc107 !important;
}

.health-value.critical {
    color: #dc3545 !important;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#game-canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none;
}

#weapon-image {
    display: none;
}

.mouse-scope {
    position: fixed;
    width: 80px;
    height: 80px;
    pointer-events: none;
    z-index: 50;
    display: none;
    top: 0;
    left: 0;
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
    image-rendering: pixelated;
}

.crosshair-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crosshair-h {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 2px;
    background: rgba(255, 0, 0, 0.9);
    transform: translateY(-50%);
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.8);
}

.crosshair-v {
    position: absolute;
    left: 50%;
    top: 10%;
    height: 80%;
    width: 2px;
    background: rgba(255, 0, 0, 0.9);
    transform: translateX(-50%);
    box-shadow: 0 0 4px rgba(255, 0, 0, 0.8);
}

.crosshair-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border: 2px solid rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
}

.damage-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.1s;
}

.damage-overlay.active {
    background: radial-gradient(ellipse at center, transparent 30%, rgba(139, 0, 0, 0.6) 100%);
    opacity: 1;
    animation: damageFlash 0.3s ease-out;
}

@keyframes damageFlash {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    justify-content: center;
    align-items: center;
    z-index: 200;
    padding: clamp(15px, 5vw, 20px);
    overflow: auto;
}

.modal-content {
    background: linear-gradient(135deg, #1a0a0a 0%, #2d1515 100%);
    border-radius: 25px;
    padding: clamp(18px, 5vw, 25px);
    max-width: 400px;
    width: 100%;
    border: 3px solid #dc3545;
    box-shadow: 0 10px 40px rgba(220, 53, 69, 0.3);
    position: relative;
    z-index: 201;
}

.sniper-card {
    border-color: #dc3545;
    box-shadow: 0 0 30px rgba(220, 53, 69, 0.5);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(12px, 3vw, 15px);
    padding-bottom: clamp(10px, 2.5vw, 12px);
    border-bottom: 2px solid #dc3545;
}

.target-type {
    font-size: clamp(16px, 3.5vw, 20px);
    color: #dc3545;
    font-weight: bold;
}

.points {
    font-size: clamp(12px, 2.5vw, 15px);
    color: #ff6b6b;
}

.question-text {
    font-size: clamp(20px, 5vw, 30px);
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: clamp(18px, 4vw, 25px);
    min-height: 50px;
    line-height: 1.7;
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: clamp(8px, 2vw, 12px);
    margin-bottom: clamp(10px, 2.5vw, 15px);
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.option-btn {
    padding: clamp(14px, 3.5vw, 18px) clamp(12px, 2.5vw, 15px);
    font-size: clamp(15px, 3vw, 18px);
    color: #fff;
    background: linear-gradient(135deg, #1a0a0a 0%, #2d1515 100%);
    border: 2px solid #dc3545;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.option-btn:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    transform: translateY(-2px);
}

.option-btn:active {
    transform: translateY(0);
}

.option-btn.correct {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
}

.option-btn.wrong {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    border-color: #dc3545;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.feedback {
    text-align: center;
    padding: clamp(10px, 2.5vw, 12px);
    border-radius: 10px;
    font-size: clamp(14px, 2.8vw, 16px);
    font-weight: bold;
    margin-top: clamp(8px, 2vw, 10px);
}

.feedback.correct {
    background: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.feedback.wrong {
    background: rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

#game-over-screen {
    display: none;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.game-over-content {
    text-align: center;
    padding: clamp(28px, 8vw, 35px);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 25px;
    border: 3px solid #dc3545;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.end-title {
    font-size: clamp(24px, 6vw, 36px);
    color: #dc3545;
    margin-bottom: clamp(18px, 4vw, 22px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.final-score {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 18px;
    padding: clamp(18px, 4vw, 22px);
    margin-bottom: clamp(18px, 4vw, 22px);
    border: 3px solid #dc3545;
}

.score-label {
    display: block;
    font-size: clamp(12px, 2.5vw, 14px);
    color: #ffcccc;
    margin-bottom: 8px;
}

.score-value {
    display: block;
    font-size: clamp(36px, 10vw, 50px);
    font-weight: bold;
    color: #dc3545;
    text-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    gap: clamp(15px, 5vw, 30px);
    margin-bottom: clamp(18px, 4vw, 22px);
}

.stat-item-left,
.stat-item-right {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    padding: clamp(12px, 3vw, 15px) clamp(8px, 2vw, 10px);
    border: 1px solid rgba(220, 53, 69, 0.3);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: clamp(9px, 2vw, 11px);
    color: #ffcccc;
    margin-bottom: 6px;
}

.stat-value {
    display: block;
    font-size: clamp(16px, 4vw, 22px);
    font-weight: bold;
    color: #fff;
}

.result-message {
    font-size: clamp(14px, 3vw, 18px);
    color: #ffcccc;
    margin-bottom: clamp(18px, 4vw, 22px);
    padding: clamp(12px, 3vw, 15px);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    line-height: 1.6;
}

.btn-restart {
    padding: clamp(14px, 3vw, 16px) clamp(35px, 8vw, 45px);
    font-size: clamp(14px, 3vw, 18px);
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.btn-restart:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6);
}

.btn-restart:active {
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .start-content {
        padding: 30px 20px;
    }

    .game-title {
        margin-bottom: 20px;
    }

    .game-subtitle {
        margin-bottom: 28px;
    }

    .btn-start {
        padding: 16px;
        margin-bottom: 28px;
    }

    .game-rules {
        padding: 18px;
    }

    .game-rules h3 {
        margin-bottom: 14px;
    }

    .game-rules li {
        padding-left: 22px;
    }

    #game-header {
        gap: 8px;
        padding: 6px;
    }

    .header-item {
        min-width: 45px;
        padding: 4px 8px;
    }

    .options-container {
        grid-template-columns: 1fr;
    }

    .stats-row {
        flex-direction: row;
        gap: 12px;
    }

    .modal-content {
        padding: 22px;
        max-width: 90%;
    }

    .question-text {
        font-size: 20px;
        line-height: 1.6;
    }

    .option-btn {
        padding: 16px 14px;
        font-size: 18px;
    }

    .feedback {
        font-size: 18px;
        padding: 12px;
    }

    .game-over-content {
        padding: 32px 24px;
    }

    .mouse-scope {
        width: 100px;
        height: 100px;
    }
}
/* ����Ч�� */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    box-shadow: 0 0 6px currentColor;
}
