.slots-container {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
}

.slot {
    width: 360px;
    height: 360px;
    background: rgba(255, 255, 255, 0.1);
    border: 3px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s;
}

.slot-number {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.cards-pool {
    display: flex;
    gap: 20px;
    min-height: 260px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.seq-card {
    width: 360px;
    height: 360px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #333;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    overflow: hidden;
}

.seq-card:hover {
    transform: scale(1.05);
}

.seq-card.selected {
    border: 4px solid var(--secondary-color);
    transform: scale(1.1);
}

.seq-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    pointer-events: none;
}

.hint-btn {
    background: #FF9800;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
    transition: transform 0.2s;
}

.hint-btn:hover {
    transform: scale(1.05);
}

/* Star Animation */
.star-reward {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 15rem;
    color: #FFD700;
    z-index: 2000;
    text-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.star-reward.show {
    transform: translate(-50%, -50%) scale(1);
    animation: starPulse 1s infinite alternate;
}

@keyframes starPulse {
    from {
        transform: translate(-50%, -50%) scale(1);
        text-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    }

    to {
        transform: translate(-50%, -50%) scale(1.1);
        text-shadow: 0 0 80px rgba(255, 215, 0, 1);
    }
}

/* Hint Modal */
.hint-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

/* Ensure hidden class works */
.hint-modal.hidden {
    display: none !important;
}

.hint-content {
    background: white;
    padding: 20px;
    border-radius: 20px;
    max-width: 90%;
    text-align: center;
}

.hint-grid {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hint-card {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.hint-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes explode {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* Global Overflow Fix */
body,
html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    touch-action: manipulation;
    /* Prevent double-tap zoom */
}

/* Game Container */
.game-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    /* Prevent it from getting too wide on large screens */
    margin: 0 auto;
    /* Center it */
}

/* Game Header Styles (Ensure they exist and are responsive) */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.back-btn {
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 30px;
    transition: background 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.score-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 15px;
}

.stage-indicator {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Start Overlay */
.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.start-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.start-content h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2rem;
}

.start-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .game-header {
        flex-direction: row;
        /* Keep row but wrap if needed */
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px;
    }

    .back-btn,
    .score-display,
    .stage-indicator {
        font-size: 1rem;
        /* Smaller font */
        padding: 8px 15px;
    }

    .game-container {
        padding: 5px;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .game-area {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }

    .slots-container {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
        width: 100%;
        align-items: center;
    }

    .slot {
        width: 250px;
        /* Smaller base size */
        height: 250px;
        max-width: 80vw;
        /* Responsive limit */
        max-height: 80vw;
    }

    .cards-pool {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding-bottom: 80px;
        /* More space for scrolling */
    }

    .seq-card {
        width: 110px;
        /* Smaller base size */
        height: 110px;
        font-size: 2rem;
        max-width: 35vw;
        max-height: 35vw;
    }

    .instruction-container {
        margin-bottom: 15px;
        width: 100%;
        justify-content: center;
    }



    @keyframes explode {
        0% {
            transform: scale(1);
            opacity: 1;
        }

        100% {
            transform: scale(3);
            opacity: 0;
        }
    }

    /* Global Overflow Fix */
    body,
    html {
        overflow-x: hidden;
        width: 100%;
        padding: 10px 5px;
    }

    .back-btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 5px;
    }

    .score-display,
    .stage-indicator {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .slot {
        width: 220px;
        height: 220px;
    }

    .seq-card {
        width: 90px;
        height: 90px;
        font-size: 1.5rem;
    }
}