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

body {
    font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: 
        radial-gradient(circle at 20% 80%, rgba(80, 79, 158, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(200, 79, 158, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(80, 179, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a1a 0%, #141428 50%, #0f1a32 100%);
    background-attachment: fixed;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    width: 95%;
    max-width: 1200px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #fff8dc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.stats {
    display: flex;
    justify-content: space-around;
    font-size: 1.2em;
    gap: 20px;
}

.balance, .jackpot {
    padding: 16px 28px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-weight: 600;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

/* Passive Income Animation */
.passive-income-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.falling-coin {
    position: absolute;
    top: -50px;
    font-size: 3em;
    animation: coinFall 2s ease-in forwards;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

@keyframes coinFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(720deg);
        opacity: 0.3;
    }
}

.passive-income-message {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.6);
    animation: incomeMessage 2s ease-out forwards;
}

/* Compound Interest Animation */
.compound-interest-container {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
}

.compound-interest-text {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.3em;
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.6);
    animation: compoundMessage 2.5s ease-out forwards;
}

@keyframes compoundMessage {
    0% {
        transform: scale(0.5) rotate(-10deg);
        opacity: 0;
    }
    20% {
        transform: scale(1.1) rotate(5deg);
        opacity: 1;
    }
    40% {
        transform: scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
    }
}

@keyframes incomeMessage {
    0% {
        transform: translateX(-50%) translateY(-20px) scale(0.8);
        opacity: 0;
    }
    20% {
        transform: translateX(-50%) translateY(0) scale(1.1);
        opacity: 1;
    }
    40% {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 0;
    }
}

.game-section {
    display: none;
    min-height: 400px;
}

.game-section.active {
    display: block;
}

.betting-area {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

/* Insurance indicator */
.insurance-indicator {
    position: absolute;
    top: -40px;
    right: 20px;
    background: rgba(46, 204, 113, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
    padding: 12px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    display: none;
    box-shadow: 
        0 4px 16px rgba(46, 204, 113, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: insurancePulse 2s ease-in-out infinite;
}

@keyframes insurancePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 
            0 4px 16px rgba(46, 204, 113, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 
            0 6px 24px rgba(46, 204, 113, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

.insurance-indicator.active {
    display: block;
}

.insurance-indicator::before {
    content: "🛡️ ";
}

#bet-amount {
    padding: 14px 20px;
    font-size: 1.1em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    margin: 0 16px;
    width: 120px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#bet-amount:focus {
    outline: none;
    border-color: rgba(52, 152, 219, 0.4);
    box-shadow: 
        0 4px 20px rgba(52, 152, 219, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn {
    padding: 14px 28px;
    font-size: 1.1em;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.btn.primary {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.3);
    color: #3498db;
}

.btn.primary:hover {
    background: rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.4);
    color: #fff;
}

.btn.secondary {
    background: rgba(149, 165, 166, 0.2);
    border-color: rgba(149, 165, 166, 0.3);
    color: #95a5a6;
}

.btn.secondary:hover {
    background: rgba(149, 165, 166, 0.3);
    border-color: rgba(149, 165, 166, 0.4);
    color: #fff;
}

.btn.gold {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    font-weight: 700;
}

.btn.gold:hover {
    background: rgba(255, 215, 0, 0.25);
    border-color: rgba(255, 215, 0, 0.4);
    color: #fff;
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn.high {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.btn.high:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: rgba(231, 76, 60, 0.4);
    color: #fff;
}

.btn.low {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.btn.low:hover {
    background: rgba(46, 204, 113, 0.3);
    border-color: rgba(46, 204, 113, 0.4);
    color: #fff;
}

/* Mulligan button */
.btn.mulligan {
    background: rgba(155, 89, 182, 0.2);
    border-color: rgba(155, 89, 182, 0.3);
    color: #9b59b6;
}

.btn.mulligan:hover {
    background: rgba(155, 89, 182, 0.3);
    border-color: rgba(155, 89, 182, 0.4);
    color: #fff;
}

.cards-area {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 50px 0;
    flex-wrap: wrap;
    min-height: 180px;
    position: relative;
    padding: 0 20px;
}

/* Lucky charm indicator */
.lucky-charm-indicator {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    display: none;
    box-shadow: 
        0 4px 16px rgba(255, 215, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: luckyFloat 3s ease-in-out infinite;
}

/* Joker's Wild indicator */
.jokers-wild-indicator {
    position: absolute;
    top: -90px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(231, 76, 60, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    display: none;
    box-shadow: 
        0 4px 16px rgba(231, 76, 60, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: jokersFloat 3s ease-in-out infinite;
}

.jokers-wild-indicator.active {
    display: block;
}

.jokers-wild-indicator::before {
    content: "🃏 ";
}

/* Mulligan indicator */
.mulligan-indicator {
    position: absolute;
    top: -50px;
    right: 20px;
    background: rgba(155, 89, 182, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(155, 89, 182, 0.3);
    color: #9b59b6;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    display: none;
    box-shadow: 
        0 4px 16px rgba(155, 89, 182, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.mulligan-indicator.active {
    display: block;
}

@keyframes luckyFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
    }
}

@keyframes jokersFloat {
    0%, 100% {
        transform: translateX(-50%) translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateX(-50%) translateY(-8px) rotate(3deg);
    }
}

.lucky-charm-indicator.active {
    display: block;
}

.lucky-charm-indicator::before {
    content: "🍀 ";
}

.card {
    width: 110px;
    height: 154px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform-style: preserve-3d;
}

/* Golden cards when lucky charm is active */
.card.lucky {
    background: rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 215, 0, 0.4);
    box-shadow: 
        0 8px 32px rgba(255, 215, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.card.lucky::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.card.lucky .rank,
.card.lucky .suit {
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.card.lucky.red {
    color: #dc143c;
}

.card.lucky.black {
    color: #1a1a1a;
}

/* Wild card styling */
.card.wild {
    background: rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 215, 0, 0.6);
    color: #ffd700;
    font-weight: 700;
    box-shadow: 
        0 8px 32px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: wildGlow 2s ease-in-out infinite;
}

/* Joker wild card styling */
.card.joker-wild {
    background: rgba(231, 76, 60, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 2px solid rgba(231, 76, 60, 0.4);
    position: relative;
    overflow: hidden;
}

.card.joker-wild::after {
    content: "🃏";
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.5em;
    opacity: 0.8;
}

@keyframes wildGlow {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(255, 215, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 8px 40px rgba(255, 215, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

/* Mulligan animation */
@keyframes mulliganSwirl {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotate(720deg) scale(0);
        opacity: 0;
    }
}

/* Card dealing animation */
@keyframes dealCard {
    0% {
        transform: translateY(-200px) translateX(200px) rotateY(180deg) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translateY(-50px) translateX(100px) rotateY(90deg) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) translateX(0) rotateY(0) scale(1);
        opacity: 1;
    }
}

/* Card discard animation */
@keyframes discardCard {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(200px) scale(0.5) rotate(720deg);
        opacity: 0;
    }
}

/* New card animation */
@keyframes newCard {
    0% {
        transform: translateY(-200px) scale(0.5) rotateX(180deg);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1) rotateX(0deg);
        opacity: 1;
    }
}

.card.dealing {
    animation: dealCard 0.6s ease-out forwards;
}

.card.discarding {
    animation: discardCard 0.5s ease-out forwards;
}

.card.new-card {
    animation: newCard 0.6s ease-out forwards;
}

.card.selected {
    transform: translateY(-24px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 215, 0, 0.6);
}

.card.back {
    background: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.card .suit {
    font-size: 1.5em;
}

.card.red {
    color: #e74c3c;
}

.card.black {
    color: #2c3e50;
}

.result-area {
    text-align: center;
    margin-top: 40px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#hand-result {
    font-size: 2.2em;
    font-weight: 800;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeInScale 0.5s ease-out forwards;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

#winnings {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.9);
}

.double-stats {
    text-align: center;
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 32px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.double-cards {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin: 40px 0;
    position: relative;
}

.card-slot {
    text-align: center;
}

.card-slot p {
    margin-top: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* Probability display for Double or Nothing Master */
.probability-display {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 24px;
    font-size: 0.9em;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.prob-item {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.prob-item.high {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.3);
    color: #ff6b6b;
}

.prob-item.low {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.3);
    color: #51cf66;
}

.prob-item.tie {
    background: rgba(241, 196, 15, 0.2);
    border-color: rgba(241, 196, 15, 0.3);
    color: #ffd43b;
}

.trash-area {
    position: relative;
    height: 320px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 16px;
    margin: 24px 0;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.trash-stats {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.9);
}

@keyframes trashSpawn {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

@keyframes trashFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.trash-item {
    position: absolute;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    transition: all 0.3s ease;
    animation: trashSpawn 0.5s ease-out, trashFloat 2s ease-in-out infinite;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Rare coin styling */
.trash-item.rare-coin {
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ffd700);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
    animation: trashSpawn 0.5s ease-out, rareCoinPulse 1s ease-in-out infinite;
    font-size: 2.2em;
}

@keyframes rareCoinPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.15) rotate(10deg);
        box-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.6);
    }
}

.coin-bonus-text {
    position: absolute;
    color: #ffd700;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: bonusFloat 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes bonusFloat {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 0;
    }
    20% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

.trash-item:hover {
    transform: scale(1.3) rotate(10deg);
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.5);
}

.trash-item.rare-coin:hover {
    transform: scale(1.4) rotate(15deg);
    box-shadow: 0 0 40px rgba(255, 215, 0, 1);
}

@keyframes collectTrash {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2) rotate(360deg);
        opacity: 0;
    }
}

.trash-item.collecting {
    animation: collectTrash 0.3s ease-out forwards;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.shop-item {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 28px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.shop-item:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.shop-item h3 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 1.3em;
}

.shop-item p {
    margin-bottom: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
}

.price {
    font-weight: 700;
    color: #3498db;
    font-size: 1.1em;
}

.game-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}

.nav-btn {
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 1.1em;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

.nav-btn:hover::before {
    left: 100%;
}

.nav-btn:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.active-powerups {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 16px;
    max-width: 280px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 100;
}

.active-powerups h4 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    font-weight: 700;
}

#powerup-list {
    font-size: 0.9em;
}

.powerup-item {
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-weight: 500;
}

/* Achievement notification */
.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 215, 0, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    padding: 28px 40px;
    border-radius: 20px;
    font-size: 1.3em;
    font-weight: 700;
    box-shadow: 
        0 20px 60px rgba(255, 215, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: achievementPop 4s ease-out forwards;
    z-index: 2000;
    max-width: 350px;
    text-align: center;
}

@keyframes achievementPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
        opacity: 0;
    }
    15% {
        transform: translate(-50%, -50%) scale(1.15) rotate(2deg);
        opacity: 1;
    }
    25% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    85% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .game-container {
        padding: 24px;
        border-radius: 20px;
        width: 98%;
    }
    
    h1 {
        font-size: 2.2em;
    }
    
    .stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .cards-area {
        gap: 16px;
        padding: 0 10px;
        margin: 40px 0;
    }
    
    .card {
        width: 85px;
        height: 119px;
        font-size: 1.5em;
    }
    
    .shop-items {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .shop-item {
        padding: 20px;
    }
    
    .game-nav {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-btn {
        padding: 14px 24px;
    }
    
    .active-powerups {
        position: static;
        margin-top: 24px;
        max-width: 100%;
    }
    
    .probability-display {
        flex-direction: column;
        gap: 10px;
        bottom: -140px;
        font-size: 0.8em;
    }
    
    .double-cards {
        gap: 24px;
        flex-direction: column;
        align-items: center;
    }
    
    .betting-area label {
        display: block;
        margin-bottom: 12px;
    }
    
    #bet-amount {
        margin: 0;
        width: 140px;
    }
}
