* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    overflow: hidden;
    background: #5D3A1A;
    font-family: 'Nunito', sans-serif;
}

#canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
}

#ui-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(145deg, rgba(210, 180, 140, 0.95), rgba(180, 150, 110, 0.95));
    border-radius: 30px;
    border: 6px solid #8B4513;
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
    pointer-events: auto;
    max-width: 90vw;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        transform: scale(0.8) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

.title {
    font-family: 'Lilita One', cursive;
    font-size: clamp(48px, 12vw, 80px);
    color: #5D3A1A;
    text-shadow: 
        3px 3px 0 #DAA520,
        6px 6px 0 rgba(0, 0, 0, 0.2);
    text-align: center;
    line-height: 1;
}

.poop-bounce {
    font-size: clamp(60px, 15vw, 100px);
    animation: bounce 1s ease-in-out infinite;
}

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

.tagline {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 700;
    color: #8B4513;
    font-style: italic;
}

.toilet-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    font-family: 'Lilita One', cursive;
    font-size: clamp(20px, 5vw, 28px);
    color: #FFF8DC;
    background: linear-gradient(180deg, #8B4513 0%, #6B3410 100%);
    border: 4px solid #5D3A1A;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 
        0 6px 0 #4A2F15,
        0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
}

.toilet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 0 #4A2F15,
        0 12px 25px rgba(0, 0, 0, 0.35);
}

.toilet-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 2px 0 #4A2F15,
        0 4px 10px rgba(0, 0, 0, 0.25);
}

.btn-icon {
    font-size: clamp(24px, 6vw, 36px);
}

.high-score-display {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(14px, 3.5vw, 18px);
    font-weight: 700;
    color: #6B3410;
}

.game-over-title {
    font-family: 'Lilita One', cursive;
    font-size: clamp(36px, 9vw, 56px);
    color: #5D3A1A;
    text-shadow: 2px 2px 0 #DAA520;
}

.score-display {
    text-align: center;
    font-weight: 700;
    color: #5D3A1A;
}

.score-display p {
    font-size: clamp(16px, 4vw, 22px);
    margin: 8px 0;
}

.high-score-text {
    color: #8B4513;
}

.new-record {
    font-family: 'Lilita One', cursive;
    font-size: clamp(18px, 4.5vw, 26px);
    color: #DAA520;
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

#score-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: rgba(210, 180, 140, 0.9);
    border-radius: 50px;
    border: 4px solid #8B4513;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

#score {
    font-family: 'Lilita One', cursive;
    font-size: clamp(32px, 8vw, 48px);
    color: #5D3A1A;
    transition: transform 0.1s ease;
}

#score.score-bump {
    transform: scale(1.2);
}

.score-poop {
    font-size: clamp(28px, 7vw, 40px);
}

#footer-link {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 248, 220, 0.6);
    text-decoration: none;
    z-index: 100;
    transition: color 0.2s ease;
}

#footer-link:hover {
    color: rgba(255, 248, 220, 0.9);
}

@media (max-height: 600px) {
    .screen {
        gap: 12px;
        padding: 20px;
    }
    
    .poop-bounce {
        font-size: 50px;
    }
}