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

body {
    font-family: 'Montserrat', Arial, sans-serif;
    background: linear-gradient(135deg, #1c2526, #2e3b3e);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    color: #e0e0e0;
    position: relative;
}

.header-container {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    margin-bottom: 70px;
    padding: 5px 0;
    min-height: 96px;
    position: relative;
}

#resetButton {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1rem;
    padding: 8px 12px;
    border: 2px solid #d4af37;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    background: #b71c1c;
    color: #fff;
    position: absolute;
    right: 10px;
    top: 15px;
}

#resetButton:hover {
    background: #d32f2f;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(183, 28, 28, 0.3);
}

#resetButton:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.title-image {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%) translateX(-105px) translateY(-40px);
    width: 400px;
    height: auto;
    filter:drop-shadow(0 4px 4px rgba(0, 0, 0, 0.6));
    transition: all 0.3s ease;
}

.title-image:hover {
    transform: translateX(-50%) translateX(-105px) translateY(-42px) scale(1.02);
    filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.7));
}

.balance {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.5rem;
    color: #e0e0e0;
    background: #222;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    border: 2px solid #d4af37;
    transition: all 0.3s ease;
    text-align: center;
    width: 300px;
}

.balance:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.2), inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.main-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    max-width: 1400px;
    width: 100%;
    padding: 0 10px;
    align-items: flex-start;
}

.game-container {
    background: #252525;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #d4af37;
    order: 2;
    position: relative;
    transition: all 0.3s ease;
}

.game-container:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.2), inset 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.bet-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

input, button {
    font-family: 'Montserrat', Arial, sans-serif;
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid #d4af37;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

input {
    width: 140px;
    background: #333;
    color: #e0e0e0;
    text-align: center;
}

input:focus {
    outline: none;
    border-color: #b8972f;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:disabled {
    background: #444;
    cursor: not-allowed;
    opacity: 0.7;
}

button {
    background: linear-gradient(135deg, #d4af37, #b8972f);
    color: #1c2526;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

button:hover:not(:disabled) {
    background: linear-gradient(135deg, #b8972f, #d4af37);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(212, 175, 55, 0.3);
}

button:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 10px 0;
    background: linear-gradient(135deg, #2f2f2f, #1f1f1f);
    border-radius: 12px;
    padding: 10px;
    border: 2px solid #d4af37;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.wheel-container:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.2), inset 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 3s ease-out;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    background: #333;
    position: relative;
    overflow: hidden;
}

#wheel.boss-spin {
    transition: transform 5s ease-out;
}

.slot-machine {
    display: none;
    width: 100%;
    height: 100%;
    background: #2a2a2a;
    border-radius: 12px;
    border: 3px solid #8a4b08;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.slot-machine.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.slot-reels {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.slot-reel {
    width: 80px;
    height: 120px;
    background: #333;
    border: 2px solid #8a4b08;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: #e0e0e0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.slot-reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.1));
    pointer-events: none;
}

.slot-reel.spinning .slot-value {
    animation: slotSpin 0.2s ease-in-out infinite;
}

@keyframes slotSpin {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.slot-value {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #d4af37;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slot-total {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e0e0e0;
    margin-top: 10px;
    display: none;
    background: #2f2f2f;
    padding: 8px 15px;
    border-radius: 8px;
    border: 2px solid #8a4b08;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slot-total.active {
    display: block;
}

.boss-portrait {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 70%;
    max-height: 70%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #252525;
    border-radius: 50%;
    border: 3px solid #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 2;
    display: none;
}

.arrow {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: all 0.3s ease;
}

.arrow:hover svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

.arrow svg {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}

#result {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-top: 15px;
    min-height: 30px;
    text-align: center;
    font-weight: 600;
    background: #2f2f2f;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#result.success {
    color: #2e7d32;
}

#result.refunded {
    color: #4a90e2;
}

#result.loss {
    color: #ff5555;
}

.shop-container {
    background: #252525;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 500px;
    border: 2px solid #d4af37;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    order: 3;
    transition: all 0.3s ease;
}

.shop-container:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.2), inset 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.shop-container h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 2.5rem;
    color: #d4af37;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
    grid-column: 1 / -1;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 2px;
}

