:root {
    --bg-initial: oldlace;
    --bg-game-1: #E0B0FF; /* Mauve */
    --bg-game-2: #D8BFD8; /* Thistle */
    --bg-game-3: #DA70D6; /* Orchid */
    --text-silver: silver;
    --text-copyright: #808088;
    --font-main: 'Helvetica', 'Arial', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: env(safe-area-inset-top, 30px) env(safe-area-inset-right, 16px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 16px);
    box-sizing: border-box;
    font-family: var(--font-main);
    background-color: var(--bg-initial);
    overflow: hidden; /* Prevent scrollbars from pew pew elements */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    transition: background-color 1s ease;
}

/* Lava Lamp Effect */
body.game-active {
    background: linear-gradient(135deg, var(--bg-game-1), var(--bg-game-2), var(--bg-game-3), var(--bg-game-1));
    background-size: 400% 400%;
    animation: lavaLamp 8s ease infinite;
}

@keyframes lavaLamp {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Initial Content Container */
#initial-content {
    text-align: center;
    width: min(90vw, 800px);
    transition: opacity 0.3s ease;
    z-index: 10;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    color: #333;
}

h1 {
    color: var(--text-silver);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin: 0.5rem 0;
}

h6 {
    font-size: clamp(0.8rem, 2vw, 1rem);
    margin: 1rem 0;
    color: #555;
    font-weight: normal;
}

p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-top: 2rem;
    color: #444;
}

/* Inline Span Styles */
.wobble {
    display: inline-block;
    animation: wobbleAnimation 0.6s ease-in-out infinite;
}

@keyframes wobbleAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

.big {
    font-size: 1.15em;
}

.moody-mauve {
    color: #DA70D6; /* Orchid/Mauve color */
}

.embolden {
    font-weight: bold;
}

/* Pew Pew Elements */
.pewpew {
    position: absolute;
    pointer-events: none; /* Let clicks pass through */
    font-weight: bold;
    white-space: nowrap;
    animation: pewLifecycle 4.5s forwards;
    z-index: 5;
}

@keyframes pewLifecycle {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: brightness(1);
    }
    20% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    50% {
        filter: brightness(2); /* Brighten */
    }
    80% {
        opacity: 0.8;
        filter: brightness(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5); /* Fade out and slight grow */
    }
}

/* End Screen Elements */
#end-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.end-h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #333;
    margin-bottom: 0.5rem;
    animation: fadeIn 1s ease forwards;
}

.end-h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: #555;
    margin-top: 0;
    transform: translateX(40px); /* Nudged to the right */
    animation: fadeIn 1s ease forwards 0.5s; /* Slight delay */
    opacity: 0; /* Start hidden for animation */
}

.end-copyright {
    color: var(--text-copyright);
    font-size: 0.9rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px) translateX(var(--tx, 0)); }
    to { opacity: 1; transform: translateY(0) translateX(var(--tx, 0)); }
}
