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

:root {
    --bg: #0a0a0c;
    --text: #d4d0c8;
    --text-dim: #6b6860;
    --text-ghost: #2a2825;
    --accent: #8a8070;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Cormorant Garamond', serif;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

/* The void — where messages float */
.void {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.letter {
    position: absolute;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.6;
    max-width: 500px;
    color: var(--text);
    opacity: 0;
    animation: drift var(--duration) ease-in-out forwards;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(212, 208, 200, 0.05);
}

.letter.night {
    letter-spacing: 0.5px;
    font-size: 20px;
    font-style: italic;
}

.letter.day {
    font-size: 16px;
    letter-spacing: 0;
}

@keyframes drift {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    8% {
        opacity: var(--max-opacity);
    }
    85% {
        opacity: var(--max-opacity);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Compose */
.compose {
    position: fixed;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    padding: 0 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-ghost);
    color: var(--text);
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 300;
    padding: 12px 0;
    outline: none;
    transition: border-color 0.3s;
}

.message-input::placeholder {
    color: var(--text-dim);
    font-style: italic;
}

.message-input:focus {
    border-color: var(--accent);
}

.char-count {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: var(--text-ghost);
    min-width: 24px;
    text-align: right;
}

/* Footer */
.site-footer {
    position: fixed;
    bottom: 12px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.footer-text {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    color: var(--text-ghost);
    letter-spacing: 2px;
}

/* Time-of-day themes */
body.time-night {
    --bg: #060608;
    --text: #c8c4bc;
    --text-dim: #555048;
    --text-ghost: #1e1c18;
    --accent: #7a7060;
}

body.time-late {
    --bg: #04040a;
    --text: #b8b4ac;
    --text-dim: #3a3630;
    --text-ghost: #151310;
    --accent: #605848;
}

body.time-morning {
    --bg: #0c0c0e;
    --text: #d8d4cc;
    --text-dim: #787068;
    --text-ghost: #2e2c28;
    --accent: #9a9080;
}

body.time-day {
    --bg: #0e0e10;
    --text: #c0bcb4;
    --text-dim: #8a8278;
    --text-ghost: #343230;
    --accent: #a89888;
}

/* Responsive */
@media (max-width: 480px) {
    .letter {
        font-size: 16px;
        max-width: 85vw;
    }

    .letter.night {
        font-size: 18px;
    }

    .message-input {
        font-size: 16px;
    }
}
