/* --- Globální Styly --- */
body {
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    background-color: #0d1a26;
    color: #fff;
    padding: 30px 10px;
    overflow-x: hidden;
    padding-bottom: 120px;
}

h1 {
    color: #ffcc00;
    margin-bottom: 30px;
    font-size: 2.5em;
}

#credit-display {
    font-size: 1.3em;
    font-weight: bold;
    color: #ffcc00;
    margin-bottom: 25px;
    padding: 10px;
    border-radius: 5px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    background-color: rgba(255, 204, 0, 0.05);
    border: 2px solid #ffcc00;
    text-shadow: 0 0 3px #ffdd44;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.4), 
                inset 0 0 4px rgba(255, 204, 0, 0.2);
}

.top-credit-display {
    position: sticky;
    top: 10px;
    z-index: 1000;
}

/* --- TŘÍDA PRO FIXNÍ TLAČÍTKO V ROHU --- */
.back-to-menu-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 900;
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffcc00;
    color: #0d1a26;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
}
.back-to-menu-button:hover {
    background-color: #e6b800;
    transform: scale(1.05);
}

/* --- MEDIA QUERY: ZMĚNA POZICE PRO MOBILNÍ ZAŘÍZENÍ (max-width: 600px) --- */
@media (max-width: 600px) {
    .back-to-menu-button {
        top: auto;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        max-width: 250px;
        text-align: center;
        padding: 12px 10px;
        position: fixed;
        z-index: 100;
    }

    .corner-return-button {
        top: auto;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        max-width: 250px;
        text-align: center;
        padding: 12px 10px;
        z-index: 100;
    }
}

/* --- TŘÍDA PRO BACKGROUND.PNG --- */
.casino-background {
    background-image: url('images/background.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    background-color: #0d1a26;
}

/* --- Ostatní globální a herní styly (Ponecháno) --- */
#game-area {
    display: flex;
    gap: 20px;
    max-width: 1300px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
}
.single-game-area {
    min-height: 70vh;
    align-items: center;
}
.game-panel {
    background-color: #1a2c38;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 300px;
    width: 90%;
    max-width: 400px;
    border: 5px solid #ffcc00;
    margin-bottom: 20px;
    position: relative;
}
.game-panel h2 {
    color: #00ffaa;
    margin-bottom: 20px;
    font-size: 1.8em;
}
.controls { margin-top: 15px; margin-bottom: 10px;}
.controls label { display: block; margin-bottom: 5px; }
input[type="number"] { width: 80px; padding: 5px; }
button {
    padding: 10px 20px; font-size: 1em;
    color: #000; background-color: #ffcc00; border: none; border-radius: 8px; cursor: pointer;
    transition: background-color 0.2s; margin-left: 5px;
}
button:hover:not(:disabled) { background-color: #ffd733; }
button:disabled { background-color: #aaa; cursor: not-allowed; }
.message { margin-top: 15px; font-weight: bold; min-height: 30px; }
.win { color: #33ff33; animation: pulse 1s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* --- Slot Machine Styly (Ponecháno) --- */
#slot-machine #s-reels {
     display: flex; justify-content: space-around; margin-bottom: 30px; padding: 10px 0;
     background-color: #0a1117; border-radius: 8px; border: 2px solid #333;
}
#slot-machine .reel {
    font-size: 3.5em; width: 60px; height: 70px; line-height: 70px;
    background-color: #000; border-radius: 5px; margin: 0 5px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2); display: inline-block;
}

/* --- Ruleta Styly (Ponecháno) --- */
#animated-roulette #ar-display {
    position: relative; width: 200px; height: 200px; margin: 10px auto; border-radius: 50%; border: 8px solid #555; background-color: #333; overflow: hidden; z-index: 10;
}
#animated-roulette #ar-wheel-inner {
    width: 100%; height: 100%; border-radius: 50%; position: relative; transition: transform 4s cubic-bezier(0.2, 0.8, 0.6, 1);
}
#animated-roulette #ar-pointer { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); color: #ffcc00; font-size: 30px; z-index: 30; text-shadow: 0 0 5px #000;}
.roulette-segment {
    position: absolute; top: 0; left: 50%; width: 50%; height: 50%; transform-origin: 0% 100%; border-radius: 0 100% 0 0; display: flex;
    align-items: flex-start; justify-content: center; padding-top: 3px; font-size: 0.6em; font-weight: bold; color: #eee; line-height: 1; box-sizing: border-box;
}
.red-bg { background-color: #ff0000; }
.black-bg { background-color: #000000; }
.green-bg { background-color: #00aa00; }
.roulette-options-simple { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-bottom: 15px;}
.roulette-option { padding: 8px; border: 2px solid #555; border-radius: 5px; cursor: pointer; }
.roulette-option.selected { border-color: #ffcc00; box-shadow: 0 0 10px rgba(255, 204, 0, 0.7); }


/* ------------------------------------------------ */
/* --- PLINKO STYLY (UPRAVENO PRO TROJÚHELNÍK) --- */
/* ------------------------------------------------ */
#plinko-game-area {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: nowrap;
}
#plinko-container {
    width: 350px; 
    height: 500px; 
    position: relative;
    padding-bottom: 50px;
}
#plinko-board {
    width: 350px;
    height: 450px; 
    background-color: #0d1a26; 
    border: 3px solid #ffcc00;
    border-radius: 10px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}
.peg { 
    position: absolute; 
    width: 8px; 
    height: 8px; 
    background-color: #999; 
    border-radius: 50%; 
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
    z-index: 10;
}
.bucket-row { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 50px; 
    display: flex; 
    border-top: 3px solid #ffcc00;
    z-index: 5;
}
.bucket { 
    flex-grow: 1; 
    height: 100%; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    font-size: 0.7em; 
    font-weight: bold; 
    color: #fff; 
    border-right: 1px dashed rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    transition: background-color 0.2s;
}
.bucket:last-child { border-right: none; }

/* BAREVNÉ Kbelíky (Kraje vysoká výhra, Střed nízká/prohra) */
/* Vysoké výhry (extrémně vzácné) */
.bucket[data-multiplier="50.0"], .bucket[data-multiplier="25.0"], .bucket[data-multiplier="10.0"] { 
    background-color: #e74c3c; 
    color: #fff; 
    box-shadow: inset 0 0 8px rgba(255, 255, 0, 0.8);
}
/* Střední výhry */
.bucket[data-multiplier="3.0"], .bucket[data-multiplier="2.0"], .bucket[data-multiplier="1.5"], .bucket[data-multiplier="1.0"] { 
    background-color: #3498db; 
    color: #fff; 
}
/* Nízké/Proherní (Střed - 0x a 0.5x) */
.bucket[data-multiplier="0.5"], .bucket[data-multiplier="0.0"] { 
    background-color: #1a2c38; 
    color: #f00; 
}


/* Animace pro kbelík při dopadu */
.bucket.hit {
    background-color: #33ff33;
    box-shadow: 0 0 10px #33ff33;
    animation: bucket-flash 0.5s ease-out;
}
@keyframes bucket-flash {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.plinko-chip {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #ffcc00;
    border-radius: 50%;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 5px rgba(255, 255, 0, 0.8);
    z-index: 20;
}

/* --- Responzivita Plinka --- */
@media (max-width: 600px) {
    #plinko-game-area {
        flex-direction: column;
        gap: 0; 
        align-items: center;
        width: 100%;
        padding: 0;
    }
    #plinko-panel {
        order: 2;
        max-width: 95%;
        margin-top: 15px;
    }
    #plinko-container {
        order: 1;
        width: 100%;
        max-width: 350px;
        height: auto;
    }
    #plinko-board {
        width: 100%; 
        height: 450px;
        max-width: 350px;
        margin: 10px auto;
    }
}

