/* Slot Machine Game Styles */
.game-container {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at top, rgba(153, 69, 255, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(20, 241, 149, 0.15) 0%, transparent 50%),
        linear-gradient(180deg, #0d0d15 0%, #1a1a2e 50%, #0d0d15 100%);
    position: relative;
    overflow: visible;
}

/* Animated background stars */
.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(153, 69, 255, 0.4), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(20, 241, 149, 0.5), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 160px 30px, rgba(153, 69, 255, 0.3), transparent);
    background-size: 200px 100px;
    animation: twinkle 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.game-header {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.game-header h3 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    font-weight: 800;
    letter-spacing: 1px;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.game-header p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

/* Slot Machine */
.slot-machine {
    background:
        linear-gradient(145deg, #2d2d4a 0%, #1a1a2e 50%, #0d0d15 100%);
    border-radius: 24px;
    padding: 2rem;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(153, 69, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
    border: 3px solid transparent;
    background-clip: padding-box;
    position: relative;
    z-index: 1;
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    border-radius: 26px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.reels-container {
    display: flex;
    gap: 12px;
    background:
        linear-gradient(180deg, #0a0a12 0%, #050508 50%, #0a0a12 100%);
    padding: 20px;
    border-radius: 18px;
    box-shadow:
        inset 0 8px 25px rgba(0, 0, 0, 0.8),
        inset 0 -4px 15px rgba(255, 255, 255, 0.02),
        0 0 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

/* Scanline effect */
.reels-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    border-radius: 18px;
}

.reel {
    width: 90px;
    height: 90px;
    background:
        radial-gradient(ellipse at center, #1e1e32 0%, #0a0a15 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(153, 69, 255, 0.3);
    position: relative;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(153, 69, 255, 0.1);
    transition: all 0.3s ease;
}

.reel:hover {
    border-color: rgba(153, 69, 255, 0.5);
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(153, 69, 255, 0.2);
}

.reel::before,
.reel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 25px;
    pointer-events: none;
    z-index: 2;
}

.reel::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
}

.reel::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.symbol {
    font-size: 3rem;
    transition: all 0.15s ease-out;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    z-index: 1;
}

.reel.spinning .symbol {
    animation: spinSymbol 0.08s linear infinite;
    filter: blur(1px);
}

.reel.winning {
    animation: winningReel 0.5s ease-in-out 3;
    border-color: var(--secondary-color);
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(20, 241, 149, 0.5);
}

.reel.winning .symbol {
    animation: bounceSymbol 0.3s ease-in-out infinite;
}

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

@keyframes winningReel {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounceSymbol {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Spin Button */
.spin-btn {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.2rem 2.5rem;
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    background:
        linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    color: #1a1a2e;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 30px rgba(255, 165, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

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

.spin-btn:hover:not(:disabled)::before {
    left: 100%;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 12px 40px rgba(255, 165, 0, 0.5),
        0 0 60px rgba(255, 215, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.spin-btn:active:not(:disabled) {
    transform: translateY(-2px) scale(0.98);
}

.spin-btn:disabled {
    background: linear-gradient(135deg, #4a4a5a 0%, #3a3a4a 100%);
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.spin-btn.spinning {
    animation: spinningBtn 0.8s ease infinite;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

@keyframes spinningBtn {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 5px 20px rgba(153, 69, 255, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 30px rgba(20, 241, 149, 0.5);
    }
}

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background:
        linear-gradient(135deg, rgba(153, 69, 255, 0.1) 0%, rgba(20, 241, 149, 0.1) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.stat {
    text-align: center;
    padding: 0.5rem 1rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.25rem;
}

.stat-value {
    background: linear-gradient(135deg, var(--secondary-color), #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.1rem;
    text-shadow: 0 0 20px rgba(20, 241, 149, 0.3);
}

/* Result Display */
.result-display {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    border-radius: 16px;
    text-align: center;
    font-weight: 600;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-display.win {
    background:
        linear-gradient(135deg, rgba(20, 241, 149, 0.25), rgba(0, 255, 136, 0.15));
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    animation: winPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 0 40px rgba(20, 241, 149, 0.3),
        inset 0 0 30px rgba(20, 241, 149, 0.1);
}

.result-display.lose {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
}

.result-display.big-win {
    background:
        linear-gradient(135deg, rgba(255, 100, 50, 0.3), rgba(255, 165, 0, 0.25));
    border: 2px solid #ff6b35;
    color: #ff8c42;
    animation: bigWinPulse 0.5s ease 3;
    box-shadow:
        0 0 50px rgba(255, 100, 50, 0.4),
        0 0 80px rgba(255, 165, 0, 0.2),
        inset 0 0 30px rgba(255, 100, 50, 0.15);
}

@keyframes bigWinPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.result-display.jackpot {
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 165, 0, 0.25));
    border: 3px solid gold;
    color: #FFD700;
    animation: jackpotPulse 0.4s ease 4;
    box-shadow:
        0 0 60px rgba(255, 215, 0, 0.5),
        0 0 100px rgba(255, 165, 0, 0.3),
        inset 0 0 40px rgba(255, 215, 0, 0.2);
}

.result-display.jackpot::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(255, 215, 0, 0.3),
        transparent,
        rgba(255, 215, 0, 0.3),
        transparent
    );
    animation: jackpotSpin 2s linear infinite;
    z-index: -1;
}

@keyframes jackpotSpin {
    100% { transform: rotate(360deg); }
}

@keyframes winPulse {
    0% { transform: scale(0.95); opacity: 0; }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes jackpotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.result-display .reward-amount {
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 0 20px currentColor;
    letter-spacing: 1px;
}

.result-display .tx-link {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.result-display .tx-link a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

.result-display .tx-link a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Connect Wallet Banner */
.connect-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(153, 69, 255, 0.95), rgba(20, 241, 149, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0 0 20px 20px;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 30px rgba(153, 69, 255, 0.3);
}

.connect-overlay p {
    color: white;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.connect-overlay .connect-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.connect-overlay .connect-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Wallet Button in Nav */
.wallet-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(153, 69, 255, 0.2);
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-btn:hover {
    background: rgba(153, 69, 255, 0.3);
}

.wallet-btn.connected {
    background: rgba(20, 241, 149, 0.2);
    border-color: var(--secondary-color);
}

.wallet-btn .wallet-icon {
    width: 20px;
    height: 20px;
}

.wallet-btn .wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

/* Paytable */
.paytable {
    margin-top: 1.5rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

.paytable-toggle {
    background: linear-gradient(135deg, rgba(153, 69, 255, 0.15), rgba(20, 241, 149, 0.1));
    border: 1px solid rgba(153, 69, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.paytable-toggle:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(153, 69, 255, 0.25), rgba(20, 241, 149, 0.15));
    box-shadow: 0 0 20px rgba(153, 69, 255, 0.2);
}

.paytable-content {
    display: none;
    margin-top: 0.75rem;
    padding: 1.25rem;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(20, 20, 40, 0.5));
    border-radius: 14px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.paytable-content.show {
    display: block;
    animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.paytable-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.paytable-row:hover {
    background: rgba(153, 69, 255, 0.1);
}

.paytable-row:last-child {
    border-bottom: none;
}

.paytable-symbols {
    display: flex;
    gap: 0.35rem;
    font-size: 1.1rem;
}

.paytable-reward {
    background: linear-gradient(135deg, var(--secondary-color), #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Daily Limit Warning */
.daily-limit-warning {
    background: rgba(255, 165, 0, 0.2);
    border: 1px solid orange;
    color: orange;
    padding: 0.75rem;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Pending Rewards */
.pending-rewards {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    border-radius: 16px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    position: relative;
    z-index: 1;
    text-align: center;
    animation: pendingPulse 2s ease-in-out infinite;
}

@keyframes pendingPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
    }
}

.pending-amount {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.pending-label {
    color: rgba(255, 255, 255, 0.7);
    margin-right: 0.5rem;
}

.pending-value {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.4rem;
}

.collect-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    color: #1a1a2e;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 6px 20px rgba(255, 165, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.collect-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 10px 30px rgba(255, 165, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.collect-btn:active {
    transform: translateY(0) scale(0.98);
}

.collect-btn:disabled {
    background: linear-gradient(135deg, #4a4a5a 0%, #3a3a4a 100%);
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.collect-btn.collecting {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    animation: collectingPulse 0.6s ease infinite;
}

@keyframes collectingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Responsive */
@media (max-width: 480px) {
    .game-container {
        padding: 1rem;
    }

    .slot-machine {
        padding: 1.25rem;
    }

    .reels-container {
        padding: 15px;
        gap: 8px;
    }

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

    .symbol {
        font-size: 2.2rem;
    }

    .spin-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .game-stats {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .stat {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .stat:last-child {
        border-bottom: none;
    }

    .game-header h3 {
        font-size: 1.5rem;
    }

    .result-display .reward-amount {
        font-size: 1.5rem;
    }
}
