.csm-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 10px;
    font-family: 'Arial Black', Gadget, sans-serif;
    user-select: none;
}

/* Automaten-Gehäuse */
.csm-cabinet {
    position: relative;
    width: 360px;
    background: linear-gradient(180deg, #444, #1a1a1a);
    border: 4px solid #f39c12;
    border-radius: 20px 20px 10px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7), inset 0 0 15px rgba(255,255,255,0.1);
    padding: 20px 15px;
    box-sizing: border-box;
}

/* Walzen Spin Animation */
.csm-reel.spinning .csm-symbol {
    display: inline-block;
    animation: reelSpin 0.1s infinite linear;
}

@keyframes reelSpin {
    0% { transform: translateY(-100%); opacity: 0.3; }
    50% { transform: translateY(0); opacity: 0.8; }
    100% { transform: translateY(100%); opacity: 0.3; }
}

/* Gewinn Flackern des Gehäuses */
.csm-cabinet.win-flash {
    animation: cabinetFlash 0.3s infinite alternate;
}

@keyframes cabinetFlash {
    from { border-color: #f39c12; box-shadow: 0 0 20px #f39c12; }
    to { border-color: #ff0000; box-shadow: 0 0 40px #ff0000; }
}

/* Gewinn Overlay */
.csm-win-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99;
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.csm-win-overlay.show {
    display: flex;
}

.csm-win-banner {
    font-size: 32px;
    color: #f1c40f;
    text-shadow: 0 0 15px #f1c40f;
    margin: 0;
    text-transform: uppercase;
}

.csm-win-val {
    font-size: 48px;
    color: #2ecc71;
    font-weight: 900;
    text-shadow: 0 0 20px #2ecc71;
    margin-top: 10px;
}

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Signalleuchte oben */
.csm-top-light {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 25px;
    background: #e74c3c;
    border-radius: 20px 20px 0 0;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.csm-top-light.active {
    background: #ff0000;
    box-shadow: 0 0 25px #ff0000, 0 0 50px #ff0000;
    animation: blink 0.3s infinite alternate;
}

@keyframes blink {
    from { opacity: 1; }
    to { opacity: 0.4; }
}

/* Leuchtschild oben */
.csm-header-marquee {
    background: #fff;
    border: 4px double #d4af37;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.csm-marquee-title {
    margin: 0;
    font-size: 22px;
    color: #d35400;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Walzen-Gehäuse */
.csm-screen-housing {
    background: #111;
    border: 4px solid #333;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: inset 0 0 15px #000;
}

.csm-reels-frame {
    display: flex;
    justify-content: space-between;
    background: #fff;
    border-radius: 6px;
    padding: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.csm-reel {
    width: 30%;
    height: 80px;
    background: #fdfdfd;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    overflow: hidden;
}

.csm-reel.blur {
    filter: blur(3px);
    transform: scaleY(1.05);
}

/* Dashboard */
.csm-dashboard {
    display: flex;
    justify-content: space-between;
    background: #222;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #444;
}

.csm-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.csm-stat-label {
    font-size: 9px;
    color: #aaa;
    margin-bottom: 2px;
}

.csm-stat-value {
    font-size: 13px;
    color: #2ecc71;
}

.csm-win-display {
    color: #f1c40f;
}

.csm-bet-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.csm-bet-btn {
    background: #444;
    color: #fff;
    border: none;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.csm-bet-btn:hover { background: #666; }

/* Control Buttons */
.csm-control-deck {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.csm-btn {
    flex: 1;
    padding: 10px 5px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 11px;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0,0,0,0.4);
    transition: all 0.1s ease;
}

.csm-btn:active {
    transform: translateY(4px);
    box-shadow: none;
}

.csm-btn-red { background: #e74c3c; color: white; }
.csm-btn-yellow { background: #f39c12; color: white; }
.csm-btn-blue { background: #3498db; color: white; }

/* Hebel (Arm) an der Seite */
.csm-arm-container {
    position: absolute;
    right: -24px;
    top: 140px;
    width: 20px;
    height: 120px;
    cursor: pointer;
}

.csm-arm-shaft {
    position: absolute;
    right: 8px;
    bottom: 20px;
    width: 8px;
    height: 80px;
    background: linear-gradient(90deg, #888, #fff, #888);
    border-radius: 4px;
    transform-origin: bottom center;
    transition: transform 0.3s ease;
}

.csm-arm-knob {
    position: absolute;
    right: 0;
    top: 10px;
    width: 24px;
    height: 24px;
    background: #e74c3c;
    border-radius: 50%;
    box-shadow: inset -2px -2px 5px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

.csm-arm-container.pull .csm-arm-shaft {
    transform: scaleY(0.3);
}

.csm-arm-container.pull .csm-arm-knob {
    transform: translateY(60px);
}

/* Unterer Bereich / Münzschale */
.csm-bottom-panel {
    background: #111;
    height: 30px;
    border-radius: 0 0 6px 6px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.csm-coin-tray {
    width: 60%;
    height: 12px;
    background: #333;
    border-radius: 0 0 10px 10px;
    border-bottom: 2px solid #555;
}

/* Modal Standardzustand: Versteckt */
.csm-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 16px;
    display: none; /* Standarmäßig ausgeblendet */
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal Sichtbar machen */
.csm-modal.show {
    display: flex !important;
}

/* Modal-Inhalt Styling */
.csm-modal-content {
    background: #1e272e;
    border: 2px solid #f1c40f;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 0 25px rgba(241, 196, 15, 0.4);
}

.csm-modal-content h3 {
    margin-top: 0;
    color: #f1c40f;
    font-size: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.csm-pay-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: left;
}

.csm-pay-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px stroke rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.csm-pay-list li strong {
    color: #2ecc71;
}