body {
    background-color: #003366; /* Deep blue ocean fallback */
    color: #E0F7FA; /* Light cyan/off-white for text */
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    background-image: url('./assets/images/live_bait_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#slot-machine {
    background-color: #0077CC; /* Medium blue, like boat paint or clearer water */
    border: 10px solid #87CEEB; /* Sky blue or light wood, like driftwood */
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5), inset 0 0 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    max-width: 95%;
    position: relative; 
    overflow: visible; 
}

header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

header h1 {
    font-family: 'Contrail One', cursive; /* Changed from Sancreek */
    font-size: 3.5em;
    color: #FFD700; /* Gold, like treasure or a prize fish */
    text-shadow: 2px 2px #000, 0 0 10px #FFD700, 0 0 20px #FFD700;
    margin: 0;
}

.neon-text {
    font-family: 'Contrail One', cursive; /* Changed from Sancreek */
    text-align: center;
    font-size: 3em;
    visibility: hidden; 
    color: #fff;
    text-shadow: 
        0 0 5px #0AF, 
        0 0 10px #0AF,
        0 0 20px #0AF,
        0 0 40px #0AF,
        0 0 80px #0AF;
    animation: flicker-blue 1.5s infinite alternate; /* Renamed animation */
}

#win-announcement.active {
    visibility: visible;
}

@keyframes flicker-blue { /* Renamed and colors changed */
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow:
            0 0 4px #0CF, /* Bright Aqua */
            0 0 11px #0CF,
            0 0 19px #0CF,
            0 0 40px #0AF, /* Slightly deeper blue */
            0 0 80px #0AF;
        color: #EFFFFF;
    }
    20%, 24%, 55% {
        text-shadow: none;
        color: #AFFFFF;
    }
}

#reels-area {
    position: relative;
    margin-bottom: 20px;
    background: #004C99; /* Darker blue for reel background */
    padding: 10px;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.7);
}

#floating-win-amount {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(20px); 
    font-family: 'Contrail One', cursive; /* Changed from Sancreek */
    font-size: 4em; 
    color: #FFD700; /* Gold */
    text-shadow: 
        2px 2px 0 #000, 
        0 0 8px #FFA500, /* Orange glow - like a sunset over water */
        0 0 15px #FFA500,
        0 0 25px #FFA500;
    opacity: 0;
    pointer-events: none;
    z-index: 150; 
    white-space: nowrap; 
}

#floating-win-amount.active {
    animation: floatUpAndFade 2.5s forwards ease-out;
}

@keyframes floatUpAndFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(30px) scale(0.8);
    }
    15% { 
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0px) scale(1.1);
    }
    25% { 
        transform: translate(-50%, -50%) translateY(-10px) scale(1);
    }
    80% { 
        opacity: 1;
        transform: translate(-50%, -50%) translateY(-60px) scale(1);
    }
    100% { 
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-100px) scale(0.9);
    }
}

#reels-container {
    display: flex;
    gap: 10px; 
    border: 2px solid #5F9EA0; /* Cadet blue - like water or metal */
    padding: 5px;
    background-color: #001f3f; /* Very dark navy blue */
}

.reel {
    display: flex;
    flex-direction: column;
    gap: 10px; 
}

.symbol-slot {
    width: 80px;
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 2px solid #7BB6D5; /* Lighter blue border for symbols */
    border-radius: 5px;
    background-color: #ADD8E6; /* Light blue, like shallow water */
    box-shadow: inset 0 0 5px rgba(0,0,0,0.3);
    transition: transform 0.1s ease-out, box-shadow 0.3s ease;
}

.symbol-slot.spinning {
    opacity: 0.7;
}

.symbol-slot.landed {
    transform: scale(1.1);
    animation: land-bounce 0.3s;
}

@keyframes land-bounce {
    0% { transform: scale(1.0); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.0); }
}

.symbol-slot.winning-highlight {
    box-shadow: 0 0 10px 3px #39D7ED, 0 0 20px 6px #39D7ED, inset 0 0 5px #39D7ED; /* Bright cyan/aqua glow */
    border-color: #39D7ED;
}

#payline-overlay {
    position: absolute;
    top: 15px; 
    left: 15px; 
    pointer-events: none; 
    overflow: visible; 
}

.payline-path {
    stroke-width: 4px;
    fill: none;
    stroke: rgba(224, 247, 250, 0.2); /* Very dim light cyan */
    transition: stroke 0.3s ease, filter 0.3s ease;
}

.payline-path.win-active {
    stroke-width: 5px; 
}

#controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 600px; 
    padding: 15px;
    background-color: #005A9C; /* Darker blue for control panel */
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

.control-panel {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.info-display {
    background-color: #003366; /* Deep blue */
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    text-align: center;
    min-width: 100px;
    color: #E0F7FA; /* Light text on dark blue */
}

.info-display span:first-child {
    font-weight: bold;
    margin-right: 5px;
    color: #FFD700; /* Gold for labels */
}

.action-panel {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
}

#bet-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

#bet-controls span {
    font-size: 1.2em;
    font-weight: bold;
    color: #FFD700; /* Gold for BET text */
}

.control-button {
    font-family: 'Contrail One', cursive; /* Changed from Sancreek */
    background-color: #FFA500; /* Orange - like a buoy or life jacket */
    color: #003366; /* Dark blue text */
    border: 2px solid #CC8400; /* Darker orange border */
    padding: 10px 20px;
    font-size: 1.5em;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px #A56A00; /* Dark orange shadow */
    transition: all 0.1s ease;
}

