/* Game Layout */
#game-wrapper {
    display: grid;
    grid-template-areas:
        "top top"
        "left right";
    grid-template-columns: 3fr 2fr; 
    grid-template-rows: auto 1fr;
    width: 100%;
    max-width: 1300px;
    min-height: 90vh;
    max-height: 95vh;
    background-color: #2c2c2c;
    border: 5px solid #000;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    overflow: hidden;
    gap: 10px;
    padding: 10px;
    position: relative;
}

/* Top Bar */
#top-bar {
    grid-area: top;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #1f1f1f;
    padding: 8px 15px;
    border-radius: 8px;
    border: 2px solid #444;
    margin-bottom: 5px;
}

.stat-item {
    font-size: 1.0em;
    color: #ffd700;
    text-shadow: 1px 1px 2px #000;
}

/* Left Panel (Main Content Area) */
#main-content {
    grid-area: left;
    display: flex;
    flex-direction: column;
    background-color: #3a3a3a;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #555;
    overflow-y: auto;
    gap: 15px;
}

#monster-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#monster-area h1 {
    font-size: 1.6em;
    color: #e67e22;
    margin-bottom: 10px;
    text-shadow: 2px 2px #000;
}

/* Clickables Container */
#clickables-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
    min-height: 250px;
    flex-wrap: wrap;
}

/* Individual Clickable Areas */
.clickable-item {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

#little-trashcan-area {
    width: clamp(70px, 15vmin, 100px);
    height: clamp(70px, 15vmin, 100px);
    order: 1;
    align-self: flex-end;
}

#trash-bag-area {
    width: clamp(90px, 20vmin, 140px);
    height: clamp(90px, 20vmin, 140px);
    order: 2;
    align-self: flex-end;
}

#dumpster-area {
    width: clamp(130px, 30vmin, 180px);
    height: clamp(100px, 23vmin, 150px);
    order: 3;
    align-self: flex-end;
}

#dump-truck-area {
    width: clamp(180px, 45vmin, 280px);
    height: clamp(120px, 30vmin, 180px);
    order: 4;
    align-self: flex-end;
}

#junkyard-area {
    width: clamp(220px, 55vmin, 340px);
    height: clamp(150px, 38vmin, 230px);
    order: 5;
    align-self: flex-end;
}

/* Monster Stats - Place after monster area */
#monster-stats {
    margin-top: 15px;
}

/* Upgrades & Mystery Dumpster Section - Now in Left Panel */
.main-content-section {
    background-color: #2f2f2f;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #4a4a4a;
}
.main-content-section h2 {
    font-size: 1.0em;
    color: #ecf0f1;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 2px solid #555;
    padding-bottom: 6px;
}

#upgrades {
    order: 3;
}

#mystery-dumpster-area {
    order: 4;
}

/* Right Panel (Side Panel) - Findings */
#side-panel {
    grid-area: right;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #3a3a3a;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #555;
    overflow-y: auto; 
    min-height: 0;
}

.side-panel-section {
    background-color: #2f2f2f;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #4a4a4a;
    display: flex;
    flex-direction: column;
    flex-shrink: 0; 
    overflow: hidden; 
}

.side-panel-section h2 {
    font-size: 1.0em;
    color: #ecf0f1;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 2px solid #555;
    padding-bottom: 6px;
}

.side-panel-section > h2 + button {
    margin-bottom: 8px;
}

/* Give the lists themselves flexibility and scrolling */
.side-panel-section ul {
    flex-grow: 1;
    overflow-y: auto; 
    margin-bottom: 0;
}

/* Specific section adjustments if needed */
#wicked-finds-area {
    order: 1;
    flex: 1 1 30%; 
}
#inventory-area { 
    order: 2;
    flex: 1 1 35%; 
}
#junk-area {
    order: 3;
    flex: 1 1 35%; 
}