/* リセット & ベーススタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ヘッダー */
header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.8s ease;
}

header h1 {
    font-size: 3rem;
    font-weight: 900;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* ゲーム情報パネル */
.game-info {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeIn 1s ease;
}

.score-board {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.player-score, .ai-score {
    text-align: center;
}

.score-board .label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.score-board .score {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: #667eea;
}

.current-char {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.current-char .label {
    font-size: 1rem;
    margin-right: 10px;
}

.current-char .char {
    font-size: 2rem;
    font-weight: 900;
}

/* ゲーム履歴 */
.game-history {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.history-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    animation: slideIn 0.3s ease;
}

.history-item.start {
    background: #f0f0f0;
    text-align: center;
    color: #666;
}

.history-item.player {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-right: 50px;
}

.history-item.ai {
    background: #f0f0f0;
    color: #333;
    margin-left: 50px;
}

.history-item.error {
    background: #ff6b6b;
    color: white;
    text-align: center;
}

.history-item.win {
    background: #51cf66;
    color: white;
    text-align: center;
    font-weight: bold;
}

.history-item strong {
    font-weight: 900;
}

/* 入力エリア */
.input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    animation: fadeIn 1.2s ease;
}

#pokemonInput {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

#pokemonInput:focus {
    outline: 3px solid #667eea;
}

.btn-primary {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 使用済みポケモン */
.used-pokemon {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.used-pokemon h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.used-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.used-tag {
    background: #f0f0f0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
}

/* コントロールボタン */
.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn-secondary, .btn-hint {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.btn-secondary {
    background: #ff6b6b;
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.btn-hint {
    background: #51cf66;
    color: white;
    box-shadow: 0 5px 15px rgba(81, 207, 102, 0.3);
}

.btn-secondary:hover, .btn-hint:hover {
    transform: translateY(-2px);
}

.btn-secondary:active, .btn-hint:active {
    transform: translateY(0);
}

/* フッター */
footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .score-board .score {
        font-size: 2rem;
    }

    .current-char .char {
        font-size: 1.5rem;
    }

    .input-area {
        flex-direction: column;
    }

    .history-item.player {
        margin-right: 20px;
    }

    .history-item.ai {
        margin-left: 20px;
    }

    .controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .game-info, .game-history, .used-pokemon {
        padding: 15px;
    }
}
