* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.character-area {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

#character-image {
    max-width: 250px;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

#character-image:hover {
    transform: scale(1.05);
}

.game-status {
    margin: 20px 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#game-message {
    font-size: 1.2em;
    color: #555;
    line-height: 1.4;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
}

#game-message:hover {
    background: #e9ecef;
}

/* スキップヒント用のスタイル */
.skip-hint {
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
}

.button-area {
    margin: 30px 0;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.button-group.hidden {
    display: none;
}

.game-button {
    padding: 15px 25px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.start-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1.3em;
    padding: 20px 40px;
}

.start-button:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.janken-button {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.janken-button:hover {
    background: linear-gradient(135deg, #ff5252, #e53935);
    transform: translateY(-2px);
}

.direction-button {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    font-size: 1.5em;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.direction-button:hover {
    background: linear-gradient(135deg, #26d0ce, #2d8f8a);
    transform: translateY(-2px);
}

.restart-button {
    background: linear-gradient(135deg, #ffa726, #ff9800);
    color: white;
    font-size: 1.2em;
    padding: 18px 35px;
}

.restart-button:hover {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    transform: translateY(-2px);
}

.game-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.game-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.result-area {
    margin: 20px 0;
    min-height: 40px;
}

#result-message {
    font-size: 1.1em;
    color: #333;
    font-weight: bold;
}

@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }

    h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    #character-image {
        max-width: 200px;
        max-height: 250px;
    }

    .character-area {
        min-height: 250px;
        margin: 20px 0;
    }

    .game-button {
        padding: 12px 20px;
        font-size: 1em;
        min-width: 70px;
    }

    .direction-button {
        width: 70px;
        height: 70px;
        font-size: 1.3em;
    }

    .start-button {
        font-size: 1.1em;
        padding: 15px 30px;
    }

    .button-group {
        gap: 10px;
    }
}

@media (max-width: 400px) {
    .button-group {
        flex-direction: column;
        align-items: center;
    }

    .direction-button {
        width: 60px;
        height: 60px;
    }

    .game-button {
        width: 100%;
        max-width: 200px;
    }
}