/* --- Globální Styly --- */
/* ... (styly beze změny) ... */

/* ------------------------------------------------ */
/* --- CRASH GAME STYLY (Opraveno) --- */
/* ------------------------------------------------ */
#crash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
}

#crash-display-area {
    position: relative;
    width: 100%;
    height: 400px; 
    background: linear-gradient(to top, #1a2c38 0%, #0d1a26 100%);
    border: 5px solid #ffcc00;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}

/* Canvas pro trasu */
#crash-trace-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Pod raketkou, nad pozadím */
}


#crash-multiplier-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5em;
    font-weight: bold;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
    transition: font-size 0.5s, color 0.5s;
    z-index: 10;
}

#crash-rocket-area {
    position: absolute;
    bottom: 50px; /* Startovní Y pozice 50px odspodu */
    left: 10px; /* Startovní X pozice 10px zleva */
    width: 100%; 
    height: 100%;
    pointer-events: none;
    z-index: 20; 
}

#crash-rocket {
    font-size: 50px;
    position: absolute;
    bottom: 0; 
    left: 0; 
    
    /* Počáteční posun 0,0 a rotace pro směr (bude přepsáno v JS) */
    transform: translate(0, 0) rotateZ(-30deg); 
    
    color: yellow;
    transition: transform 0.1s linear, filter 0.1s linear, opacity 0.5s;
    filter: hue-rotate(60deg) brightness(1.2);
    opacity: 1;
    
.bust {
    color: #ff0000;
    animation: none; 
}

/* ... (zbytek media query) ... */
@media (max-width: 600px) {
    .back-to-menu-button {
        top: auto;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        max-width: 250px;
        text-align: center;
        padding: 12px 10px;
        position: fixed;
        z-index: 100;
    }

    .corner-return-button {
        top: auto;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        max-width: 250px;
        text-align: center;
        padding: 12px 10px;
        z-index: 100;
    }
    
    #crash-display-area {
        height: 350px;
    }
    #crash-multiplier-display {
        font-size: 4em;
    }

    /* Nové styly pro tlačítko podpory v navigaci */
    .casino-navbar a.support-button-nav {
        background-color: #e74c3c; /* Výraznější barva pro podporu */
        color: #fff;
        border: 2px solid #e74c3c;
    }
    .casino-navbar a.support-button-nav:hover {
        background-color: #c0392b;
        color: #fff;
        box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    }
}