/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #0a0a1a;
}

/* Main Game Container */
.game-container {
    width: 100%;
    height: 100vh;
    max-width: 430px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background-image: url('/static/images/game-main-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Game Header Section */
.game-header {
    width: 100%;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Top Row - Derash, Logo, Starting */
.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.derash-box {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(145deg, #1a5a3a, #0d3d28);
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 100, 0.3);
}

.derash-label {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

.derash-value {
    color: #00ff88;
    font-size: 14px;
    font-weight: 700;
}

.derash-icon {
    font-size: 14px;
}

.logo-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-main {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(180deg, #ffd700 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.starting-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(145deg, #6b21a8, #4c1d95);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.starting-label {
    color: #c4b5fd;
    font-size: 10px;
    font-weight: 500;
}

.starting-value {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
}

/* Stats Row */
.header-stats-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 8px;
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 8px 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

/* Game - Cyan */
.stat-item:nth-child(1) .stat-label {
    color: #00d4ff;
}

.stat-item:nth-child(1) .stat-value {
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Bet - Green */
.stat-item:nth-child(2) .stat-label {
    color: #00ff88;
}

.stat-item:nth-child(2) .stat-value {
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Active Game - Orange */
.stat-item:nth-child(3) .stat-label {
    color: #ff8c00;
}

.stat-item:nth-child(3) .stat-value {
    color: #ff8c00;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

/* Wallet - Pink */
.stat-item:nth-child(4) .stat-label {
    color: #ff69b4;
}

.stat-item:nth-child(4) .stat-value {
    color: #ff69b4;
    text-shadow: 0 0 10px rgba(255, 105, 180, 0.5);
}

/* Gift - Yellow/Gold */
.stat-item:nth-child(5) .stat-label {
    color: #ffd700;
}

.stat-item:nth-child(5) .stat-value {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.stat-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.wallet-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.deposit-link,
.withdraw-link {
    display: inline-block;
    font-size: 9px;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.deposit-link {
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.deposit-link:hover {
    background: #4CAF50;
    color: #fff;
}

.withdraw-link {
    color: #ff9800;
    border: 1px solid #ff9800;
}

.withdraw-link:hover {
    background: #ff9800;
    color: #fff;
}

/* Timer Animation */
.timer-value {
    font-family: 'Courier New', monospace;
}

.timer-value.warning {
    color: #ff8c00 !important;
    animation: timerPulse 0.5s ease-in-out infinite;
}

.timer-value.danger {
    color: #ef4444 !important;
    animation: timerPulse 0.3s ease-in-out infinite;
}

@keyframes timerPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Phase Colors */
.phase-select {
    color: #22c55e !important;
}

.phase-results {
    color: #ffd700 !important;
}

.phase-waiting {
    color: #3b82f6 !important;
}

/* Selection Disabled */
.number-cell.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Announcement Strip */
.announcement-strip {
    width: calc(100% - 30px);
    margin: 5px 15px;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 0;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.announcement-text {
    display: inline-block;
    white-space: nowrap;
    color: #ffd700;
    font-size: 13px;
    font-weight: 600;
    animation: scrollText 15s linear infinite;
    padding-left: 100%;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes scrollText {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.announcement-strip:hover .announcement-text {
    animation-play-state: paused;
}

/* Glowing Gift Icon */
.glow-gift {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    animation: glowPulse 1.5s ease-in-out infinite;
    z-index: 10;
    filter: drop-shadow(0 0 8px #ffd700);
}

@keyframes glowPulse {

    0%,
    100% {
        transform: translateY(-50%) scale(1);
        filter: drop-shadow(0 0 8px #ffd700);
    }

    50% {
        transform: translateY(-50%) scale(1.2);
        filter: drop-shadow(0 0 15px #ff6600) drop-shadow(0 0 25px #ffd700);
    }
}

/* Game Frame Content Area */
.game-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
    overflow: hidden;
    gap: 10px;
}

.game-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 10px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 215, 0, 0.5) transparent;
    max-height: calc(100vh - 250px);
}

/* Button Section */
.button-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 10px 15px;
    flex-shrink: 0;
}

.refresh-btn {
    background: rgba(0, 0, 0, 0.6);
    color: #ffd700;
    border: 2px solid rgba(255, 215, 0, 0.5);
    padding: 14px 50px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.refresh-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.refresh-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* BINGO Button */
.bingo-btn {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: white;
    border: 2px solid #28a745;
    padding: 14px 35px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.bingo-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #34ce57, #28a745);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.6);
}

.bingo-btn:disabled {
    background: linear-gradient(145deg, #6c757d, #495057);
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.bingo-btn.active {
    animation: bingoGlow 1s ease-in-out infinite;
}

@keyframes bingoGlow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(40, 167, 69, 0.8), 0 0 40px rgba(40, 167, 69, 0.4);
    }
}

/* Trophy Button */
.trophy-btn {
    background: linear-gradient(145deg, #ffd700, #ff8c00);
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: trophyGlow 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
}

.trophy-icon {
    width: 35px;
    height: 35px;
}

.trophy-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.6);
}

@keyframes trophyGlow {

    0%,
    100% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 140, 0, 0.5);
    }
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Content */
.modal-content {
    background: linear-gradient(145deg, #1a1a3a, #0d0d1a);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), transparent);
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.modal-header h2 {
    color: #ffd700;
    font-size: 20px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #ff4444;
}

.modal-body {
    padding: 15px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Leaderboard List */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-item.top-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), transparent);
    border-color: #ffd700;
}

.leaderboard-item.top-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.3), transparent);
    border-color: #c0c0c0;
}

.leaderboard-item.top-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.3), transparent);
    border-color: #cd7f32;
}

.rank {
    width: 35px;
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
}

.player-name {
    flex: 1;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
}

.player-score {
    color: #00ff88;
    font-size: 14px;
    font-weight: 700;
}

/* Custom Scrollbar for game-content */
.game-content::-webkit-scrollbar {
    width: 6px;
}

.game-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.game-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffd700, #ff8c00);
    border-radius: 3px;
}

/* Number Grid */
.number-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    width: 100%;
    padding: 5px;
}

.number-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2a2a4a, #1a1a3a);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.number-cell:hover {
    background: linear-gradient(145deg, #ffd700, #ff8c00);
    color: #000000;
    border-color: #ffd700;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.number-cell.selected {
    background: linear-gradient(145deg, #ff8c00, #ff6600);
    color: #ffffff;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 140, 0, 0.6);
}

.placeholder-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Scrollbar Styling */
.game-frame::-webkit-scrollbar {
    width: 4px;
}

.game-frame::-webkit-scrollbar-track {
    background: transparent;
}

.game-frame::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 2px;
}

/* Mobile Responsive */
@media screen and (max-width: 430px) {
    .game-container {
        max-width: 100%;
    }

    .logo-border {
        height: 60px;
    }

    .logo-text {
        font-size: 24px;
        letter-spacing: 3px;
    }
}

/* Bingo Card Popup */
.bingo-card-content {
    background-image: url('/static/images/game-second-screen-popup.webp');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    padding: 20px;
    width: 90%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2),
        0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease, cardGlow 2s ease-in-out infinite;
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.5);
}

@keyframes cardGlow {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.4),
            0 0 60px rgba(255, 215, 0, 0.2),
            0 10px 50px rgba(0, 0, 0, 0.5);
    }

    50% {
        box-shadow:
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.5),
            0 0 80px rgba(255, 215, 0, 0.3),
            0 10px 50px rgba(0, 0, 0, 0.5);
    }
}