.control-button:hover {
    background-color: #FFB732; /* Lighter orange */
}

.control-button:active {
    background-color: #E69500; /* Darker active orange */
    box-shadow: 0 2px #A56A00;
    transform: translateY(2px);
}

.control-button:disabled {
    background-color: #777;
    color: #aaa;
    cursor: not-allowed;
    box-shadow: 0 4px #555;
}

#spin-button {
    padding: 15px 30px;
    font-size: 2em;
    background-color: #32CD32; /* Sea green / bright green for SPIN */
    color: white;
    border-color: #228B22; /* Forest green border */
    box-shadow: 0 4px #1A681A; /* Darker green shadow */
}
#spin-button:hover { background-color: #3AE23A; }
#spin-button:active { background-color: #2CB72C; box-shadow: 0 2px #1A681A; }
#spin-button:disabled { background-color: #207720; box-shadow: 0 4px #105010;}


#payout-table-container {
    margin-top: 10px;
    background-color: #005A9C; /* Darker blue, same as controls */
    padding: 15px;
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

#payout-table-container h2 {
    font-family: 'Contrail One', cursive; /* Changed from Sancreek */
    text-align: center;
    color: #FFD700; /* Gold */
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em; 
}

#payout-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #B0E0E6; /* Powder blue for table background */
    color: #003366; /* Dark blue text on table */
    border-radius: 5px;
    overflow: hidden; 
}

#payout-table th, #payout-table td {
    border: 1px solid #6CA0AD; /* Bluish-gray border */
    padding: 5px; 
    text-align: center;
    font-size: 0.9em; 
}

#payout-table th {
    background-color: #6CA0AD; /* Header background */
    color: #003366;
    font-family: 'Contrail One', cursive; /* Changed from Sancreek */
    font-size: 1em; 
}

#payout-table td:first-child { 
    font-weight: bold;
}

td .symbol-cell-in-table img {
    width: 200px; 
    vertical-align: middle;
    margin-right: 4px; 
}

/* Neon border styles */
.neon-border {
    position: absolute;
    background-color: #00FFFF; /* Cyan neon color - still works well */
    opacity: 0;
    transition: opacity 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border-radius: 2px;
    z-index: 0; 
    pointer-events: none;
}

#slot-machine.has-win .neon-border {
    opacity: 1;
    animation: neon-border-flicker-cyan 1.5s infinite alternate; /* Existing cyan flicker is fine */
}

/* Centering 4px thick bars on the 10px border of #slot-machine */
.neon-top {
    top: -12px; 
    left: -12px;
    width: calc(100% + 24px); 
    height: 4px;
}
.neon-bottom {
    bottom: -12px;
    left: -12px;
    width: calc(100% + 24px);
    height: 4px;
}
.neon-left {
    top: -12px;
    left: -12px;
    width: 4px;
    height: calc(100% + 24px);
}
.neon-right {
    top: -12px;
    right: -12px;
    left: auto; 
    width: 4px;
    height: calc(100% + 24px);
}

@keyframes neon-border-flicker-cyan { /* This keyframe can remain as cyan is aquatic */
  0%, 18%, 22%, 25%, 53%, 57%, 100% {
    box-shadow: 0 0 4px #00ffff, 0 0 8px #00ffff, 0 0 12px #00ffff, 0 0 16px #00ffff;
    background-color: #7fffff; /* Brighter cyan */
  }
  20%, 24%, 55% {
    box-shadow: 0 0 2px #00cccc, 0 0 4px #00cccc;
    background-color: #00aaaa; /* Dimmer cyan */
  }
}

/* Responsive adjustments */
@media (max-width: 700px) {
    body { padding: 10px; }
    #slot-machine { padding: 10px; }
    header h1 { font-size: 2.5em; }
    .symbol-slot { width: 60px; height: 60px; }
    #controls, #payout-table-container { max-width: none; }
    .control-panel { flex-direction: column; align-items: stretch;}
    .info-display { font-size: 0.8em; }
    .control-button { font-size: 1.2em; padding: 8px 15px; }
    #spin-button { font-size: 1.5em; padding: 12px 25px; }
    #payout-table th, #payout-table td { padding: 4px; font-size: 0.8em; } /* Further reduced for small screens */
    .symbol-cell-in-table img { width: 18px; height: 18px; } /* Adjusted for smaller payout table */
    #floating-win-amount {
        font-size: 3em; /* Responsive font size for floating win */
    }
}

@media (max-width: 450px) {
    header h1 { font-size: 2em; }
    .neon-text { font-size: 2.5em; } /* Make WIN text smaller */
    .symbol-slot { width: 45px; height: 45px; }
    #reels-container, #reels-area { padding: 5px; }
    #reels-container { gap: 5px; }
    .reel { gap: 5px; }
    .info-display { padding: 5px 8px; }
    .action-panel { flex-direction: column; gap: 10px; }
    #bet-controls {  width: 100%; justify-content: center; }
    #spin-button { width: 100%; }
    #payout-table th, #payout-table td { font-size: 0.7em; padding: 3px; } /* Further reduced */
    .symbol-cell-in-table img { width: 16px; height: 16px; } /* Further adjusted */
    #floating-win-amount {
        font-size: 2.2em; /* Further responsive font size */
    }
    #payline-overlay {
        top: 10px; /* (padding of reels-area + padding of reels-container) adjusted for smaller padding */
        left: 10px; /* (padding of reels-area + padding of reels-container) adjusted for smaller padding */
    }
}