body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
    margin: 0;
    padding: clamp(3.5rem, 6vh, 5rem) 1.5rem clamp(2.5rem, 6vh, 3.5rem);
    background-color: #f4f4f4;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    transition: all 0.5s ease;
    text-align: center;
    user-select: none;
    position: relative;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* THEME: He is gone */
body.gone {
    background-color: #000;
    color: #fff;
}

/* TOP TITLE */
.site-title {
    position: absolute;
    top: clamp(1rem, 3vh, 2rem);
    left: 0;
    right: 0;
    text-align: center;
    font-size: clamp(1.2rem, 4vw, 2rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: inherit;
    opacity: 0.5;
    z-index: 0;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.75rem, 2.2vh, 1.35rem);
    width: min(100%, 720px);
}

/* THE EMOTICON WRAPPER */
.icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: clamp(6rem, 25vw, 12rem);
    width: 100%;
}

#mood-icon {
    /* 1. SQUARE SHAPE (Anti-wobble) */
    width: 1.2em;
    height: 1.2em;

    /* 2. CENTER TEXT */
    display: flex;
    justify-content: center;
    align-items: center;

    /* 3. ROTATE & NUDGE */
    transform: rotate(90deg);

    /* VISUAL CENTERING FIX: Shift slightly right */
    margin-left: 0.15em;

    /* Styling */
    font-size: clamp(4rem, 18vw, 7rem);
    font-weight: bold;
    letter-spacing: -5px;
    line-height: 1;

    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* THE BIG SMILE STATE */
body.gone #mood-icon {
    font-size: clamp(8rem, 28vw, 16rem);
    transform: rotate(90deg) scale(1.2);
    margin-left: 0; /* Remove nudge when huge to keep it centered */
    color: #fff;
}

h1 {
    font-size: clamp(4.5rem, 15vw, 12rem);
    margin: 0;
    line-height: 0.9;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

.sub-text {
    font-size: clamp(0.95rem, 3.6vw, 1.4rem);
    margin: 0;
    color: inherit;
    font-weight: 400;
    max-width: 600px;
    padding: 0 20px;
    opacity: 0.8;
}

.countdown-container {
    margin-top: 0.25rem;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    transition: opacity 0.5s ease;
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    opacity: 0.5;
    font-weight: 600;
}

.countdown-timer {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}

.donation {
    margin-top: 0.25rem;
}

.donation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 2px solid currentColor;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.donation-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.timestamp {
    font-size: 0.78rem;
    margin-top: 0.25rem;
    opacity: 0.6;
    z-index: 10;
    padding-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

a:hover {
    opacity: 1;
}

/* Hide ONLY the countdown when he is gone */
body.gone .countdown-container {
    display: none;
}

body.gone .site-title {
    opacity: 1;
}

/* Ensure link is visible and white in dark mode */
body.gone a {
    color: #fff;
}

body.gone .donation-link {
    border-color: #fff;
}

.loading {
    opacity: 0.5;
}

@media (max-width: 520px) {
    body {
        padding-top: clamp(2.5rem, 8vh, 4rem);
    }

    h1 {
        font-size: clamp(3.6rem, 17vw, 8rem);
    }

    .icon-container {
        height: clamp(5rem, 22vw, 9rem);
    }
}