@import url('https://fonts.googleapis.com/css2?family=Genos:ital,wght@0,100..900;1,100..900&family=Rubik+Moonrocks&display=swap');

/* Ocean Theme Variables - Matching Main Page */
:root {
    /* Ocean Theme Colors */
    --light-cream: rgb(253, 255, 226);
    --ocean-blue: rgb(131, 180, 255);
    --deep-blue: rgb(90, 114, 160);
    --midnight: rgb(26, 33, 48);

    /* Typography */
    --primary-font: 'Genos', sans-serif;
    --accent-font: 'Rubik Moonrocks', cursive;

    /* Effects */
    --shadow-light: 0 4px 6px rgba(26, 33, 48, 0.1);
    --shadow-medium: 0 8px 25px rgba(26, 33, 48, 0.15);
    --shadow-heavy: 0 15px 35px rgba(26, 33, 48, 0.2);
    --shadow-glow: 0 0 20px rgba(131, 180, 255, 0.4);

    --border-radius: 12px;
    --transition: all 0.3s ease;
    --spacing: 20px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Smooth loading state */
html.loading body {
    opacity: 0;
}

html:not(.loading) body {
    opacity: 1;
}

body {
    font-family: var(--primary-font);
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--ocean-blue) 50%, var(--deep-blue) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--midnight);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    transition: opacity 0.4s ease-in-out;
    overflow-x: hidden;
}

/* Game Container */
.game-container {
    background: rgba(253, 255, 226, 0.95);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius);
    padding: var(--spacing);
    box-shadow: var(--shadow-heavy);
    max-width: 800px;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
    min-height: 600px;
    position: relative;
    border: 2px solid rgba(131, 180, 255, 0.3);
}

/* Fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Removed loading animations for better performance */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing);
    padding: var(--spacing);
    background: linear-gradient(135deg, rgba(131, 180, 255, 0.2), rgba(90, 114, 160, 0.1));
    border-radius: var(--border-radius);
    border: 1px solid rgba(131, 180, 255, 0.3);
    box-shadow: var(--shadow-light);
}

.balance {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--deep-blue);
    font-family: var(--accent-font);
    text-shadow: 1px 1px 2px rgba(26, 33, 48, 0.1);
}

.amount {
    color: var(--ocean-blue);
    text-shadow: 0 0 10px rgba(131, 180, 255, 0.3);
    font-weight: 900;
}

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

.bet-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bet-form label {
    font-weight: 600;
    color: var(--deep-blue);
    font-size: 1rem;
    font-family: var(--primary-font);
}

.bet-form input {
    padding: 8px 12px;
    border: 2px solid var(--ocean-blue);
    border-radius: 8px;
    background: var(--light-cream);
    color: var(--midnight);
    font-size: 1rem;
    font-family: var(--primary-font);
    font-weight: 600;
    width: 80px;
    text-align: center;
    transition: var(--transition);
}

.bet-form input:focus {
    outline: none;
    border-color: var(--deep-blue);
    box-shadow: 0 0 10px rgba(131, 180, 255, 0.3);
    background: rgba(253, 255, 226, 0.9);
}

/* Slot Machine */
.slot-machine {
    margin: var(--spacing) 0;
    padding: var(--spacing);
    background: linear-gradient(135deg, rgba(131, 180, 255, 0.1), rgba(90, 114, 160, 0.05));
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(131, 180, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/seaStar.webp') repeat;
    opacity: 0.05;
    z-index: 0;
}

.reels-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    perspective: 1000px;
    position: relative;
    z-index: 1;
}

.reel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(253, 255, 226, 0.8);
    backdrop-filter: blur(5px);
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 2px solid rgba(131, 180, 255, 0.3);
    transition: var(--transition);
}

.reel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
}

.symbol {
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--light-cream);
    border-radius: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(131, 180, 255, 0.2);
    box-shadow: var(--shadow-light);
}

.symbol:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.symbol img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: var(--transition);
    border-radius: 6px;
}