.shop-container button {
    width: 100%;
    margin: 8px 0;
    background: linear-gradient(135deg, #d4af37, #b8972f);
    color: #1c2526;
    font-size: 0.9rem;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.shop-container button:hover:not(:disabled) {
    background: linear-gradient(135deg, #b8972f, #d4af37);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(212, 175, 55, 0.3);
}

.shop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lock-notice {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.8rem;
    color: #ff5555;
    text-align: center;
    margin-top: 4px;
    font-style: italic;
    padding: 2px 5px;
    background: rgba(255, 85, 85, 0.1);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.boss-container {
    background: #252525;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 280px;
    border: 2px solid #d4af37;
    order: 1;
    transition: all 0.3s ease;
}

.boss-container:hover {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.2), inset 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.boss-container h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.5rem;
    color: #d4af37;
    margin-bottom: 10px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.boss-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.boss-portrait-container {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #252525;
    border-radius: 8px;
    border: 3px solid #d4af37;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.boss-portrait-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.defeated-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 2;
}

.defeated-indicator::before {
    content: '';
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 6px;
    background-color: #b71c1c;
    transform: rotate(45deg);
    transform-origin: center;
    box-shadow: 0 0 8px rgba(183, 28, 28, 0.5);
}

.defeated-indicator::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 6px;
    background-color: #b71c1c;
    transform: rotate(-45deg);
    transform-origin: center;
    box-shadow: 0 0 8px rgba(183, 28, 28, 0.5);
}

.boss-container button {
    flex: 1;
    margin: 0;
    background: linear-gradient(135deg, #d4af37, #b8972f);
    color: #1c2526;
    font-size: 0.9rem;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.boss-container button:hover:not(:disabled) {
    background: linear-gradient(135deg, #b8972f, #d4af37);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), 0 0 12px rgba(212, 175, 55, 0.3);
}

.boss-lock-notice {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.8rem;
    color: #ff5555;
    text-align: center;
    margin-top: 4px;
    font-style: italic;
    padding: 2px 5px;
    background: rgba(255, 85, 85, 0.1);
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.key {
    margin-top: 10px;
    background: #252525;
    padding: 3px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(0, 0, 0, 0.3);
    width: 100%;
    font-size: 0.7rem;
    color: #e0e0e0;
    border: 2px solid #d4af37;
    transition: all 0.3s ease;
}

.key:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(212, 175, 55, 0.2), inset 0 2px 6px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.key h3 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.9rem;
    margin-bottom: 4px;
    font-weight: 700;
    color: #d4af37;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

.key-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.key-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 1px 0;
    font-family: 'Montserrat', Arial, sans-serif;
    padding: 1px 2px;
    background: rgba(37, 37, 37, 0.8);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.key-item:hover {
    background: rgba(37, 37, 37, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.color-box {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.big-win-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
    z-index: 20;
}

.big-win-animation.active {
    display: block;
}

.big-win-animation::before {
    content: 'BIG WIN';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 350px;
    height: 350px;
    color: #fff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    line-height: 350px;
    text-shadow: 0 0 10px #fff, 0 0 20px #ff4500, 0 0 30px #ffa500;
    animation: bigWinPulse 1.5s ease-out infinite;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.triple-jackpot::before {
    content: 'TRIPLE JACKPOT 10x';
    font-size: 2rem;
    line-height: 350px;
}

@keyframes bigWinPulse {
    0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.8; }
}

.particle {
    position: absolute;
    background: radial-gradient(circle, #ffa500, #ff4500);
    border-radius: 50%;
    animation: particleAnimation 1.2s ease-out forwards;
}

@keyframes particleAnimation {
    0% { transform: scale(0) translate(0, 0); opacity: 1; }
    100% { transform: scale(1.5) translate(80px, -80px); opacity: 0; }
}