 body {
            font-family: 'Arial', sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin: 0;
            padding: 10px;
            background-color: #f5f5f5;
            touch-action: manipulation;
        }
                /* 粒子背景 */
            .particles {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                z-index: -1;
                background: transparent;
            }
        .container {
            text-align: center;
            width: 100%;
            max-width: 800px;
            position: relative;
        }
        h1 {
            color: #2c3e50;
            margin-bottom: 1rem;
            font-size: 1.2rem;
        }
         .word-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 15px;
        }
        .word-audio-container {
            display: flex;
            align-items: center;
            gap: 10px; /* 设置图标和音标之间的间距 */
            margin-top: 10px;
        }
       .speaker {
        font-size: 20px;
        color: #4285F4;
        cursor: pointer;
        margin: 0; /* 移除默认的上下边距 */
        }
        .speaker:hover {
            transform: scale(1.2);
        }
        .speaker.hidden {
            display: none;
        }
        .word-image {
            max-width: 180px;
            max-height: 120px;
            margin: 0.5rem auto;
            border-radius: 8px;
            display: none;
        }
        .word-display {
            font-size: 2.2rem;
            /*margin: 1rem 0;*/
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
        }
        .letter {
            width: 20px;
            height: 35px;
            margin: 0 1px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            border-bottom: 3px solid #ddd;
            transition: all 0.3s;
        }
        .letter.space {
            width: 30px;
            border-bottom: 3px dashed #da3636;
        }
        .letter.current {
            border-bottom-color: #3498db;
            transform: scale(1.1);
        }
        .letter.correct {
            color: #27ae60;
            border-bottom-color: #27ae60;
        }
        .letter.incorrect {
            color: #e74c3c;
            border-bottom-color: #e74c3c;
            animation: shake 0.5s;
        }
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-5px); }
            40%, 80% { transform: translateX(5px); }
        }
        .word-info {
            margin: 1rem 0;
        }
       .phonetic {
        font-size: 18px;
        color: #666;
        margin: 0; /* 移除默认的上下边距 */
    }
        .translation {
            color: #555;
            font-size: 1rem;
            margin: 0.5rem 0;
        }
        .keyboard {
            display: flex;
            flex-direction: column;
            gap: 8px;
           margin-top: 1.5rem;
            position: relative;
          
        }
        .keyboard.hidden {
            display: none;
        }
        .keyboard-row {
            display: flex;
            justify-content: center;
            gap: 8px;
        }
        .key {
            min-width: 35px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            user-select: none;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            transition: all 0.2s;
            padding: 0 8px;
        }
        
        .keyboard::before {
            content: "";
            position: absolute;
            top: -10px;
            left: 10%;
            right: 10%;
            height: 1px;
            background-color: #e0e0e0;
        }
                .key:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
        }
        .key:active {
            transform: translateY(1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        .key.q, .key.a, .key.z {
            background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
        }
        .key.w, .key.s, .key.x {
            background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
        }
        .key.e, .key.d, .key.c {
            background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
        }
        .key.r, .key.f, .key.v {
            background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
        }
        .key.t, .key.g, .key.b {
            background: linear-gradient(135deg, #a6c1ee 0%, #fbc2eb 100%);
        }
        .key.y, .key.h, .key.n {
            background: linear-gradient(135deg, #fdcbf1 0%, #e6dee9 100%);
        }
        .key.u, .key.j, .key.m {
            background: linear-gradient(135deg, #c1dfc4 0%, #deecdd 100%);
        }
        .key.i, .key.k, .key.comma {
            background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
        }
        .key.o, .key.l, .key.period {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }
        .key.p {
            background: linear-gradient(135deg, #5ee7df 0%, #b490ca 100%);
        }
        .key.shift {
            background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
            min-width: 60px;
        }
        .key.space {
            background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
            min-width: 200px;
        }
        .key.hyphen {
             background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%); 
        }
        .key.active {
            transform: translateY(2px);
            box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
        }
        .message {
            margin-top: 0rem;
            font-size: 0.8rem;
            min-height: 20px;
            color: #e74c3c;
        }
        .completion-container {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 200px;
            text-align: center;
        }
        .completion-container.show {
            display: flex;
        }
        .completion {
            font-size: 1.5rem;
            color: #2ecc71;
            font-weight: bold;
            margin-bottom: 1.5rem;
        }
        .restart-btn {
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            color: white;
            border: none;
            padding: 0.8rem 1.5rem;
            font-size: 1rem;
            border-radius: 5px;
            cursor: pointer;
            transition: all 0.3s;
            margin: 0.5rem;
            width: 150px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .restart-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
        }
        .restart-btn:active {
            transform: translateY(1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        #back-to-study-btn {
            background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
        }
        .mode-container {
            position: relative;
            /*margin: 0.5rem 0;*/
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        .mode-toggle {
            background-color: #8e44ad;
            color: white;
            border: none;
            padding: 0.5em;
            font-size: 0.8rem;
            border-radius: 25px;
            cursor: pointer;
            transition: background-color 0.3s;
            margin-bottom: 0.1rem;
            width: 180px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .mode-toggle:hover {
            background-color: #7d3c98;
        }
        .mode-toggle::before {
            content: "";
            position: absolute;
            left: 10px;
            width: 10px;
            height: 10px;
            background-color: white;
            border-radius: 50%;
            transition: all 0.3s;
        }
        .mode-toggle.active::before {
            left: calc(100% - 30px);
        }
        .mode-options {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            padding: 0.5rem 0;
            z-index: 100;
            display: none;
            width: 200px;
        }
        .mode-options.show {
            display: block;
        }
        .mode-option {
            padding: 0.8rem 1rem;
            cursor: pointer;
            border-radius: 4px;
            transition: background-color 0.2s;
            text-align: center;
            position: relative;
            font-size: 0.8rem;
        }
        .mode-option:hover {
            background-color: #f0f0f0;
        }
        .mode-option.active {
            background-color: #f8f5fa;
            color: #8e44ad;
            font-weight: bold;
        }
        .mode-option.active::before {
            content: "✓";
            color: #8e44ad;
            position: absolute;
            left: 10px;
        }
        .keyboard-bottom-row {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 8px;
        }
        .stats-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    background-color: #f0f8ff;
    padding: 8px 0;
    border-radius: 25px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #2c3e50;
}

.stat-item i {
    margin-right: 5px;
    font-size: 1rem;
}

#time-display {
    color: #3498db;
    font-weight: bold;
}

#accuracy-display {
    color: #27ae60;
    font-weight: bold;
}

#error-display {
    color: #e74c3c;
    font-weight: bold;
}


@media (max-width: 480px) {
    .stat-item {
        font-size: 0.8rem;
    }
    
    .stat-item i {
        font-size: 0.9rem;
    }
}
        @media (max-width: 480px) {
            .letter {
                width: 12px;
                height: 30px;
                font-size: 1.5rem;
              
            }
            .letter.space {
                width: 6.5px;
            }
                 .phonetic {
                font-size: 16px;
             
            }
            .key {
                min-width: 10px;
                height: 30px;
                font-size: 0.9rem;
                padding: 0 8px;
            }
            .key.space {
                min-width: 60px;
            }
            .key.shift {
                min-width: 35px;
            }
            .keyboard {
                gap: 20px;
            }
            .mode-toggle, .mode-options {
                width: 160px;
            }
            
          .word-info

             {
                margin: 0
             }
             
              .translation {
                  margin: 0;
                  font-size:0.8rem;
              }
        }
        @media (max-width: 320px) {
            .letter {
                width: 10px;
                height: 30px;
                font-size: 1.5rem;
                
            }
            .letter.space {
                width: 5px;
            }
            
          .phonetic {
                font-size: 15px;
         
            }
            
            
            .key {
                min-width: 10px;
                height: 30px;
                font-size: 0.9rem;
                padding: 0 5px;
            }
            .key.space {
                min-width: 50px;
            }
            .key.shift {
                min-width: 30px;
            }
            .keyboard {
                gap: 20px;
            }
            .mode-toggle, .mode-options {
                width: 160px;
            }
        }