.symbol.winning {
    background: linear-gradient(45deg, var(--light-cream), rgba(131, 180, 255, 0.3));
    border-color: var(--ocean-blue);
    box-shadow: 0 0 25px rgba(131, 180, 255, 0.6);
    animation: winningPulse 1.5s infinite;
    transform: scale(1.1);
}

.symbol.winning img {
    transform: scale(1.1);
    filter: brightness(1.2) saturate(1.3);
}

@keyframes winningPulse {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(131, 180, 255, 0.6);
        border-color: var(--ocean-blue);
    }

    50% {
        box-shadow: 0 0 35px rgba(131, 180, 255, 0.9);
        border-color: var(--deep-blue);
    }
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing);
    margin: var(--spacing) 0;
    min-height: 60px;
    align-items: center;
}

.spin-form,
.reset-form {
    display: inline;
}

/* Buttons */
button {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--primary-font);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 50px;
    min-width: 120px;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(2px);
    box-shadow: var(--shadow-light);
    transition: transform 0.1s ease;
}

button[name="spin"] {
    background: linear-gradient(45deg, var(--ocean-blue), var(--deep-blue));
    color: var(--light-cream);
    font-size: 1.2rem;
    padding: 18px 36px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(26, 33, 48, 0.3);
}

button[name="spin"]:hover {
    background: linear-gradient(45deg, var(--deep-blue), var(--midnight));
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

button[name="spin"]:disabled {
    background: linear-gradient(45deg, #666, #999);
    color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-light);
    opacity: 0.6;
}

button[name="change_bet"] {
    background: linear-gradient(45deg, var(--deep-blue), var(--ocean-blue));
    color: var(--light-cream);
    font-size: 0.9rem;
    padding: 12px 24px;
}

button[name="change_bet"]:hover {
    background: linear-gradient(45deg, var(--midnight), var(--deep-blue));
    transform: translateY(-2px);
}

button[name="reset"] {
    background: linear-gradient(45deg, var(--midnight), var(--deep-blue));
    color: var(--light-cream);
    border: 2px solid var(--ocean-blue);
}

button[name="reset"]:hover {
    background: linear-gradient(45deg, var(--deep-blue), var(--ocean-blue));
    border-color: var(--light-cream);
    transform: translateY(-2px);
}

/* Messages */
.win-message {
    text-align: center;
    margin: var(--spacing) 0;
    padding: var(--spacing);
    background: linear-gradient(135deg, rgba(131, 180, 255, 0.2), rgba(253, 255, 226, 0.8));
    border-radius: var(--border-radius);
    animation: winGlow 2s infinite, slideInDown 0.5s ease-out;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ocean-blue);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes winGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(131, 180, 255, 0.5);
        border-color: var(--ocean-blue);
    }

    50% {
        box-shadow: 0 0 30px rgba(131, 180, 255, 0.8);
        border-color: var(--deep-blue);
    }
}

.win-message h2 {
    color: var(--deep-blue);
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-family: var(--accent-font);
    text-shadow: 1px 1px 2px rgba(26, 33, 48, 0.1);
    margin: 0;
}

.no-money-message {
    text-align: center;
    margin: var(--spacing) 0;
    padding: 15px;
    background: linear-gradient(135deg, rgba(26, 33, 48, 0.1), rgba(90, 114, 160, 0.1));
    border-radius: var(--border-radius);
    animation: slideInDown 0.5s ease-out;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--deep-blue);
    box-shadow: var(--shadow-light);
}

.no-money-message h3 {
    color: var(--midnight);
    font-size: 1.1rem;
    font-family: var(--primary-font);
    font-weight: 600;
}

/* Rules Section */
.rules {
    margin-top: var(--spacing);
    padding: var(--spacing);
    background: linear-gradient(135deg, rgba(131, 180, 255, 0.1), rgba(253, 255, 226, 0.8));
    border-radius: var(--border-radius);
    border: 1px solid rgba(131, 180, 255, 0.3);
    box-shadow: var(--shadow-light);
}

.rules h3 {
    color: var(--deep-blue);
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-family: var(--accent-font);
    text-align: center;
}

