* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #667eea;
    background-image: 
        radial-gradient(circle at 15px 15px, rgba(255, 255, 255, 0.1) 6px, transparent 0);
    background-size: 30px 30px;
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
}

/* Background Decorations */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-brick {
    position: absolute;
    width: 80px;
    height: 40px;
    border-radius: 4px;
    opacity: 0.2;
    filter: blur(1px);
    animation: float-bg 15s ease-in-out infinite alternate;
}

.bg-brick.red { background-color: #e53935; color: #e53935; }
.bg-brick.blue { background-color: #1e88e5; color: #1e88e5; }
.bg-brick.yellow { background-color: #fdd835; color: #fdd835; }
.bg-brick.green { background-color: #43a047; color: #43a047; }

.bg-brick::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 8px;
    width: 16px;
    height: 16px;
    background: inherit;
    border-radius: 50%;
    box-shadow: 24px 0 0 currentColor, 48px 0 0 currentColor;
}

.bg-minifig {
    position: absolute;
    width: 50px;
    height: 90px;
    opacity: 0.3;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    animation: float-bg 20s ease-in-out infinite alternate-reverse;
    pointer-events: none;
    transform-origin: center center;
}

.circle-item .bg-minifig {
    animation: none; /* Disable individual float animation for circle items */
}

.bg-minifig .head-part {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: #fdd835;
    border-radius: 6px;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}

.bg-minifig .torso-part {
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 35px;
    background: inherit;
    border-radius: 6px 6px 0 0;
}

.bg-minifig .legs-part {
    position: absolute;
    top: 61px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 25px;
    background: #1976d2;
    border-radius: 0 0 4px 4px;
    opacity: 0.8;
}

.bg-minifig.blue { color: #1e88e5; }
.bg-minifig.red { color: #e53935; }
.bg-minifig.green { color: #43a047; }
.bg-minifig.yellow { color: #fdd835; }

.bg-minifig .torso-part { background-color: currentColor; }

/* BRICK Buildings in background */
.bg-building {
    position: absolute;
    width: 100px;
    height: 120px;
    opacity: 0.15;
    filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.1));
    animation: float-bg 25s ease-in-out infinite alternate;
}

.bg-building::before {
    /* Main Structure */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #eeeeee;
    border-radius: 4px;
    box-shadow: inset 0 0 0 4px rgba(0,0,0,0.05);
}

.bg-building::after {
    /* Windows/Detail */
    content: '■ ■\n■ ■\n■ ■';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #2196f3;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre;
    font-family: monospace;
}

.bg-building.tower { width: 60px; height: 160px; }
.bg-building.house { width: 120px; height: 80px; }
.bg-building.red::before { background: #e53935; }
.bg-building.blue::before { background: #1e88e5; }
.bg-building.yellow::before { background: #fdd835; }
.bg-building.green::before { background: #43a047; }

/* BRICK Factories in background */
.bg-factory {
    position: absolute;
    width: 140px;
    height: 90px;
    opacity: 0.15;
    filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.1));
    animation: float-bg 28s ease-in-out infinite alternate;
}

.bg-factory::before {
    /* Main Building with Saw-tooth roof */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: #78909c;
    clip-path: polygon(0% 100%, 100% 100%, 100% 0%, 75% 30%, 75% 0%, 50% 30%, 50% 0%, 25% 30%, 25% 0%, 0% 30%);
}

.bg-factory::after {
    /* Chimney */
    content: '';
    position: absolute;
    top: 0;
    right: 15px;
    width: 20px;
    height: 50px;
    background: #546e7a;
    border-radius: 2px 2px 0 0;
    box-shadow: 0 -5px 0 #37474f;
}

/* BRICK Restaurants in background */
.bg-restaurant {
    position: absolute;
    width: 130px;
    height: 90px;
    opacity: 0.15;
    filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.1));
    animation: float-bg 22s ease-in-out infinite alternate;
}

.bg-restaurant::before {
    /* Building with Awning */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 4px;
    background-image: 
        linear-gradient(90deg, #e53935 20%, transparent 20%, transparent 40%, #e53935 40%, #e53935 60%, transparent 60%, transparent 80%, #e53935 80%);
    background-size: 100% 20px;
    background-repeat: no-repeat;
    background-position: top;
}

.bg-restaurant::after {
    /* Window and Sign */
    content: '☕';
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 40px;
    background: rgba(33, 150, 243, 0.2);
    border: 2px solid #eeeeee;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    color: #333;
}

/* BRICK Streets in background */
.bg-street {
    position: absolute;
    left: 0;
    width: 100%;
    height: 60px;
    background: #444444;
    opacity: 0.1;
    z-index: -2;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.bg-street::before {
    content: '';
    width: 100%;
    height: 4px;
    border-top: 4px dashed rgba(255, 255, 255, 0.5);
}

/* BRICK Trees in background */
.bg-tree {
    position: absolute;
    width: 40px;
    height: 80px;
    opacity: 0.2;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    animation: sway 5s ease-in-out infinite alternate;
}

.bg-tree::before {
    /* Trunk */
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 30px;
    background: #795548;
    border-radius: 2px;
}

.bg-tree::after {
    /* Leaves - stacked circles */
    content: '';
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #4caf50;
    border-radius: 50%;
    box-shadow: 0 -15px 0 -5px #4caf50, 0 -25px 0 -10px #4caf50;
}

@keyframes sway {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

/* BRICK Cars in background */
.bg-car {
    position: absolute;
    width: 80px;
    height: 40px;
    opacity: 0.2;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    animation: drive-bg 12s linear infinite;
}

.bg-car::before {
    /* Body */
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 25px;
    background: #43a047;
    border-radius: 4px 10px 4px 4px;
}

.bg-car::after {
    /* Wheels */
    content: '';
    position: absolute;
    bottom: 0;
    left: 10px;
    width: 15px;
    height: 15px;
    background: #333;
    border-radius: 50%;
    box-shadow: 45px 0 0 #333;
}

@keyframes drive-bg {
    from { transform: translateX(-150px) rotate(0deg); }
    to { transform: translateX(calc(100vw + 150px)) rotate(0deg); }
}

@keyframes drive-bg-reverse {
    from { transform: translateX(calc(100vw + 150px)) rotateY(180deg); }
    to { transform: translateX(-150px) rotateY(180deg); }
}

/* Animations for internal elements (inside main container) */
@keyframes drive-bg-internal {
    from { transform: translateX(-150px) scale(0.4); }
    to { transform: translateX(calc(100% + 150px)) scale(0.4); }
}

@keyframes drive-bg-reverse-internal {
    from { transform: translateX(calc(100% + 150px)) scale(0.4) rotateY(180deg); }
    to { transform: translateX(-150px) scale(0.4) rotateY(180deg); }
}

/* BRICK Buses in background */
.bg-bus {
    position: absolute;
    width: 120px;
    height: 45px;
    opacity: 0.2;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    animation: drive-bg 18s linear infinite;
}

.bg-bus::before {
    /* Body */
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    height: 35px;
    background: #fdd835; /* Yellow bus */
    border-radius: 4px;
}

.bg-bus::after {
    /* Windows and Wheels */
    content: '■ ■ ■ ■';
    position: absolute;
    top: 5px;
    left: 10px;
    color: #2196f3;
    font-size: 14px;
    letter-spacing: 5px;
    box-shadow: 0 32px 0 -12px #333, 40px 32px 0 -12px #333, 80px 32px 0 -12px #333;
}

/* BRICK Trucks in background */
.bg-truck {
    position: absolute;
    width: 140px;
    height: 50px;
    opacity: 0.2;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    animation: drive-bg 15s linear infinite;
}

.bg-truck::before {
    /* Cab */
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 40px;
    height: 40px;
    background: #e53935;
    border-radius: 4px 10px 0 4px;
}

.bg-truck::after {
    /* Trailer */
    content: '';
    position: absolute;
    bottom: 15px;
    left: 42px;
    width: 95px;
    height: 35px;
    background: #eeeeee;
    border-radius: 2px;
    box-shadow: -32px 25px 0 -15px #333, 10px 25px 0 -15px #333, 70px 25px 0 -15px #333;
}

/* BRICK Clouds in background */
.bg-cloud {
    position: absolute;
    width: 100px;
    height: 40px;
    background: white;
    border-radius: 20px;
    opacity: 0.4;
    filter: blur(2px);
    animation: float-bg 30s ease-in-out infinite alternate;
}

.bg-cloud::before, .bg-cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.bg-cloud::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.bg-cloud::after {
    width: 40px;
    height: 40px;
    top: -15px;
    right: 15px;
}

/* BRICK Sun */
.bg-sun {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 80px;
    height: 80px;
    background: #ffeb3b;
    border-radius: 50%;
    box-shadow: 0 0 40px #fdd835, inset 0 0 20px rgba(0,0,0,0.1);
    opacity: 0.6;
    z-index: -1;
    animation: sun-pulse 4s ease-in-out infinite alternate;
}

.bg-sun::before {
    /* Sun rays - blocky style */
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 8px dashed #fdd835;
    border-radius: 50%;
    animation: rotate-slow 20s linear infinite;
}

/* BRICK Trains in background */
.bg-train {
    position: absolute;
    width: 200px;
    height: 40px;
    opacity: 0.25;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    animation: drive-bg 10s linear infinite;
}

.bg-train::before {
    /* Locomotive */
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 60px;
    height: 35px;
    background: #333;
    border-radius: 4px 15px 0 2px;
}

.bg-train::after {
    /* Cars */
    content: '';
    position: absolute;
    bottom: 8px;
    left: 65px;
    width: 130px;
    height: 30px;
    background: #1e88e5;
    border-radius: 2px;
    box-shadow: 
        0 25px 0 -12px #444, 40px 25px 0 -12px #444, 80px 25px 0 -12px #444, 120px 25px 0 -12px #444,
        -15px -10px 0 -10px #666; /* Chimney smoke */
}

@keyframes sun-pulse {
    from { transform: scale(1); opacity: 0.5; }
    to { transform: scale(1.1); opacity: 0.7; }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* BRICK Hills in background */
.bg-hill {
    position: absolute;
    bottom: -10px;
    height: 100px;
    background: #689f38;
    opacity: 0.15;
    z-index: -3;
    border-radius: 50% 50% 0 0;
    filter: drop-shadow(0 -5px 10px rgba(0,0,0,0.05));
}

.bg-hill::before {
    /* Grass studs/detail */
    content: '';
    position: absolute;
    top: 15px;
    left: 20%;
    width: 15px;
    height: 15px;
    background: #8bc34a;
    border-radius: 50%;
    box-shadow: 40px 10px 0 #8bc34a, 100px -5px 0 #8bc34a, 160px 15px 0 #8bc34a;
}

/* BRICK Mountains in background */
.bg-mountain {
    position: absolute;
    bottom: -20px;
    width: 300px;
    height: 200px;
    background: #90a4ae;
    opacity: 0.12;
    z-index: -4;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    filter: drop-shadow(0 -10px 20px rgba(0,0,0,0.05));
}

.bg-mountain::before {
    /* Snow cap */
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 60px;
    background: #ffffff;
    clip-path: polygon(50% 0%, 0% 100%, 25% 80%, 50% 100%, 75% 80%, 100% 100%);
}

/* BRICK Ferris Wheel */
.ferris-wheel {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 50px auto;
}

.wheel-structure {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 8px solid #1e88e5;
    border-radius: 50%;
    animation: rotate-slow 20s linear infinite;
}

.wheel-structure::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #fdd835;
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(255,255,255,0.2);
}

.spoke {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 4px;
    background: #1e88e5;
    transform-origin: left center;
}

.cabin {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #e53935;
    border-radius: 4px;
    top: -20px;
    right: -20px;
    animation: counter-rotate 20s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cabin::after {
    content: '☺';
    color: #ffeb3b;
    font-size: 20px;
}

@keyframes counter-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* Roller Coaster */
.coaster-track {
    position: relative;
    width: 100%;
    height: 200px;
    border-bottom: 8px solid #444;
    overflow: hidden;
}

.track-curve {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 8px solid #444;
    border-radius: 50%;
    bottom: -100px;
    left: 50px;
}

.coaster-car {
    position: absolute;
    width: 60px;
    height: 30px;
    background: #43a047;
    border-radius: 4px 10px 4px 4px;
    bottom: 8px;
    animation: coaster-move 10s linear infinite;
}

@keyframes coaster-move {
    0% { left: -100px; bottom: 8px; transform: rotate(0deg); }
    20% { left: 100px; bottom: 8px; transform: rotate(0deg); }
    40% { left: 300px; bottom: 100px; transform: rotate(-30deg); }
    60% { left: 500px; bottom: 8px; transform: rotate(30deg); }
    100% { left: calc(100% + 100px); bottom: 8px; transform: rotate(0deg); }
}

/* Theme Park Specifics */
.park-entrance {
    text-align: center;
    padding: 40px;
    background: #fbc02d;
    border-radius: 20px 20px 0 0;
    color: #333;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    box-shadow: inset 0 -10px 0 rgba(0,0,0,0.1);
}

.park-ground {
    background: #8bc34a;
    min-height: 600px;
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: flex-end;
    gap: 50px;
    position: relative;
    overflow: hidden;
}

/* BRICK Carousel */
.carousel {
    position: relative;
    width: 150px;
    height: 150px;
}

.carousel-top {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 40px;
    background: #e53935;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 2;
}

.carousel-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 20px;
    background: #1e88e5;
    border-radius: 4px;
}

.carousel-center {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 90px;
    background: #fdd835;
    animation: rotate-slow 10s linear infinite;
}

.carousel-horse {
    position: absolute;
    width: 30px;
    height: 20px;
    background: #ffffff;
    border-radius: 4px;
    border: 2px solid #ddd;
}

/* BRICK Vending Machine */
.vending-machine {
    position: relative;
    width: 50px;
    height: 80px;
    background: #e53935;
    border-radius: 4px;
    border: 3px solid #b71c1c;
}

.vending-machine::before {
    /* Glass display */
    content: '🥤\n🍔';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    height: 40px;
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid #eeeeee;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: pre;
}

.vending-machine::after {
    /* Buttons and Slot */
    content: '';
    position: absolute;
    bottom: 10px;
    left: 5px;
    width: 10px;
    height: 10px;
    background: #fbc02d;
    box-shadow: 15px 0 0 #43a047, 30px 0 0 #1e88e5, 0 15px 0 #333;
}

/* BRICK Stage */
.stage {
    position: relative;
    width: 200px;
    height: 100px;
    background: #333;
    border-radius: 4px;
    border-bottom: 8px solid #111;
}

.stage::before {
    /* Curtains */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #e53935 15%, transparent 15%, transparent 85%, #e53935 85%);
}

.stage::after {
    /* Lights */
    content: '💡 💡 💡';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #ffeb3b;
    font-size: 16px;
}

/* BRICK Chair */
.chair {
    position: relative;
    width: 30px;
    height: 40px;
}
.chair::before {
    /* Seat */
    content: '';
    position: absolute;
    bottom: 0;
    width: 30px;
    height: 15px;
    background: #1e88e5;
    border-radius: 2px;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}
.chair::after {
    /* Backrest */
    content: '';
    position: absolute;
    bottom: 15px;
    width: 30px;
    height: 25px;
    background: #1e88e5;
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.2);
}

/* BRICK Trash Can */
.trash-can {
    position: relative;
    width: 25px;
    height: 35px;
    background: #43a047;
    border-radius: 2px;
}
.trash-can::before {
    /* Lid */
    content: '';
    position: absolute;
    top: -5px;
    left: -2px;
    width: 29px;
    height: 8px;
    background: #2e7d32;
    border-radius: 4px 4px 0 0;
}

/* BRICK Bathroom */
.bathroom {
    position: relative;
    width: 60px;
    height: 70px;
    background: #eeeeee;
    border: 2px solid #ddd;
    border-radius: 4px;
}
.bathroom::before {
    /* Door */
    content: '🚻';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 45px;
    background: #90a4ae;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    border-radius: 2px 2px 0 0;
}

/* BRICK Circus Tent */
.circus-tent {
    position: relative;
    width: 180px;
    height: 120px;
}
.circus-tent::before {
    /* Tent top */
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 60px;
    background: repeating-linear-gradient(90deg, #e53935 0, #e53935 20px, #ffffff 20px, #ffffff 40px);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.circus-tent::after {
    /* Tent bottom */
    content: '';
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background: repeating-linear-gradient(90deg, #e53935 0, #e53935 20px, #ffffff 20px, #ffffff 40px);
    border-radius: 0 0 4px 4px;
}

/* Resize handle for build-a-park */
.resize-handle {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    background: #fbc02d;
    border: 2px solid white;
    border-radius: 50%;
    cursor: nwse-resize;
    display: none;
    z-index: 101;
}
.placed-item:hover .resize-handle {
    display: block;
}

/* House Building Elements */
.brick-brick-build {
    position: relative;
    width: 60px;
    height: 30px;
    background: #e53935;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.1);
}
.brick-brick-build::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 10%;
    width: 80%;
    height: 6px;
    background: inherit;
    border-radius: 2px 2px 0 0;
    box-shadow: 15px 0 0 inherit, 30px 0 0 inherit; /* Simplified studs */
}

.roof-part {
    width: 100px;
    height: 50px;
    background: #b71c1c;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.window-part {
    width: 40px;
    height: 40px;
    background: #e3f2fd;
    border: 4px solid #fbc02d;
    position: relative;
}
.window-part::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 100%;
    height: 2px;
    background: #fbc02d;
}

.door-part {
    width: 45px;
    height: 70px;
    background: #795548;
    border: 3px solid #5d4037;
    position: relative;
}
.door-part::after {
    content: '';
    position: absolute;
    right: 5px;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #fbc02d;
    border-radius: 50%;
}

/* Furniture */
.bed-item {
    width: 80px;
    height: 40px;
    background: #1e88e5;
    border-radius: 4px;
    position: relative;
}
.bed-item::before {
    content: '';
    position: absolute;
    left: 0;
    width: 25px;
    height: 100%;
    background: #ffffff;
    border-radius: 4px 0 0 4px;
}

.table-item {
    width: 60px;
    height: 40px;
    background: #ffeb3b;
    border-radius: 4px;
    border-bottom: 8px solid #fbc02d;
}

.sofa-item {
    width: 90px;
    height: 45px;
    background: #43a047;
    border-radius: 8px 8px 4px 4px;
    position: relative;
}
.sofa-item::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 20px;
    background: rgba(0,0,0,0.1);
    border-radius: 8px 8px 0 0;
}

.tv-item {
    width: 70px;
    height: 50px;
    background: #333;
    border: 4px solid #555;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #4fc3f7;
    font-size: 20px;
}

.lamp-item {
    width: 20px;
    height: 50px;
    position: relative;
}
.lamp-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 5px;
    background: #333;
}
.lamp-item::after {
    content: '';
    position: absolute;
    top: 0;
    width: 30px;
    height: 25px;
    background: #fff176;
    border-radius: 50% 50% 0 0;
    left: -5px;
}

.toilet-item {
    width: 30px;
    height: 45px;
    background: white;
    border-radius: 4px;
    position: relative;
    border: 1px solid #ddd;
}
.toilet-item::before {
    content: '';
    position: absolute;
    top: -10px;
    width: 100%;
    height: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 2px;
}

/* More Furniture */
.fridge-item { width: 40px; height: 80px; background: #cfd8dc; border: 2px solid #90a4ae; border-radius: 4px; position: relative; }
.fridge-item::after { content: ''; position: absolute; top: 10px; right: 5px; width: 4px; height: 20px; background: #546e7a; border-radius: 2px; }

.stove-item { width: 50px; height: 50px; background: #37474f; border: 2px solid #263238; border-radius: 4px; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; gap: 5px; }
.stove-item div { background: #212121; border-radius: 50%; border: 1px solid #424242; }

.sink-item { width: 40px; height: 30px; background: #bdbdbd; border-radius: 4px; position: relative; }
.sink-item::after { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 8px; height: 12px; background: #9e9e9e; border-radius: 4px 4px 0 0; }

.cabinet-item { width: 60px; height: 40px; background: #8d6e63; border: 2px solid #5d4037; border-radius: 2px; }

.chair-item { width: 30px; height: 45px; background: #a1887f; border-radius: 2px; position: relative; }
.chair-item::before { content: ''; position: absolute; top: -20px; width: 100%; height: 20px; background: inherit; border-radius: 2px 2px 0 0; }

.microwave-item { width: 40px; height: 25px; background: #212121; border: 1px solid #424242; border-radius: 2px; position: relative; color: #4caf50; font-size: 8px; padding-left: 25px; }

.armchair-item { width: 60px; height: 50px; background: #e57373; border-radius: 10px 10px 5px 5px; position: relative; }
.armchair-item::before, .armchair-item::after { content: ''; position: absolute; top: 10px; width: 15px; height: 30px; background: rgba(0,0,0,0.1); border-radius: 5px; }
.armchair-item::before { left: 0; } .armchair-item::after { right: 0; }

.coffee-table-item { width: 60px; height: 20px; background: #8d6e63; border-bottom: 5px solid #5d4037; border-radius: 4px; }

.bookshelf-item { width: 70px; height: 90px; background: #5d4037; border: 3px solid #3e2723; display: flex; flex-direction: column; gap: 5px; padding: 5px; }
.bookshelf-item div { height: 15px; background: #8d6e63; width: 100%; border-radius: 1px; }

.rug-item { width: 120px; height: 80px; background: #7e57c2; border-radius: 50px; border: 4px dashed #9575cd; opacity: 0.8; }

.piano-item { width: 80px; height: 60px; background: #212121; border-radius: 4px; position: relative; }
.piano-item::after { content: ''; position: absolute; bottom: 5px; left: 5%; width: 90%; height: 10px; background: repeating-linear-gradient(90deg, #fff 0px, #fff 5px, #000 5px, #000 6px); }

.plant-item { width: 30px; height: 50px; position: relative; }
.plant-item::before { content: '🌿'; position: absolute; top: -15px; left: 0; font-size: 30px; }
.plant-item::after { content: ''; position: absolute; bottom: 0; width: 30px; height: 25px; background: #795548; border-radius: 0 0 10px 10px; }

.dresser-item { width: 70px; height: 60px; background: #a1887f; border: 2px solid #795548; display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.dresser-item div { height: 15px; background: rgba(0,0,0,0.1); width: 100%; }

.desk-item { width: 80px; height: 40px; background: #8d6e63; border-bottom: 10px solid #5d4037; position: relative; }
.desk-item::after { content: ''; position: absolute; right: 5px; top: 10px; width: 20px; height: 25px; background: rgba(0,0,0,0.1); }

.computer-item { width: 50px; height: 35px; background: #333; border: 2px solid #555; position: relative; color: #00e5ff; font-size: 8px; display: flex; align-items: center; justify-content: center; }

.gaming-chair-item { width: 40px; height: 60px; background: #212121; border: 2px solid #f44336; border-radius: 8px; position: relative; }

.bathtub-item { width: 100px; height: 45px; background: white; border: 2px solid #ddd; border-radius: 0 0 40px 40px; position: relative; overflow: hidden; }
.bathtub-item::after { content: ''; position: absolute; top: 5px; left: 5%; width: 90%; height: 80%; background: #e3f2fd; border-radius: 0 0 35px 35px; }

.shower-item { width: 60px; height: 100px; background: rgba(227, 242, 253, 0.5); border: 2px solid #90a4ae; border-radius: 4px; position: relative; }
.shower-item::after { content: '🚿'; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); }

.mirror-item { width: 40px; height: 60px; background: #e1f5fe; border: 4px solid #fbc02d; border-radius: 20px; box-shadow: inset 0 0 15px rgba(255,255,255,0.8); }

.painting-item { width: 60px; height: 45px; background: #4db6ac; border: 4px solid #795548; box-shadow: 2px 2px 5px rgba(0,0,0,0.2); }

.clock-item { width: 35px; height: 35px; background: white; border: 3px solid #555; border-radius: 50%; position: relative; }
.clock-item::after { content: ''; position: absolute; top: 50%; left: 50%; width: 2px; height: 10px; background: #333; transform-origin: top; transform: rotate(45deg); }

.fishtank-item { width: 70px; height: 40px; background: #03a9f4; border: 3px solid #333; border-radius: 4px; position: relative; overflow: hidden; }
.fishtank-item::after { content: '🐠'; position: absolute; animation: float-bg 3s infinite; }

.robot-vac-item { width: 30px; height: 30px; background: #333; border-radius: 50%; border: 2px solid #555; position: relative; }
.robot-vac-item::after { content: ''; position: absolute; top: 5px; right: 5px; width: 4px; height: 4px; background: #f44336; border-radius: 50%; }

.dogbed-item { width: 50px; height: 30px; background: #ffccbc; border-radius: 15px; border: 3px solid #ffab91; }

.fan-item { width: 50px; height: 50px; position: relative; }
.fan-item div { width: 100%; height: 100%; border: 2px solid #555; border-radius: 50%; position: relative; animation: rotate-slow 1s linear infinite; }
.fan-item div::after { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: #333; }
.fan-item div::before { content: ''; position: absolute; left: 50%; top: 0; height: 100%; width: 2px; background: #333; }

/* End of Background Decorations */
@keyframes float-bg {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(40px, 60px) rotate(15deg); }
}

@keyframes float-bg-alt {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-40px, 50px) rotate(-20deg); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

.brick-title {
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 8px;
    text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: 2px;
}

main {
    background: rgba(255, 249, 196, 0.85); /* More transparent to see outer background */
    backdrop-filter: blur(2px); 
    background-image: 
        linear-gradient(135deg, rgba(255, 235, 59, 0.15) 0%, rgba(255, 193, 7, 0.05) 100%),
        radial-gradient(circle at 10px 10px, rgba(251, 192, 45, 0.12) 4px, transparent 0);
    background-size: 100% 100%, 20px 20px;
    border-radius: 20px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    border: 2px solid #fbc02d;
}

.main-background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.scene, .info-section {
    position: relative;
    z-index: 2;
}

/* Spinning Circle of Minifigures */
.minifig-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 1;
    animation: circle-rotate 20s linear infinite;
}

.circle-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 70px;
    transform-origin: center center;
}

/* Position 8 minifigures in a circle */
.circle-item:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateY(-180px) rotate(0deg); }
.circle-item:nth-child(2) { transform: translate(-50%, -50%) rotate(45deg) translateY(-180px) rotate(-45deg); }
.circle-item:nth-child(3) { transform: translate(-50%, -50%) rotate(90deg) translateY(-180px) rotate(-90deg); }
.circle-item:nth-child(4) { transform: translate(-50%, -50%) rotate(135deg) translateY(-180px) rotate(-135deg); }
.circle-item:nth-child(5) { transform: translate(-50%, -50%) rotate(180deg) translateY(-180px) rotate(-180deg); }
.circle-item:nth-child(6) { transform: translate(-50%, -50%) rotate(225deg) translateY(-180px) rotate(-225deg); }
.circle-item:nth-child(7) { transform: translate(-50%, -50%) rotate(270deg) translateY(-180px) rotate(-270deg); }
.circle-item:nth-child(8) { transform: translate(-50%, -50%) rotate(315deg) translateY(-180px) rotate(-315deg); }

@keyframes circle-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.main-logo {
    position: absolute;
    top: 30px;
    left: 40px;
    font-size: 3rem;
    font-weight: 900;
    color: #e53935;
    letter-spacing: 8px;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.scene {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    perspective: 1000px;
}

/* Minifigure Styling */
.minifigure {
    position: relative;
    animation: bounce 2s ease-in-out infinite;
}

/* Head */
.head {
    width: 80px;
    height: 90px;
    background: linear-gradient(145deg, #ffeb3b, #fdd835);
    border-radius: 10px 10px 8px 8px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid #f9a825;
}

.head::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #fdd835;
    border-radius: 50% 50% 0 0;
    border: 3px solid #f9a825;
    border-bottom: none;
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.eye {
    width: 8px;
    height: 12px;
    background: #000;
    border-radius: 50%;
    position: absolute;
    top: 30px;
}

.left-eye {
    left: 20px;
}

.right-eye {
    right: 20px;
}

.smile {
    width: 30px;
    height: 15px;
    border: 3px solid #000;
    border-top: none;
    border-radius: 0 0 15px 15px;
    position: absolute;
    top: 55px;
}

/* Body */
.body {
    width: 90px;
    height: 80px;
    background: linear-gradient(145deg, #e53935, #c62828);
    margin: 5px auto 0;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 3px solid #b71c1c;
}

.torso {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    color: white;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 2px;
}

/* Arms */
.arm {
    width: 25px;
    height: 70px;
    background: linear-gradient(145deg, #e53935, #c62828);
    position: absolute;
    top: 95px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #b71c1c;
}

.left-arm {
    left: calc(50% - 80px);
    transform: rotate(-20deg);
    transform-origin: top center;
}

.right-arm {
    right: calc(50% - 80px);
    transform: rotate(20deg);
    transform-origin: top center;
}

.hand {
    width: 20px;
    height: 20px;
    background: #ffeb3b;
    border-radius: 50%;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid #f9a825;
}

/* BRICK Brick */
.brick-brick {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%) rotate(-15deg);
    animation: brick-hover 2s ease-in-out infinite;
}

.brick-top {
    width: 60px;
    height: 40px;
    background: linear-gradient(145deg, #2196f3, #1976d2);
    border-radius: 4px;
    position: relative;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.5);
    border: 3px solid #1565c0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    padding: 6px;
}

.stud {
    background: linear-gradient(145deg, #42a5f5, #1976d2);
    border-radius: 50%;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid #1565c0;
}

/* Legs */
.legs {
    width: 90px;
    height: 60px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    position: relative;
    top: 5px;
}

.leg {
    width: 40px;
    height: 60px;
    background: linear-gradient(145deg, #1976d2, #1565c0);
    border-radius: 5px 5px 8px 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #0d47a1;
}

/* Info Section */
.info-section {
    margin-top: 60px;
    text-align: center;
}

.info-section h2 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 20px;
}

.info-section > p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.feature {
    padding: 30px;
    background: linear-gradient(145deg, #f5f5f5, #eeeeee);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.feature.clickable {
    cursor: pointer;
    position: relative;
}

.feature.clickable::after {
    content: '👆 Click me!';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature.clickable:hover::after {
    opacity: 1;
}

.feature.clickable:hover {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.feature.clickable:hover .icon {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.feature.clickable:hover h3,
.feature.clickable:hover p {
    color: white;
}

.icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.feature h3 {
    font-size: 1.5rem;
    color: #764ba2;
    margin-bottom: 10px;
}

.feature p {
    color: #666;
    font-size: 1rem;
}

footer {
    text-align: center;
    padding: 30px;
    color: white;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: block;
}

.modal-content {
    background: white;
    margin: 3% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.4s ease;
}

.modal-content h2 {
    color: #667eea;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 30px;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: #667eea;
}

.instructions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.instruction-card {
    background: linear-gradient(145deg, #f9f9f9, #efefef);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.instruction-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.instruction-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.instruction-icon {
    font-size: 2.5rem;
    min-width: 50px;
}

.instruction-header h3 {
    flex: 1;
    color: #333;
    font-size: 1.5rem;
    margin: 0;
}

.toggle-steps {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.toggle-steps:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.steps-container {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.steps-container.hidden {
    max-height: 0;
    opacity: 0;
}

.step {
    background: white;
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    margin: 10px 0;
    border-radius: 8px;
    display: flex;
    align-items: start;
    gap: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.step p {
    margin: 0;
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    padding-top: 5px;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes brick-hover {
    0%, 100% {
        transform: translateX(-50%) rotate(-15deg) translateY(0);
    }
    50% {
        transform: translateX(-50%) rotate(-15deg) translateY(-5px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .brick-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    main {
        padding: 40px 20px;
    }
    
    .info-section h2 {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
}

