* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background-color: #0a0a0a;
    color: #ffffff;
}

#main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
    background: rgba(10, 10, 15, 0.9);
}

/* 设置屏幕特殊样式 */
#settings-screen {
    justify-content: flex-start;
    padding-top: 40px;
}

#settings-screen h1 {
    margin-bottom: 10px;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #00e6e6;
    text-shadow: 0 0 15px rgba(0, 230, 230, 0.6);
    text-align: center;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #f72585;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00e6e6;
}

.primary-btn, .secondary-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.primary-btn {
    background-color: #00e6e6;
    color: #0a0a0a;
}

.primary-btn:hover {
    background-color: #00cccc;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 230, 230, 0.3);
}

.secondary-btn {
    background-color: transparent;
    color: #00e6e6;
    border: 2px solid #00e6e6;
}

.secondary-btn:hover {
    background-color: rgba(0, 230, 230, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 230, 230, 0.2);
}

.instructions {
    margin-top: 2rem;
    max-width: 600px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 230, 230, 0.3);
}

.instructions p {
    margin: 0.7rem 0;
    font-size: 1.1rem;
    color: #e0e0e0;
}

/* 训练模式选择样式 */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 20px 0;
}

.mode-card {
    background-color: rgba(30, 30, 50, 0.7);
    border: 2px solid #00e6e6;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 230, 230, 0.4);
    background-color: rgba(40, 40, 70, 0.8);
}

.mode-card h3 {
    color: #f72585;
    margin-bottom: 10px;
}

.mode-card p {
    color: #e0e0e0;
    font-size: 0.9rem;
}

/* 设置屏幕样式 */
.settings-container {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
    max-height: 70vh; /* 限制最大高度 */
    overflow-y: auto; /* 添加垂直滚动条 */
    padding-right: 10px; /* 为滚动条预留空间 */
    -webkit-overflow-scrolling: touch; /* 为iOS设备添加惯性滚动 */
    overscroll-behavior: contain; /* 防止滚动传播 */
}

/* 自定义滚动条样式 */
.settings-container::-webkit-scrollbar {
    width: 8px;
}

.settings-container::-webkit-scrollbar-track {
    background: rgba(30, 30, 50, 0.5);
    border-radius: 10px;
}

.settings-container::-webkit-scrollbar-thumb {
    background: #00e6e6;
    border-radius: 10px;
}

.settings-container::-webkit-scrollbar-thumb:hover {
    background: #00cccc;
}

.settings-group {
    background-color: rgba(30, 30, 50, 0.7);
    border-radius: 10px;
    padding: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.setting-item label {
    flex: 1;
    font-size: 1.1rem;
}

.setting-item input {
    flex: 2;
    margin: 0 10px;
}

/* 目标颜色选择样式 */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: 10px;
}

.color-option {
    position: relative;
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-label {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.color-label::after {
    content: attr(for);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-label:hover::after {
    opacity: 1;
}

.color-option input[type="radio"]:checked + .color-label {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

.button-group {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* 游戏HUD样式 */
#hud {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 10;
}

.hud-item {
    background-color: rgba(30, 30, 50, 0.7);
    border-radius: 5px;
    padding: 10px 20px;
    min-width: 150px;
    text-align: center;
    border: 1px solid rgba(0, 230, 230, 0.3);
}

.hud-label {
    font-size: 0.8rem;
    color: #00e6e6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hud-value {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: bold;
}

#progress-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 200px;
    height: 10px;
    background-color: rgba(30, 30, 50, 0.7);
    border-radius: 5px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background-color: #00e6e6;
    width: 0%;
    transition: width 0.3s linear;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 24px;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    /* 自定义准星样式 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 自定义准星样式 */
.crosshair-dot {
    width: 4px;
    height: 4px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.crosshair-line {
    position: absolute;
    background-color: #ffffff;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.crosshair-line.horizontal {
    width: 10px;
    height: 2px;
}

.crosshair-line.vertical {
    width: 2px;
    height: 10px;
}

#reload-message {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: #00e6e6;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(0, 230, 230, 0.7);
    animation: pulse 1s infinite;
    z-index: 10;
}

#start-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    z-index: 10;
    pointer-events: none;
}

/* 结果屏幕样式 */
.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
    width: 100%;
    max-width: 600px;
}

.stat {
    background-color: rgba(30, 30, 50, 0.7);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(0, 230, 230, 0.3);
}

.stat-label {
    display: block;
    font-size: 1.1rem;
    color: #00e6e6;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    color: #f72585;
    font-weight: bold;
}

/* 动画 */
@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .mode-grid {
        grid-template-columns: 1fr;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .settings-container {
        max-width: 95%;
        max-height: 65vh;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .setting-item label {
        margin-bottom: 5px;
    }
    
    .setting-item input {
        width: 100%;
        margin: 5px 0;
    }
    
    .color-options {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* 动态标题样式 */
.animated-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #00e6e6;
    text-shadow: 0 0 15px rgba(0, 230, 230, 0.6);
    text-align: center;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px rgba(0, 230, 230, 0.6);
    }
    to {
        text-shadow: 0 0 20px rgba(0, 230, 230, 0.9), 0 0 30px rgba(0, 230, 230, 0.7);
    }
}

/* Logo容器和动画 */
.logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
}

.logo-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #00e6e6;
    box-shadow: 0 0 20px rgba(0, 230, 230, 0.6);
    animation: rotate 10s linear infinite, pulse-ring 2s ease-in-out infinite;
}

.logo-animation::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2300e6e6"><circle cx="12" cy="12" r="8"/><path d="M12 2v4M12 18v4M2 12h4M18 12h4"/></svg>') no-repeat center center;
    background-size: contain;
    animation: pulse 2s ease-in-out infinite alternate;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 10px rgba(0, 230, 230, 0.6);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 230, 230, 0.9);
    }
    100% {
        box-shadow: 0 0 10px rgba(0, 230, 230, 0.6);
    }
}

/* 脉冲按钮 */
.pulse-btn {
    animation: pulse-btn 2s infinite;
    position: relative;
}

.pulse-btn::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 5px;
    background: rgba(0, 230, 230, 0.4);
    z-index: -1;
    animation: pulse-btn-ring 2s infinite;
}

@keyframes pulse-btn {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse-btn-ring {
    0% {
        opacity: 0.6;
        transform: scale(0.9);
    }
    50% {
        opacity: 0;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.3);
    }
}

/* 设置提示样式 */
.settings-tip {
    margin: 15px 0;
    text-align: center;
    color: #f72585;
    font-size: 1.1rem;
    animation: fadeIn 1s ease-in-out;
}

.settings-tip .highlight {
    color: #00e6e6;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 230, 230, 0.7);
}

.arrow-down {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #f72585;
    margin: 10px auto;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 浮动目标 */
.floating-targets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-target {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(0, 230, 230, 0.7);
    box-shadow: 0 0 15px rgba(0, 230, 230, 0.5);
    top: var(--y);
    left: var(--x);
    animation: float 6s ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    25% {
        opacity: 0.7;
    }
    50% {
        transform: translate(20px, -20px) scale(1.2);
        opacity: 1;
    }
    75% {
        opacity: 0.7;
    }
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
}

/* 设置提示样式 */
.setting-tip {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #aaaaaa;
    font-style: italic;
    padding-left: 10px;
    border-left: 2px solid #00e6e6;
} 