﻿/* Outer wrapper locks layout cleanly on screen */
.game-wrapper {
    max-width: 950px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin: 0 auto;
}

/* Target Boxes (Dotted lines) */
.target-box {
    width: 71px;
    height: 71px;
    border: 2px dashed #a29bfe;
    border-radius: 16px;
    background-color: var(--card-bg);
    /* PERFECT CENTERING CSS FIX */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

    .target-box.drag-over {
        border-color: #00b894;
        background-color: #e8f8f5;
        transform: scale(1.05);
    }

/* Draggable Number Cards */
.number-card {
    width: 64px; /* Scaled slightly smaller than target-box to fit cleanly inside */
    height: 64px;
    border-radius: 12px;
    font-size: 1.6rem;
    font-weight: bold;
    color: white;
    /* Perfect alignment inside card */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: grab;
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    touch-action: none; /* Stops screen from dragging on mobile */
}

    .number-card:active {
        cursor: grabbing;
        transform: translateY(2px);
        box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
    }

    .number-card.dragging {
        opacity: 0.5;
    }

/* Playful Palette Colors */
.bg-num-0 {
    background-color: #e17055;
    color: #ffffff;
}
/* Medium Terracotta */
.bg-num-1 {
    background-color: #0984e3;
    color: #ffffff;
}
/* Medium Deep Blue */
.bg-num-2 {
    background-color: #00b894;
    color: #ffffff;
}
/* Medium Teal Green */
.bg-num-3 {
    background-color: #f39c12;
    color: #ffffff;
}
/* Medium Warm Amber */
.bg-num-4 {
    background-color: #6c5ce7;
    color: #ffffff;
}
/* Medium Purple */
.bg-num-5 {
    background-color: #e84393;
    color: #ffffff;
}
/* Medium Rose Pink */
.bg-num-6 {
    background-color: #10ac84;
    color: #ffffff;
}
/* Medium Emerald */
.bg-num-7 {
    background-color: #d63031;
    color: #ffffff;
}
/* Medium Crimson */
.bg-num-8 {
    background-color: #2e86de;
    color: #ffffff;
}
/* Medium Sapphire */
.bg-num-9 {
    background-color: #d35400;
    color: #ffffff;
}
/* Medium Burnt Orange */

/* Custom Kid-Friendly Select Dropdown */
.range-select {
    font-size: 1.25rem;
    font-weight: bold;
    color: #6c5ce7;
    border: 3px solid #6c5ce7;
    border-radius: 30px;
    padding: 0.3rem 1.5rem;
    background-color: white;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(108, 92, 231, 0.2);
}

/* Action Buttons */
.btn-action {
    font-size: 1.25rem;
    padding: 0.5rem 1.8rem;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 5px 0 rgba(0,0,0,0.15);
}

    .btn-action:active {
        transform: translateY(3px);
        box-shadow: 0 2px 0 rgba(0,0,0,0.15);
    }

/* Pulse animation for winning */
.correct-pulse {
    animation: pulse 0.5s ease infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}

/* Small screen tweak */
@media (max-width: 576px) {
    .target-box {
        width: 54px;
        height: 54px;
    }

    .number-card {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}
