body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 40px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    backdrop-filter: blur(10px);
}

h1 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

.instructions {
    margin-bottom: 30px;
    color: #718096;
    font-size: 16px;
}

.instructions p {
    margin: 10px 0;
}

.test-area {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
}

.start-btn, .restart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.start-btn:hover, .restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.click-container {
    position: relative;
    width: 300px;
    height: 200px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.target {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.4);
}

.target:hover {
    transform: scale(1.05);
}

.invisible {
    visibility: hidden;
}

.hidden {
    display: none;
}

.results {
    margin-top: 20px;
    min-height: 150px; /* 确保结果区域始终占据一定空间 */
}

.results h2 {
    color: #333;
    margin-bottom: 15px;
}

#result-details {
    margin-bottom: 20px;
    font-size: 18px;
    color: #555;
}

.reaction-time {
    font-weight: bold;
    color: #ff6b6b;
}

.average-time {
    font-weight: bold;
    color: #667eea;
}

/* 移动端适配 */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 25px 20px;
        margin: 10px;
        border-radius: 15px;
    }
    
    .test-area {
        height: 250px;
    }
    
    .click-container {
        width: 250px;
        height: 150px;
    }
    
    .target {
        width: 60px;
        height: 60px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .instructions p {
        font-size: 14px;
    }
    
    .start-btn, .restart-btn {
        padding: 12px 30px;
        font-size: 16px;
    }
}