* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 50%, #6b8e23 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.game-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
}

header {
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

.coins, .bet {
    color: #2c5530;
}

.slot-machine {
    position: relative;
    margin: 2rem 0;
}

.slot-reels {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
    background: #333;
    padding: 20px;
    border-radius: 15px;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.5);
}

.reel {
    width: 100px;
    height: 120px;
    background: white;
    border: 3px solid #555;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.symbol {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #eee;
    transition: transform 0.1s ease;
}

.reel.spinning .symbol {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {
    from { transform: translateY(0); }
    to { transform: translateY(-120px); }
}

.result-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ffa500, #ff6b6b);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.result-line.show {
    opacity: 1;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.bet-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.bet-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #2c5530;
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bet-btn:hover {
    background: #4a7c59;
    transform: scale(1.1);
}

.bet-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.bet-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c5530;
}

.spin-button {
    background: linear-gradient(145deg, #ff6b6b, #ff4757);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.spin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.spin-button:active {
    transform: translateY(0);
}

.spin-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spin-button.spinning {
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.message-area {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
}

#result-message {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c5530;
    transition: all 0.3s ease;
}

#result-message.win {
    color: #ff6b6b;
    animation: celebration 0.6s ease-in-out;
}

@keyframes celebration {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.paytable {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 2rem;
}

.paytable h3 {
    color: #2c5530;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.paytable-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
}

.paytable-item {
    margin: 0;
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.paytable-item:hover {
    background-color: #e9ecef;
}

.auto-spin-button {
    background: linear-gradient(145deg, #4ECDC4, #45B7D1);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.auto-spin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

.auto-spin-button:active {
    transform: translateY(0);
}

.auto-spin-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auto-spin-button.active {
    background: linear-gradient(145deg, #ff6b6b, #ff4757);
    animation: pulse 1s ease-in-out infinite alternate;
}

.auto-spin-button.active .auto-spin-text::after {
    content: " 停止";
}

.sound-toggle {
    background: #2c5530;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-toggle:hover {
    background: #4a7c59;
    transform: scale(1.1);
}

.sound-toggle.muted {
    background: #999;
    color: #666;
}

.sound-toggle.muted:hover {
    background: #777;
}

/* レスポンシブデザイン */
@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }
    
    .game-container {
        padding: 1rem;
        max-width: 100%;
        width: 95%;
        margin: 0.5rem auto;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .score-board {
        padding: 0.8rem;
        font-size: 1rem;
        flex-direction: row;
        gap: 0.5rem;
        justify-content: space-between;
    }
    
    .sound-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .slot-reels {
        gap: 5px;
        padding: 15px 10px;
    }
    
    .reel {
        width: 70px;
        height: 85px;
    }
    
    .symbol {
        height: 85px;
        font-size: 2rem;
    }
    
    .result-line {
        width: 240px;
    }
    
    .controls {
        gap: 0.8rem;
        margin-top: 1.5rem;
    }
    
    .bet-controls {
        gap: 0.8rem;
    }
    
    .bet-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .bet-display {
        font-size: 1rem;
    }
    
    .spin-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .message-area {
        min-height: 50px;
        margin: 0.8rem 0;
    }
    
    #result-message {
        font-size: 1.2rem;
    }
    
    .paytable {
        padding: 1rem;
        margin-top: 1.5rem;
    }
    
    .paytable h3 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .paytable-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }
    
    .paytable-item {
        font-size: 0.9rem;
        padding: 0.4rem;
    }
    
    .auto-spin-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .game-container {
        padding: 0.8rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .reel {
        width: 60px;
        height: 75px;
    }
    
    .symbol {
        height: 75px;
        font-size: 1.8rem;
    }
    
    .result-line {
        width: 200px;
    }
    
    .spin-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .paytable-items {
        grid-template-columns: 1fr 1fr;
        gap: 0.2rem;
    }
    
    .auto-spin-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}