* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: bounce 2s infinite;
}

.header h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ゲームコンテナ */
.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

/* 開始画面 */
.start-screen {
    padding: 40px;
    text-align: center;
}

.start-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #4ecdc4;
}

.start-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.difficulty-selector {
    margin-bottom: 30px;
}

.difficulty-selector h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #333;
}

.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.difficulty-btn {
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background: white;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.difficulty-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.difficulty-btn.active {
    border-color: #4ecdc4;
    background: #4ecdc4;
    color: white;
    transform: scale(1.05);
}

.difficulty-btn i {
    margin-right: 5px;
    color: #ffd700;
}

.start-btn {
    padding: 18px 40px;
    border: none;
    border-radius: 30px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ゲーム画面 */
.game-screen {
    padding: 30px;
}

.game-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
}

.score-display, .timer-display, .accuracy-display {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.score-label, .timer-label, .accuracy-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.score, .timer, .accuracy {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.timer {
    color: #ff6b6b;
}

.accuracy {
    color: #4ecdc4;
}

.timer-unit {
    font-size: 1rem;
    color: #666;
}

/* 単語表示 */
.word-display {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
}

.word-label {
    font-size: 1.1rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.current-word {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #4ecdc4; }
    to { text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #4ecdc4; }
}

/* 入力セクション */
.input-section {
    text-align: center;
    margin-bottom: 30px;
}

#wordInput {
    width: 100%;
    max-width: 400px;
    padding: 15px 25px;
    border: 3px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1.2rem;
    outline: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#wordInput:focus {
    border-color: #4ecdc4;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
    transform: translateY(-2px);
}

.input-feedback {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 30px;
}

.input-feedback.correct {
    color: #4ecdc4;
    animation: correctFeedback 0.5s ease;
}

.input-feedback.incorrect {
    color: #ff6b6b;
    animation: incorrectFeedback 0.5s ease;
}

@keyframes correctFeedback {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes incorrectFeedback {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* プログレスバー */
.progress-section {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.progress-text {
    text-align: center;
    font-size: 1rem;
    color: #666;
}

/* ボタン */
.pause-btn {
    display: block;
    margin: 0 auto;
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* 一時停止画面 */
.pause-screen {
    padding: 40px;
    text-align: center;
}

.pause-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.pause-content p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.pause-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.resume-btn, .restart-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resume-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.restart-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
}

.resume-btn:hover, .restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* 結果画面 */
.result-screen {
    padding: 40px;
    text-align: center;
}

.result-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #ffd700;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.stat-item i {
    font-size: 2rem;
    color: #4ecdc4;
    margin-bottom: 15px;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.result-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.play-again-btn, .back-to-menu-btn {
    padding: 18px 35px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.play-again-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
}

.back-to-menu-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.play-again-btn:hover, .back-to-menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .start-screen, .game-screen, .pause-screen, .result-screen {
        padding: 20px;
    }
    
    .difficulty-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .game-header {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .current-word {
        font-size: 2.5rem;
    }
    
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .result-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .current-word {
        font-size: 2rem;
    }
    
    #wordInput {
        font-size: 1rem;
        padding: 12px 20px;
    }
}









