/* GLOBAL STYLES */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #149EDF;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

/* PIXEL ART RENDERING */
.pixelated {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* NEW LOGO STYLE (Upscaled) */
.app-logo {
    width: 720px; /* Increased from 600px */
    max-width: 90%;
    margin-bottom: 20px;
    image-rendering: pixelated;
}

/* MAIN CONTAINER (Upscaled) */
#skater-creator-container {
    display: flex;
    background-color: #fff;
    border: 4px solid #000;
    /* 20% Larger Dimensions */
    width: 1100px; 
    height: 720px;
    box-shadow: none;
}

/* LEFT COLUMN: CONTROLS */
#ui-controls {
    width: 40%;
    padding: 25px; /* Increased padding */
    display: flex;
    flex-direction: column;
    border-right: 4px solid #000;
    background-color: #f0f0f0;
}

/* BUTTONS & TABS */
.control-section { margin-bottom: 20px; }

.gender-button, .tab-button, #action-buttons button, #pro-selector {
    padding: 12px; /* Slightly larger buttons */
    margin: 6px;
    border: 2px solid #000;
    background-color: #fff;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 2px 2px 0 #000;
    transition: all 0.1s;
    font-size: 14px; /* Slightly larger text */
}

.gender-button:active, .tab-button:active, #action-buttons button:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.gender-button.active, .tab-button.active {
    background-color: #3498db;
    color: #fff;
}

/* ITEM GRID */
#item-selection-grid {
    flex-grow: 1;
    display: grid;
    /* Increased min-size from 60px to 85px so thumbnails are bigger */
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 12px;
    overflow-y: auto;
    background-color: #fff;
    border: 2px solid #000;
    padding: 12px;
    margin-bottom: 20px;
}

.item-thumbnail {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #ddd;
    cursor: pointer;
    object-fit: contain;
    background-color: #f0f0f0;
}

.item-thumbnail:hover { border-color: #3498db; }
.item-thumbnail.selected { 
    border-color: #000; 
    background-color: #e3f2fd;
    outline: 2px solid #3498db;
}

.color-swatch { width: 100%; height: 100%; border: 1px solid #000; box-sizing: border-box; }
.none-button { display: flex; align-items: center; justify-content: center; background: #eee; font-size: 11px; color: #555; font-weight: bold; }

/* RIGHT COLUMN: DISPLAY */
#avatar-display-wrapper {
    width: 60%;
    background-color: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#avatar-display {
    /* Upscaled from 450px to 540px */
    width: 540px; 
    height: 540px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.avatar-layer, .avatar-layer-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; 
}

.avatar-layer-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}