:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --success-color: #27ae60;
    --background-color: #1a1a1a;
    --text-color: #ecf0f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: url('bg.jpg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.container {
    text-align: center;
    padding: 1rem;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
}

.roulette-container {
    max-width: 600px;
    margin: 0 auto;
}

.cylinder {
    position: relative;
    margin-bottom: 2rem;
}

.cylinder-graphic {
    width: 280px;
    height: 280px;
    margin: 2rem auto;
    position: relative;
    background: linear-gradient(45deg, #1a1a1a, #333);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 5s ease-out;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8),
                inset 0 0 50px rgba(0, 0, 0, 0.5);
    border: 3px solid #444;
}

@media (max-width: 768px) {
    .cylinder-graphic {
        width: 240px;
        height: 240px;
        margin: 1rem auto;
    }
}

.cylinder-graphic::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border-radius: 50%;
    z-index: 1;
}

.chamber {
    position: absolute;
    width: 45px;
    height: 45px;
    background: linear-gradient(45deg, #4a4a4a, #666);
    border: 3px solid #444;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .chamber {
        width: 35px;
        height: 35px;
    }
}

.chamber.loaded {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    box-shadow: 
        inset 0 0 15px rgba(0, 0, 0, 0.5),
        0 0 10px rgba(231, 76, 60, 0.5);
    border-color: #ff6b6b;
}

/* Position the chambers in a circle */
.chamber:nth-child(1) { transform: translate(0, -70px); }
.chamber:nth-child(2) { transform: translate(50px, -50px); }
.chamber:nth-child(3) { transform: translate(70px, 0); }
.chamber:nth-child(4) { transform: translate(50px, 50px); }
.chamber:nth-child(5) { transform: translate(0, 70px); }
.chamber:nth-child(6) { transform: translate(-50px, 50px); }
.chamber:nth-child(7) { transform: translate(-70px, 0); }
.chamber:nth-child(8) { transform: translate(-50px, -50px); }

.spinning {
    animation: spin 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(3600deg);
    }
}

.chamber-display {
    margin-bottom: 1rem;
}

.bullets {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .controls {
        gap: 0.5rem;
        padding: 0 0.5rem;
    }
}

.btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border: 2px solid gold;
    border-radius: 10px;
    cursor: pointer;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin: 0.5rem;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn i {
    font-size: 1.3em;
}

@media (max-width: 768px) {
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        min-width: 150px;
        margin: 0.3rem;
    }
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    background: linear-gradient(45deg, #34495e, #2c3e50);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666;
    color: #666;
}

.add-btn {
    color: gold;
    border-color: gold;
}

.add-btn:hover {
    background: linear-gradient(45deg, #34495e, #2c3e50);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.all-in-btn {
    background: linear-gradient(45deg, #f39c12, #f1c40f);
    border-color: gold;
    color: #2c3e50;
    text-shadow: none;
}

.all-in-btn:hover {
    background: linear-gradient(45deg, #f1c40f, #f39c12);
}

.fire-btn {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    border-color: #ff6b6b;
    color: #fff;
}

.fire-btn:hover {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.reset-btn {
    background: linear-gradient(45deg, #2c3e50, #2980b9);
    border-color: #3498db;
    color: #fff;
}

.reset-btn:hover {
    background: linear-gradient(45deg, #2980b9, #2c3e50);
}

.status {
    margin-top: 2rem;
}

.result {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    min-height: 3.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-weight: bold;
    padding: 1rem;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
    .result {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        min-height: 2.8rem;
        padding: 0.5rem;
    }
}

.probability {
    font-size: 1.4rem;
    color: #gold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    font-weight: bold;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .probability {
        font-size: 1.1rem;
    }
}

/* Screen effects */
.blood-drop {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #cc0000;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform-origin: center;
}

.blood-splash {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #cc0000;
    clip-path: polygon(50% 0%, 80% 30%, 100% 0%, 100% 20%, 80% 50%, 100% 80%, 100% 100%, 80% 100%, 50% 80%, 20% 100%, 0% 100%, 0% 80%, 20% 50%, 0% 20%, 0% 0%, 20% 0%);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform-origin: center;
}

@keyframes blood-drip {
    0% {
        transform: translate(0, -100%) scale(1);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(2);
        opacity: 0;
    }
}

@keyframes blood-splash {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        transform: scale(3) rotate(45deg);
        opacity: 0;
    }
}

.blood-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--x) var(--y), transparent 0%, rgba(204, 0, 0, 0.2) 100%);
    opacity: 0;
    z-index: 9998;
    transition: opacity 0.3s;
}

.blood-overlay.active {
    opacity: 1;
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f0f;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    pointer-events: none;
    z-index: 9999;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Screen flash effects */
.flash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 9998;
}

.flash.shot {
    background-color: rgba(231, 76, 60, 0.3);
    opacity: 1;
}

.flash.survive {
    background-color: rgba(39, 174, 96, 0.3);
    opacity: 1;
}

/* God save effect */
.god-save {
    animation: godSave 1s ease-in-out;
}

@keyframes godSave {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(2);
    }
    100% {
        filter: brightness(1);
    }
}

