/* =====================================================
   Batch Process
   Standalone Game Styles
   ===================================================== */


/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}


body {
    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f5f5f5;

    color: #222;
}


/* =====================================================
   GAME CONTAINER
   ===================================================== */

.batch-game {

    width: 100%;
    max-width: 900px;

    margin: 0 auto;

    padding: 40px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* =====================================================
   HEADER
   ===================================================== */

.batch-header {

    text-align: center;

    margin-bottom: 10px;
}


.batch-header h1 {

    margin: 0;

    font-size: 2.5rem;

    letter-spacing: 1px;
}


.batch-subtitle {

    margin: 10px 0 0;

    color: #666;

    font-size: 1rem;
}


/* =====================================================
   INSTRUCTIONS
   ===================================================== */

.batch-instructions {

    text-align: center;

    margin-bottom: 15px;

    color: #444;
}


.batch-instructions p {

    margin: 0;
}


/* =====================================================
   LIVES
   ===================================================== */

.lives-container {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    margin-bottom: 25px;

    font-size: 0.95rem;

}


.life-hearts {

    display: flex;

    gap: 6px;

}


.life-heart {

    display: inline-block;

    font-size: 1.35rem;

    line-height: 1;

    color: #c62828;

    transition:
        transform 0.2s ease,
        opacity 0.2s ease,
        filter 0.2s ease;

}


.life-heart.lost {

    opacity: 0.2;

    transform: scale(0.85);

    filter: grayscale(1);

}
/* =====================================================
   SOLVED GROUPS
   ===================================================== */

.solved-groups {

    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 10px;

    margin-bottom: 15px;
}


/* =====================================================
   GAME BOARD
   ===================================================== */

.batch-board {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;
}


/* =====================================================
   GAME TILE
   ===================================================== */

.batch-tile {

    min-height: 85px;

    padding: 12px;

    border: 1px solid #d1d1d1;

    border-radius: 8px;

    background: white;

    color: #222;

    font-size: 0.95rem;

    font-weight: bold;

    text-align: center;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}


.batch-tile:hover {

    transform: translateY(-2px);

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.12);
}
.batch-tile.selected:hover {

    transform: translateY(1px) scale(0.97);

}
/* =====================================================
   CONTROLS
   ===================================================== */

.batch-controls {

    display: flex;
    flex-direction: column;

    align-items: center;

    margin-top: 25px;

    gap: 10px;
}


#selection-count {

    margin: 0;

    color: #666;
}


#submit-group {

    padding:
        12px 28px;

    border: none;

    border-radius: 6px;

    background: #333;

    color: white;

    font-size: 1rem;

    font-weight: bold;

    cursor: pointer;

    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}


#submit-group:hover:not(:disabled) {

    transform: translateY(-1px);

    opacity: 0.9;
}


#submit-group:disabled {

    opacity: 0.4;

    cursor: not-allowed;
}


/* =====================================================
   MESSAGE
   ===================================================== */

.batch-message {

    min-height: 30px;

    margin-top: 15px;

    text-align: center;

    font-weight: bold;
}


/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 700px) {

    .batch-board {

        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 8px;
    }


    .batch-tile {

        min-height: 75px;

        font-size: 0.85rem;

        padding: 8px;
    }

}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 500px) {

    .batch-game {

        padding: 25px 12px;
    }


    .batch-header h1 {

        font-size: 2rem;
    }


    .batch-board {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }


    .batch-tile {

        min-height: 75px;

        font-size: 0.8rem;

        padding: 8px;
    }


    .mistakes-container {

        flex-direction: column;

        gap: 6px;
    }

}
/* =====================================================
   TILE SELECTION
   ===================================================== */

.batch-tile.selected {

    background-color: #333;

    color: white;

    border-color: #333;

    transform: translateY(1px) scale(0.97);

    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.2);

}
/* =====================================================
   MISTAKE STATES
   ===================================================== */

.mistake-dot.used {

    background: #d1d1d1;

}


/* =====================================================
   GAME MESSAGE STATES
   ===================================================== */

.batch-message.success {

    color: #2f7d32;

}


.batch-message.error {

    color: #b42318;

}
/* =====================================================
   SOLVED GROUP ANIMATION
   ===================================================== */

.solved-group {

    animation:
        solvedGroupAppear
        0.35s ease-out;

}


@keyframes solvedGroupAppear {

    from {

        opacity: 0;

        transform:
            translateY(8px);

    }


    to {

        opacity: 1;

        transform:
            translateY(0);

    }

}
/* =====================================================
   GAME SUMMARY
   ===================================================== */

.game-summary {

    margin-top: 10px;

    font-size: 0.95rem;

    font-weight: normal;

}


/* =====================================================
   PLAY AGAIN BUTTON
   ===================================================== */

.play-again-button {

    margin-top: 15px;

    padding:
        12px 28px;

    border: none;

    border-radius: 6px;

    background: #333;

    color: white;

    font-size: 1rem;

    font-weight: bold;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;

}


.play-again-button:hover {

    transform: translateY(-1px);

    opacity: 0.9;

}