/* 기본 스타일 리셋 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: white;
    overflow: hidden;
    height: 100vh;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    cursor: pointer;
}

.pasta-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pasta-noodle {
    position: absolute;
    width: 4px;
    height: 200px;
    background: linear-gradient(45deg, #FFD700, #FFA500);
    border-radius: 2px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    animation: arrowFall 0.5s linear forwards;
    transform-origin: top center;
}

@keyframes arrowFall {
    0% {
        transform: translateY(-200px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
}

/* 주택 스타일 */
.house-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 300px;
    opacity: 0;
    transition: opacity 1s ease;
}

.house-container.show {
    opacity: 1;
}

.house {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 기초 */
.foundation {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: #ffffff;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.foundation.show {
    opacity: 1;
}

/* 지붕 서까래들 */
.roof-rafter {
    position: absolute;
    width: 4px;
    height: 200px;
    background: #ffc800;
    opacity: 0;
    transition: opacity 0.5s ease;
    transform-origin: bottom center;
}

.roof-rafter.show {
    opacity: 1;
}

/* 벽 뼈대 (세로 기둥들) */
.wall-frame {
    position: absolute;
    bottom: 0;
    width: 8px;
    height: 200px;
    background:#ffc800;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.wall-frame.show {
    opacity: 1;
}

/* 가로 보들 */
.horizontal-beam {
    position: absolute;
    height: 8px;
    background: #ffc800;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.horizontal-beam.show {
    opacity: 1;
}

/* 문틀 */
.door-frame {
    position: absolute;
    bottom: 0;
    width: 80px;
    height: 200px;
    border: 4px solid #d4a600;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.door-frame.show {
    opacity: 1;
}

/* 창문틀들 */
.window-frame {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 4px solid #d4a600;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.window-frame.show {
    opacity: 1;
}

/* 굴뚝 뼈대 */
.chimney-frame {
    position: absolute;
    top: 20px;
    right: 50px;
    width: 30px;
    height: 60px;
    border: 4px solid #ffc800;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.chimney-frame.show {
    opacity: 1;
}

/* 정원 */
.garden {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    height: 30px;
    background: #90EE90;
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.garden.show {
    opacity: 1;
}

/* 크림소스 스타일 */
.cream-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.cream-container.show {
    opacity: 1;
}

.cream-drop {
    position: absolute;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #FFF8DC 0%, #F0E68C 50%, #FFF8DC 100%);
    border-radius: 50%;
    animation: creamFall 1.2s ease-in forwards;
    box-shadow: 
        0 0 20px rgba(255, 248, 220, 0.9),
        0 0 40px rgba(255, 248, 220, 0.6);
}

@keyframes creamFall {
    0% {
        transform: translateY(-20px);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* 완성된 크림 파스타 주택 */
.completed-house-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 300px;
    opacity: 0;
    transition: opacity 2s ease;
}

.completed-house-container.show {
    opacity: 1;
}

.completed-house {
    position: relative;
    width: 100%;
    height: 100%;
}

.cream-house-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    background: linear-gradient(45deg, 
        #FFF8DC 0%, 
        #F0E68C 20%, 
        #FFF8DC 40%, 
        #FFE4B5 60%, 
        #FFF8DC 80%, 
        #F0E68C 100%);
    border-radius: 10px 10px 0 0;
    box-shadow: 
        inset 0 0 30px rgba(255, 255, 255, 0.4),
        0 5px 20px rgba(0, 0, 0, 0.2);
    border: 3px solid #F0E68C;
}

.cream-house-roof {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 200px solid transparent;
    border-right: 200px solid transparent;
    border-bottom: 100px solid #FFF8DC;
    filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.2));
}

.cream-house-door {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 120px;
    background: linear-gradient(45deg, #FFF8DC, #F0E68C);
    border-radius: 30px 30px 0 0;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.3);
    border: 2px solid #F0E68C;
}

.cream-house-window {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #FFF8DC, #F0E68C);
    border-radius: 10px;
    border: 4px solid #F0E68C;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.4);
}

.cream-house-window::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #F0E68C;
}

.cream-house-window::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #F0E68C;
}

.cream-house-chimney {
    position: absolute;
    top: 20px;
    right: 50px;
    width: 30px;
    height: 60px;
    background: linear-gradient(45deg, #FFF8DC, #F0E68C);
    border: 2px solid #F0E68C;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.cream-house-garden {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    height: 30px;
    background: #90EE90;
    border-radius: 20px;
}

/* 크림이 흘러내리는 효과 */
.cream-drip {
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, #FFF8DC 0%, #F0E68C 100%);
    border-radius: 0 0 4px 4px;
    animation: dripDown 1.8s ease-in forwards;
    box-shadow: 0 0 15px rgba(255, 248, 220, 0.8);
}

@keyframes dripDown {
    0% {
        height: 0;
        opacity: 1;
    }
    100% {
        height: 60px;
        opacity: 0.8;
    }
}

/* 줌인 효과 */
.container.zoom-in {
    transform: scale(2);
    transform-origin: center center;
    transition: transform 3s ease;
}

/* 환영 팻말 스타일 */
.welcome-sign {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 2s ease;
    z-index: 20;
}

.welcome-sign.show {
    opacity: 1;
}

.bacon-sign {
    background: linear-gradient(45deg, 
        #FFFFFF 0%, 
        #b15310 20%, 
        #eca46a 40%, 
        #A0522D 60%, 
        #FFFFFF 80%, 
        #8B4513 100%);
    padding: 25px 50px;
    border-radius: 20px;
    border: 6px solid #8B4513;
    box-shadow: 
        0 15px 40px rgba(139, 69, 19, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.4);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    animation: baconWiggle 2s ease-in-out infinite;
}

.bacon-sign:hover {
    transform: scale(1.05);
    animation-play-state: paused;
}

.bacon-sign::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 20px solid #8B4513;
}

.bacon-text {
    color: #8B4513;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    text-align: center;
    font-family: 'Georgia', serif;
}

@keyframes baconWiggle {
    0%, 100% {
        transform: rotate(-1deg);
    }
    25% {
        transform: rotate(1deg);
    }
    50% {
        transform: rotate(-0.5deg);
    }
    75% {
        transform: rotate(0.5deg);
    }
}