* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.slot-machine {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #f39c12;
    max-width: 500px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-panel {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #f39c12;
}

.info-panel > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-panel span:first-child {
    font-size: 0.9em;
    color: #bdc3c7;
}

.info-panel span:last-child {
    font-size: 1.5em;
    font-weight: bold;
    color: #f39c12;
}

.reels-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 30px 0;
    position: relative;
}

.reel {
    width: 120px;
    height: 360px;
    background: linear-gradient(145deg, #34495e, #2c3e50);
    border: 3px solid #f39c12;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.3);
}

.reel-symbols {
    position: absolute;
    width: 100%;
    top: 0;
    transition: transform 0.1s ease-out;
}

.symbol {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    border-bottom: 2px solid #7f8c8d;
    background: linear-gradient(145deg, #3498db, #2980b9);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.symbol:nth-child(even) {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
}

.payline {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #f39c12;
    box-shadow: 0 0 8px #f39c12, inset 0 0 2px rgba(255, 255, 255, 0.3);
    z-index: 15;
    border-radius: 2px;
    opacity: 1;
    pointer-events: none;
}

.payline-top {
    top: calc(16.67% - 1.5px); /* 上段のシンボルの中央 */
}

.payline-middle {
    top: calc(50% - 1.5px); /* 中段のシンボルの中央 */
}

.payline-bottom {
    top: calc(83.33% - 1.5px); /* 下段のシンボルの中央 */
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.control-btn, .spin-btn {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-btn {
    background: linear-gradient(145deg, #95a5a6, #7f8c8d);
    color: white;
    border: 2px solid #bdc3c7;
}

.control-btn:hover {
    background: linear-gradient(145deg, #bdc3c7, #95a5a6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.spin-btn {
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    border: 2px solid #f39c12;
    font-size: 1.3em;
    padding: 20px 40px;
}

.spin-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #f39c12, #e67e22);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.spin-btn:disabled {
    background: linear-gradient(145deg, #7f8c8d, #95a5a6);
    cursor: not-allowed;
    opacity: 0.6;
}

.payout-table {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #f39c12;
}

.payout-table h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #f39c12;
    font-size: 1.3em;
}

.payout-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1em;
}

.payout-row:last-child {
    border-bottom: none;
}

.payout-row span:first-child {
    font-size: 1.2em;
}

.payout-row span:last-child {
    color: #f39c12;
    font-weight: bold;
}

.win-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in-out;
}

.win-text {
    font-size: 5em;
    font-weight: bold;
    color: #f39c12;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: bounce 1s infinite;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

@keyframes spin {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-960px);
    }
}

.spinning {
    animation: spin 0.1s linear infinite;
}

/* レスポンシブデザイン */
@media (max-width: 600px) {
    .slot-machine {
        padding: 20px;
        margin: 20px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .reel {
        width: 90px;
        height: 270px;
    }
    
    .symbol {
        height: 90px;
        font-size: 3em;
    }
    
    .payline {
        height: 2px;
        background: #f39c12;
        box-shadow: 0 0 6px #f39c12, inset 0 0 1px rgba(255, 255, 255, 0.3);
    }
    
    .payline-top {
        top: calc(16.67% - 1px);
    }
    
    .payline-middle {
        top: calc(50% - 1px);
    }
    
    .payline-bottom {
        top: calc(83.33% - 1px);
    }
    
    .controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .info-panel {
        flex-direction: column;
        gap: 10px;
    }
    
    .info-panel > div {
        flex-direction: row;
        justify-content: space-between;
    }
}