.rules ul {
    list-style: none;
    padding-left: 0;
}

.rules li {
    margin: 10px 0;
    padding: 8px 0;
    color: var(--midnight);
    position: relative;
    padding-left: 25px;
    font-weight: 500;
    transition: var(--transition);
}

.rules li:hover {
    color: var(--deep-blue);
    transform: translateX(5px);
}

.rules li:before {
    content: "🌊";
    position: absolute;
    left: 0;
    top: 8px;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .game-container {
        max-width: 90%;
        padding: var(--spacing);
    }

    .symbol {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 768px) {
    .game-container {
        margin: 10px;
        padding: 15px;
        max-width: calc(100% - 20px);
        min-height: 500px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }

    .balance {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .bet-controls {
        justify-content: center;
    }

    .bet-form {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .bet-form input {
        width: 70px;
    }

    .slot-machine {
        padding: 15px;
        min-height: 280px;
    }

    .reels-container {
        gap: 10px;
    }

    .reel {
        padding: 12px;
        gap: 6px;
    }

    .symbol {
        width: 60px;
        height: 60px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    button {
        width: 100%;
        max-width: 280px;
        padding: 12px 24px;
        font-size: 1rem;
    }

    button[name="spin"] {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .win-message h2 {
        font-size: 1.3rem;
    }

    .rules {
        padding: 15px;
    }

    .rules h3 {
        font-size: 1.2rem;
    }

    .rules li {
        font-size: 0.9rem;
        padding-left: 20px;
    }
}

@media (max-width: 480px) {
    .game-container {
        margin: 5px;
        padding: 12px;
    }

    .header {
        padding: 12px;
    }

    .balance {
        font-size: 1rem;
    }

    .bet-form input {
        width: 60px;
        padding: 6px 8px;
        font-size: 0.9rem;
    }

    .slot-machine {
        padding: 10px;
        min-height: 240px;
    }

    .reel {
        padding: 8px;
        gap: 4px;
    }

    .symbol {
        width: 50px;
        height: 50px;
        border-radius: 8px;
    }

    button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    button[name="spin"] {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .win-message {
        padding: 12px;
        margin: 15px 0;
    }

    .win-message h2 {
        font-size: 1.1rem;
    }

    .rules {
        margin-top: 15px;
        padding: 12px;
    }

    .rules li {
        font-size: 0.85rem;
        margin: 8px 0;
        padding-left: 18px;
    }
}

@media (max-width: 320px) {
    .game-container {
        margin: 3px;
        padding: 8px;
    }

    .reels-container {
        gap: 6px;
    }

    .symbol {
        width: 45px;
        height: 45px;
    }

    .balance {
        font-size: 0.9rem;
    }

    .bet-form {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .bet-form input {
        width: 50px;
    }

    button {
        font-size: 0.8rem;
        padding: 8px 16px;
        min-width: 100px;
    }

    .win-message h2 {
        font-size: 1rem;
    }

    .rules li {
        font-size: 0.8rem;
        padding-left: 16px;
    }
}

/* Landscape Mobile Orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .game-container {
        padding: 10px;
        max-height: 95vh;
        overflow-y: auto;
    }

    .header {
        padding: 8px;
    }

    .slot-machine {
        margin: 10px 0;
        padding: 10px;
    }

    .rules {
        margin-top: 10px;
        padding: 10px;
    }

    .symbol {
        width: 50px;
        height: 50px;
    }

    button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Ocean Wave Animation */
@keyframes wave {

    0%,
    100% {
        transform: translateX(0) translateY(0);
    }

    25% {
        transform: translateX(-5px) translateY(-2px);
    }

    50% {
        transform: translateX(0) translateY(-4px);
    }

    75% {
        transform: translateX(5px) translateY(-2px);
    }
}



/* Removed floating animations for better performance */



/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .game-container {
        background: white;
        box-shadow: none;
        border: 1px solid black;
    }

    button {
        border: 1px solid black;
        background: white;
        color: black;
    }
}