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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(180deg, #89B4D8 0%, #B8D4A8 100%);
    min-height: 100vh;
    overflow: hidden;
    touch-action: none;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Start Screen - 1910s Swedish summer feel */
#start-screen {
    background: linear-gradient(180deg, #E8D4B8 0%, #C4A882 30%, #89B4D8 70%, #B8D4A8 100%);
}

#start-screen h1 {
    font-size: clamp(2rem, 8vw, 4rem);
    color: #5D3A1A;
    text-shadow: 2px 2px 0 #D4A574, 4px 4px 8px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    text-align: center;
    font-style: italic;
}

#preview-canvas {
    margin: 20px 0;
    animation: bounce 1s ease-in-out infinite;
}

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

#start-screen p {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: #5D3A1A;
    text-align: center;
    margin: 10px 0;
}

button {
    font-family: 'Georgia', serif;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    padding: 15px 50px;
    margin-top: 30px;
    background: linear-gradient(180deg, #8B2323 0%, #6B1A1A 100%);
    border: 4px solid #3D2817;
    border-radius: 8px;
    color: #F5F5DC;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 6px 0 #3D2817;
    text-transform: uppercase;
    letter-spacing: 2px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #3D2817;
    background: linear-gradient(180deg, #A52A2A 0%, #8B2323 100%);
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #3D2817;
}

.instructions {
    margin-top: 30px;
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    color: #6B4A2A;
}

.instructions .desktop-hint {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    opacity: 0.7;
    margin-top: 5px;
}

/* Hide desktop hint on touch devices */
@media (hover: none) and (pointer: coarse) {
    .instructions .desktop-hint {
        display: none;
    }
}

/* Game Screen - Swedish summer sky */
#game-screen {
    background: linear-gradient(180deg, #89B4D8 0%, #A8C8DC 50%, #B8D4A8 100%);
    padding: 0;
}

#score-display {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    z-index: 10;
    text-shadow: 2px 2px 0 rgba(255,255,255,0.9);
    color: #3D2817;
    font-weight: bold;
}

#game-canvas {
    width: 100%;
    height: 100%;
}

/* End Screen - Warm Swedish summer evening */
#end-screen {
    background: linear-gradient(180deg, #E8C87A 0%, #D4A574 40%, #B8896A 100%);
}

#end-screen h1 {
    font-size: clamp(2.5rem, 10vw, 5rem);
    color: #5D3A1A;
    text-shadow: 2px 2px 0 #E8C87A, 4px 4px 8px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    font-style: italic;
}

.final-score {
    background: rgba(245, 245, 220, 0.9);
    padding: 20px 40px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    border: 3px solid #8B2323;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
}

.final-score p {
    font-size: clamp(1.2rem, 4vw, 2rem);
    color: #3D2817;
    margin: 10px 0;
}

.celebration {
    font-size: clamp(3rem, 10vw, 6rem);
    animation: celebrate 0.5s ease-in-out infinite alternate;
}

@keyframes celebrate {
    0% { transform: scale(1) rotate(-10deg); }
    100% { transform: scale(1.2) rotate(10deg); }
}

/* Touch areas for mobile */
.touch-left, .touch-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 5;
}

.touch-left {
    left: 0;
}

.touch-right {
    right: 0;
}
