* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('https://img0.baidu.com/it/u=219643644,756655103&fm=253&fmt=auto&app=138&f=JPEG?w=499&h=346') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* 全屏字母流动容器 */
.letters-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 100, 100, 0.3) 0%, transparent 8%);
    overflow: hidden;
    z-index: 1;
}



/* 流动的字母 */
.floating-letter {
    position: absolute;
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s ease;
    z-index: 3;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 100px;
    min-height: 100px;
}

/* 字母文字样式 */
.letter-text {
    font-size: 2.4rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.floating-letter.correct {
    animation: fadeOut 0.3s ease forwards;
}

.floating-letter.correct .letter-text {
    color: #4caf50;
}

.floating-letter.danger {
    background: #ff4444;
    color: white;
    animation: shake 0.3s ease;
}

@keyframes fadeOut {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* 右上角游戏信息 */
.top-right-info {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 100;
    min-width: 200px;
}

.top-right-info .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1rem;
}

.top-right-info .info-item:last-child {
    margin-bottom: 0;
}

.top-right-info .label {
    color: #666;
    font-weight: 500;
}

.top-right-info .info-item span:not(.label) {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2rem;
}

/* 中心开始按钮覆盖层 */
.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.start-content {
    text-align: center;
    color: white;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.start-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.start-content .subtitle {
    font-size: 1.5rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
}

.btn-large {
    padding: 20px 60px;
    font-size: 1.8rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.5);
}

.btn-large:active {
    transform: translateY(0) scale(0.98);
}

/* 隐藏状态 */
.start-overlay.hidden {
    display: none;
}

/* 底部重置按钮 */
.bottom-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
}

.btn-small {
    padding: 10px 25px;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 游戏结束覆盖层 */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.game-over-content {
    text-align: center;
    color: white;
    animation: fadeInUp 0.5s ease;
}

.game-over-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.game-over-content .result {
    font-size: 1.5rem;
    margin: 10px 0;
    line-height: 1.8;
}

.game-over-content .btn-large {
    margin-top: 30px;
}

.game-over-overlay.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .top-right-info {
        top: 10px;
        right: 10px;
        padding: 15px;
        min-width: 160px;
    }
    
    .top-right-info .info-item {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .top-right-info .info-item span:not(.label) {
        font-size: 1rem;
    }
    
    .start-content h1 {
        font-size: 2.5rem;
    }
    
    .start-content .subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }
    
    .btn-large {
        padding: 15px 40px;
        font-size: 1.4rem;
    }
    
    .floating-letter {
        font-size: 2rem;
        padding: 10px 20px;
    }
}
