/* styles.css - Final Version: Responsive Container & No Banner Area */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body { 
    height: 100%; 
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0; 
    min-height: 100vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    padding: 10px; 
}

.container {
    /* Responsive Container Size & Shape */
    width: 100%;             
    max-width: 420px; /* Reverted to original max width */        
    max-height: 95vh;        
    aspect-ratio: 9 / 16;    
    
    position: relative; 
    overflow: hidden;
    border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); 
    background-color: #8e44ad; /* Fallback color */
}

.game-area {
    width: 100%; 
    height: 100%; 
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr 90px; 
    /* Grid layout without banner row */
    grid-template-rows: 60px 1fr; /* Top bar, Main content */
    grid-template-areas:
        "top top top"
        "left center right"; /* Banner area removed */
        
    background-image: url('images/background.png'); /* Check path */
    background-size: cover; 
    background-position: center; /* Center the background */
    background-repeat: no-repeat;
    overflow: hidden; 
}

/* Central Princess Area */
.princess-container {
    grid-area: center;
    position: relative;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    padding-bottom: 20px; 
    z-index: 1;
    overflow: hidden; 
}

/* Princess Styling */
.princess {
    height: 95%; 
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(1.466) translateY(20%); 
    transform-origin: center bottom;
}

#princess-base {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain; 
}

#princess-outfit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#princess-outfit img {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

/* --- Positioning for Outfit Items --- */
/* Keep all existing absolute positioning rules. */
/* WARNING: These need testing with responsive scaling! */
#princess-outfit img.hair { top: 20%; left: 50%; transform: translateX(-50%); width: 50%; z-index: 10; }
#princess-outfit img.crown { top: 20%; left: 50%; transform: translateX(-50%); width: 25%; z-index: 11; }
#princess-outfit img[src*="hat1.png"] { width: 35.75%; top: 17%; }
#princess-outfit img[src*="hat2.png"] { width: 35.75%; top: 17%; }
#princess-outfit img[src*="crown2.png"] { top: 18%; }
#princess-outfit img[src*="crown3.png"] { top: 18%; }
#princess-outfit img[src*="hat3.png"] { width: 36.25%; top: 18%; }
#princess-outfit img[src*="hat4.png"] { width: 34.8%; top: 15%; }
#princess-outfit img[src*="hat5.png"] { width: 25.5%; top: 19%; }
#princess-outfit img[src*="hat6.png"] { width: 33.6%; top: 18%; }
#princess-outfit img.dress { top: 20%; left: 50%; transform: translateX(-50%); width: 90%; z-index: 5; }
#princess-outfit img.dress[src*="dress1.png"],
#princess-outfit img.dress[src*="dress2.png"],
#princess-outfit img.dress[src*="dress3.png"] { top: 35%; left: 51%; width: 99.2%; }
#princess-outfit img[src*="dress7.png"],
#princess-outfit img[src*="dress8.png"] { width: 481%; /* Still looks very large */ top: 31%;} 
#princess-outfit img[src*="hair1.png"] { left: 56%; }
#princess-outfit img[src*="hair2.png"] { left: 56%; }
#princess-outfit img[src*="hair4.png"],
#princess-outfit img[src*="hair5.png"] { width: 54%; }
#princess-outfit img[src*="dress4.png"],
#princess-outfit img[src*="dress5.png"],
#princess-outfit img[src*="dress6.png"] { top: 34%; left: 52%; }
#princess-outfit img.corsette { top: 33%; left: 50%; transform: translateX(-50%); width: 55.0%; z-index: 4; }
#princess-outfit img.skirt { top: 43%; left: 50%; transform: translateX(-50%); width: 70%; z-index: 3; }
#princess-outfit img[src*="skirt7.png"],
#princess-outfit img[src*="skirt8.png"] { top: 39%; }
#princess-outfit img[src*="corsette4.png"],
#princess-outfit img[src*="corsette5.png"],
#princess-outfit img[src*="corsette6.png"] { top: 31%; }
#princess-outfit img[src*="corsette7.png"],
#princess-outfit img[src*="corsette8.png"] { width: 47.7%; top: 34%; }
#princess-outfit img.shoe { bottom: 23%; left: 50%; transform: translateX(-50%); width: 35.0%; z-index: 2; } 
/* --- End Outfit Item Positioning --- */


/* Top Buttons */
.top-buttons {
    grid-area: top;
    position: absolute; 
    top: 15px; 
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 30px; 
    z-index: 6; /* Keep z-index high */
    height: 60px; /* Matches row height */
}

.back-button,
.camera-button {
    width: 60px; 
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 4px solid #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 -2px 5px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none; 
}

.back-button:hover,
.camera-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3), inset 0 -2px 5px rgba(0,0,0,0.3);
}

.back-button svg,
.camera-button svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.5));
}

/* Wardrobes */
.wardrobe-left {
    grid-area: left;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px; 
    padding-bottom: 10px;
    overflow: hidden; 
}

.wardrobe-right {
    grid-area: right;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10px; 
    padding-bottom: 10px;
    overflow: hidden; 
}

.item-category,
.item-variations {
    display: flex;
    flex-direction: column;
    gap: 6px; 
    width: 100%;
    align-items: center;
    height: 100%; /* Fill grid area height */
    overflow-y: auto; 
    padding: 10px 0; 

    /* Keep scrollbar hiding */
    &::-webkit-scrollbar { display: none; }
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

/* Item Box Styling */
.item {
    width: 75px; 
    height: 62px; 
    flex-shrink: 0; 
    background: radial-gradient(circle, #ffffff, #fcb2ff);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255,255,255,0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.7);
    overflow: hidden;
    position: relative;
}

.item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255,255,255,0.5);
}

.item.active {
    border-color: #681599;
    border-width: 3px;
    box-shadow: 0 0 10px #fcb2ff, 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255,255,255,0.5);
    background: #a96abc;
}


/* Category Icon Styling */
.category-icon {
    max-width: 100%; 
    max-height: 60px; 
    width: auto; 
    height: auto; 
    object-fit: contain;
    filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3));
}

/* Keep icon filters */
.item:not([data-category="hair"]) .category-icon { filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3)) brightness(60%) saturate(110%); }
.item[data-category="hair"] .category-icon { filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3)) brightness(45%) saturate(90%); }

/* Variation Image Styling */
.variation-image {
    max-width: 100%; 
    max-height: 60px; 
    width: auto; 
    height: auto; 
    object-fit: contain;
}

/* Particle Effects Placeholder */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5; 
}

/* Ad Banner Placeholder Styling */
.ad-banner {
     /* Hide the banner visually and remove from layout */
    display: none; 
    /* Keep other styles just in case */
    background-color: rgba(0, 0, 0, 0.7); 
    color: white; 
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    min-height: 50px; 
    z-index: 4;
}