/* Called Number Badge */
.called-number-badge {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 55px;
    background: linear-gradient(145deg, #ffd700, #ff8c00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    border: 3px solid #ffffff;
}

.called-number-badge span {
    color: #000000;
    font-size: 22px;
    font-weight: 800;
}

/* Bingo Card */
.bingo-card {
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid #d4a500;
    border-radius: 15px;
    padding: 10px;
    margin-top: 30px;
    width: 100%;
}

/* BINGO Header */
.bingo-header {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.bingo-letter {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    border-radius: 8px;
}

.b-letter {
    background: linear-gradient(145deg, #22c55e, #16a34a);
}

.i-letter {
    background: linear-gradient(145deg, #ef4444, #dc2626);
}

.n-letter {
    background: linear-gradient(145deg, #f59e0b, #d97706);
}

.g-letter {
    background: linear-gradient(145deg, #3b82f6, #2563eb);
}

.o-letter {
    background: linear-gradient(145deg, #ec4899, #db2777);
}

/* Bingo Grid */
.bingo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.bingo-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffd700, #e6b800);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #1a1a2e;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.bingo-cell:hover {
    background: linear-gradient(145deg, #ffe44d, #ffd700);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.bingo-cell.selected {
    background: linear-gradient(145deg, #ff8c00, #ff6600);
    border-color: #ffffff;
    color: #ffffff;
}

.bingo-cell.free-space {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    border-color: #ffffff;
    color: #ffffff;
    font-size: 24px;
}

/* Action Buttons */
.bingo-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.accept-btn {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    color: #ffffff;
    border: none;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

.cancel-btn {
    background: linear-gradient(145deg, #6b7280, #4b5563);
    color: #ffffff;
    border: none;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.4);
}

.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.6);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    max-width: 90%;
    text-align: center;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-success {
    border-color: #22c55e;
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9));
}

.toast-error {
    border-color: #ef4444;
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
}

.toast-info {
    border-color: #3b82f6;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.9));
}

.toast-message {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Start Demo Button */
.start-demo-btn {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    color: #ffffff;
    border: none;
    padding: 14px 25px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    text-transform: uppercase;
}

.start-demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

/* Called Number Highlight */
.number-cell.called {
    background: linear-gradient(145deg, #22c55e, #16a34a) !important;
    border-color: #22c55e !important;
    animation: pulse 0.5s ease;
}

.number-cell.matched {
    background: linear-gradient(145deg, #ffd700, #ff8c00) !important;
    border-color: #ffd700 !important;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Win Popup */
.win-popup-content {
    background-image: url('/static/images/win-popup.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    padding: 30px;
    padding-top: 280px;
    width: 90%;
    max-width: 350px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    animation: winBounce 0.5s ease;
    position: relative;
    overflow: hidden;
}

@keyframes winBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.win-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='10' cy='20' r='3' fill='%23ffd700'/%3E%3Ccircle cx='30' cy='10' r='2' fill='%23ff6600'/%3E%3Ccircle cx='50' cy='25' r='4' fill='%2322c55e'/%3E%3Ccircle cx='70' cy='15' r='3' fill='%23ec4899'/%3E%3Ccircle cx='90' cy='20' r='2' fill='%233b82f6'/%3E%3C/svg%3E");
    animation: confettiFall 2s linear infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.win-trophy {
    font-size: 80px;
    margin-bottom: 10px;
    animation: trophySpin 1s ease;
}

@keyframes trophySpin {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(360deg);
    }
}

.win-title {
    color: #ffd700;
    font-size: 42px;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 2px 2px 0 #ff8c00;
    margin: 0;
}

.win-subtitle {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin: 10px 0 20px;
}

.win-amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px 40px;
    border-radius: 15px;
    border: 2px solid #ffd700;
    margin-bottom: 20px;
}

.win-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.win-value {
    color: #22c55e;
    font-size: 32px;
    font-weight: 800;
    text-shadow: 0 0 15px rgba(34, 197, 94, 0.5);
}

.claim-btn {
    background: linear-gradient(145deg, #22c55e, #16a34a);
    color: #ffffff;
    border: none;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.5);
}

.claim-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.7);
}

/* Loss Popup */
.loss-popup-content {
    background-image: url('/static/images/user-loss-pop-up.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    padding: 30px;
    padding-top: 280px;
    width: 90%;
    max-width: 350px;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    animation: slideUp 0.4s ease;
}

.loss-icon {
    font-size: 70px;
    margin-bottom: 10px;
}

.loss-title {
    color: #ef4444;
    font-size: 36px;
    font-weight: 800;
    margin: 0;
}

.loss-subtitle {
    color: #ffffff;
    font-size: 20px;
    font-weight: 500;
    margin: 10px 0;
}

.loss-message {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 25px;
}

.play-again-btn {
    background: linear-gradient(145deg, #6b7280, #4b5563);
    color: #ffffff;
    border: none;
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-again-btn:hover {
    background: linear-gradient(145deg, #ffd700, #ff8c00);
    transform: scale(1.05);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    border-color: #22c55e;
    background: rgba(6, 78, 59, 0.95);
}

.toast-error {
    border-color: #ef4444;
    background: rgba(127, 29, 29, 0.95);
}

.toast-info {
    border-color: #3b82f6;
    background: rgba(30, 58, 138, 0.95);
}

/* Watermark Inline */
.watermark-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    margin-bottom: 10px;
}

.watermark-inline span {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.watermark-inline .chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(145deg, #0088cc, #006699);
    color: white;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.4);
}

.watermark-inline .chat-btn:hover {
    background: linear-gradient(145deg, #00a0e6, #0088cc);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0, 136, 204, 0.6);
}