body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.app {
    padding: 20px;
}

.main-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start; /* Keeps panels aligned at the top */
    gap: 20px;               /* Space between your 4 columns */
    padding: 10px;
    width: 100%;
    overflow-x: auto;        /* Adds a scrollbar if the screen is too small */
}

.column {
    flex: 1;                 /* Each of the 4 columns gets equal width */
    min-width: 280px;        /* Prevents columns from becoming too narrow */
    display: flex;
    flex-direction: column;
    gap: 15px;               /* Space between panels inside a column */
}

.entry-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel {
    border: 1px solid #ccc;
    padding: 10px;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    padding: 5px;
    cursor: pointer;
}

li.selected {
    background-color: #007bff;
    color: white;
}

.selected {
    background-color: #007bff;
    color: white;
}

.type-btn.selected {
    background-color: #28a745;
    color: white;
}

#numberGrid {
    display: grid;
    grid-template-columns: repeat(4, 70px);
    gap: 15px;
}

.number-btn {
    width: 80px;
    height: 80px;
    border: 2px solid #333;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

#currentEntryDisplay {
    height: 32px;          /* reserve space */
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: bold;
    line-height: 32px;
}

#entryLog, #reportOutput {
    max-height: 400px;       /* Keeps the log from getting infinitely long */
    overflow-y: auto;        /* Adds a scrollbar inside the panel */
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

@media print {
    body * {
        visibility: hidden !important;
    }

    #reportView, #reportView * {
        visibility: visible !important;
    }

    #reportView {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    /* hide buttons when printing */
    #reportView button {
        display: none !important;
    }
}

@media (max-width: 1200px) {
    .main-layout {
        flex-wrap: wrap;     /* Allows columns to wrap to a new line */
    }
    
    .column {
        flex: 1 1 45%;       /* Switches to a 2x2 grid on medium screens */
    }
}

@media (max-width: 768px) {
    .column {
        flex: 1 1 100%;      /* Single column on mobile devices */
    }
}