/* Layout */
body::before {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://deadjackdaw.com/assets/images/background_tiles/grass_texture_repeating_patter_by_mas_d188zr-375w-2x.jpg');
}

.master-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    width: 95vw;
    max-width: 1300px;
}

.pc-layout {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    height: 100%;
    align-items: stretch;
}

/* Layout Spacing Overrides */
.main-title {
    min-height: auto;
    margin-top: 10px;
    margin-bottom: 10px;
}

.box-header {
    margin-bottom: 10px;
}

.info-panel {
    gap: 10px;
}

#infoName {
    padding-top: 10px;
    margin-bottom: 5px;
}

.showdown-container h4 {
    margin-top: 5px;
}

/* Box Section */
.box-section {
    flex: 0 0 max-content; 
    width: auto;
    display: flex;
    flex-direction: column;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.box-header button {
    font-family: inherit;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2.5em;
    padding: 10px 20px;
    color: #000;
    transition: color 0.1s;
}

.box-grid {
    display: grid;
    grid-template-columns: repeat(5, 70px);
    grid-template-rows: repeat(5, 70px);
    gap: 0px;
    background-color: #000;
    border: 2px solid #000;
    width: fit-content;
    margin: auto 0;
}

.box-slot {
    background-color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    box-sizing: border-box;
    border: 1px solid #ccc;
}

.box-slot:hover {
    background-color: #e0e0e0;
}

.box-slot:empty {
    background-color: transparent;
    border: 2px solid #555;
    cursor: default;
}

.box-slot img {
    max-width: 64px;
    max-height: 64px;
    image-rendering: pixelated;
    transition: filter 0.5s ease;
}

/* Info Panel */
.info-panel {
    flex: 1; 
    width: auto;
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto 1fr;
    gap: 15px;
    height: 100%;
    min-height: 100%;
    overflow-y: auto;
}

.info-panel img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 96px;
    align-self: start;
    image-rendering: pixelated;
}

#infoName {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding-top: 15px;
    text-transform: uppercase;
}

#infoBio {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 1.1em;
}

.showdown-container {
    grid-column: 1 / 3;
    grid-row: 3;
    display: flex;
    flex-direction: column;
}

.showdown-container h4 {
    margin: 10px 0 5px 0;
    text-transform: uppercase;
}

.info-panel textarea {
    font-family: "VCR OSD Mono", Courier, monospace;
    width: 100%;
    flex: 1; 
    min-height: 120px;
    resize: none; 
    background-color: #f0f0f0;
    border: 2px solid #000;
    padding: 15px;
    box-sizing: border-box;
}

#infoGallery {
    border: 2px solid #ccc;
    padding: 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    color: #000;
    box-sizing: border-box;
    font-size: 0.9em;
}

/* Responsive Overrides */
@media (max-width: 900px) {
    .master-layout {
        flex-direction: column;
        align-items: center;
    }

    .pc-layout {
        flex-direction: column;
        width: 100%;
    }

    .side-nav {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        margin-bottom: 20px;
    }

    .box-section, .info-panel {
        width: 100%;
    }
}