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

body {
    font-family: Inter, system-ui, -apple-system, sans-serif;
    background: linear-gradient(to bottom right, #eef2ff, #fce7f3);
    min-height: 100vh;
    color: #1f2937;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 80px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.tagline {
    color: #6b7280;
}

.winnings-display {
    font-size: 1rem;
    color: #059669;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-card.payout {
    padding: 1rem 2rem;
    flex-direction: column;
    gap: 0.5rem;
}

.payout-amount {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #059669;
}

.payout-amount.jackpot {
    color: #d97706;
    animation: pulse 2s infinite;
}

.jackpot-text {
    color: #dc2626;
    font-weight: bold;
    font-size: 1.125rem;
    animation: pulse 2s infinite;
}

.stat-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.stat-value {
    font-weight: bold;
    font-size: 1.5rem;
    color: #1f2937;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 0.75rem;
    background: white;
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #8b5cf6, #ec4899);
    width: 0%;
    transition: width 0.5s ease;
}

/* Main Game Area */
.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Card */
.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card {
    width: 8rem;
    height: 11rem;
    border-radius: 0.75rem;
    border: 2px solid;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.card.face-down {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: #60a5fa;
    color: white;
    opacity: 0.5;
}

.card.face-down:hover {
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    transform: scale(1.05);
}

.card.face-up {
    background: white;
    border-color: #d1d5db;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card.face-up:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card.red {
    color: #dc2626;
}

.card.black {
    color: #1f2937;
}

.card.fallback {
    border-color: #ef4444 !important;
    animation: pulse-border 2s infinite;
}

.card-rank {
    font-size: 1.125rem;
    font-weight: bold;
}

.card-suit {
    font-size: 1.25rem;
}

.card-center {
    font-size: 1.5rem;
    text-align: center;
}

.card-bottom {
    transform: rotate(180deg);
    text-align: right;
}

.card-info {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-family: monospace;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(to right, #60a5fa, #a855f7);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #6b7280;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #9ca3af;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Milestones Section */
.milestones-section {
    width: 100%;
    max-width: 32rem;
}

.white-space {
    padding-bottom: 10px;
    font-size: 1.25rem;
}

.milestones-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.milestones-toggle:hover {
    color: #6b7280;
}

.milestones-grid {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.milestones-grid.expanded {
    display: grid;
}

.milestone-card {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.milestone-card.incomplete {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #6b7280;
}

.milestone-card.complete {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.milestone-points {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.milestone-check {
    color: #16a34a;
}

/* Banner */
.banner {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: linear-gradient(to right, #8b5cf6, #ec4899);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    animation: pulse 2s infinite;
}

.banner.multiplier {
    background: linear-gradient(to right, #f59e0b, #ef4444);
    animation: bounce 1s infinite;
}

.banner-multiplier {
    font-size: 1.125rem;
    font-weight: bold;
    color: #fef3c7;
    text-align: center;
    margin-bottom: 0.5rem;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

/* Game Complete */
.game-complete {
    text-align: center;
}

.game-complete-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.game-complete-title {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.game-complete-score {
    color: #6b7280;
    margin-bottom: 1rem;
}

.game-complete-jackpot {
    color: #d97706;
    font-weight: bold;
    font-size: 1.25rem;
    margin-top: 0.5rem;
}

/* Splash Screen Styles */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#splash-screen.fade-out {
    opacity: 0;
}

#splash-screen.hidden {
    display: none;
}

#splash-image {
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#splash-title {
    font-size: 2.5em;
    margin-top: 20px;
    color: #f0f0f0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    font-weight: bold;
}

#loading-text {
    font-size: 1.2em;
    margin-top: 10px;
    color: #ccc;
    animation: pulse 1.5s infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    .title {
        font-size: 2rem;
    }

    .stats-bar {
        gap: 1rem;
    }

    .stat-card {
        padding: 0.75rem 1rem;
    }

    .card {
        width: 6rem;
        height: 8.5rem;
    }

    .action-buttons {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .milestones-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40%, 43% { transform: translateX(-50%) translateY(-10px); }
    70% { transform: translateX(-50%) translateY(-5px); }
    90% { transform: translateX(-50%) translateY(-2px); }
}

@keyframes pulse-border {
    0%, 100% { border-color: #ef4444; }
    50% { border-color: #fca5a5; }
}

.resetCookies {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.resetCookies button {
    background: #dc2626;
    color: oldlace;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.markdown {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.markdown a {
    display: inline-block;
    background: lemonchiffon;
    color: indianred;
    text-decoration: none;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    font-weight: 520;
}