:root {
    --primary-color: #FF4081;
    --background-color: #f5f6fa;
    --text-primary: #333333;
    --success-color: #4CAF50;
    --error-color: #f44336;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.file-selector {
    margin-bottom: 20px;
}

.file-selector select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.stats-panel {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px;
    background: var(--background-color);
    border-radius: 5px;
}

.stat-item {
    font-size: 16px;
}

.typing-area {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    font-family: monospace;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.text-line {
    font-size: 24px;
    line-height: 1.5;
    min-height: 36px;
    margin-bottom: 10px;
    white-space: pre-wrap;
    word-break: break-all;
}

.char {
    display: inline-block;
    width: 14px;
    text-align: center;
}

.empty {
    color: #ccc;
}

.correct {
    color: var(--success-color);
    font-weight: bold;
}

.incorrect {
    color: var(--error-color);
    font-weight: bold;
}

.correct-bg {
    background-color: rgba(76, 175, 80, 0.2); /* 浅绿色背景 */
}

.incorrect-bg {
    background-color: rgba(244, 67, 54, 0.2); /* 浅红色背景 */
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.keyboard-row {
    display: flex;
    gap: 5px;
}

.key {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    cursor: default;
    transition: all 0.3s ease;
}

.key.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(2px);
}

.key.space {
    width: 200px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: var(--text-primary);
    font-size: 32px;
    margin: 0;
}

.version {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: normal;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    color: var(--text-secondary);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--text-primary);
}