* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #090d12;
    --panel: #141b25;
    --panel-strong: #1d2633;
    --line: rgba(190, 255, 135, 0.2);
    --text: #f4f8fb;
    --muted: #c8d2dc;
    --accent: #b8ff70;
    --button: #2563eb;
    --button-hover: #1d4ed8;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
        radial-gradient(circle at 20% 10%, rgba(184, 255, 112, 0.14), transparent 28rem),
        linear-gradient(145deg, #06080d 0%, var(--bg) 45%, #111827 100%);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-header,
.site-footer {
    width: 100%;
    text-align: center;
    background: rgba(29, 38, 51, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
    border-style: solid;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.site-header {
    padding: 1.5rem 1rem;
    border-width: 0 0 1px;
}

.site-footer {
    margin-top: auto;
    padding: 1rem;
    border-width: 1px 0 0;
    color: #d9e2eb;
}

h1,
h2 {
    margin: 0;
    line-height: 1.15;
}

h1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 1.5rem;
}

.page {
    width: min(100%, 44rem);
    padding: 1.5rem 1rem 2rem;
}

.panel {
    width: 100%;
    margin: 0 0 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(20, 27, 37, 0.92);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.panel p {
    margin: 0.45rem 0;
    color: var(--muted);
}

.panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.panel li {
    margin: 0.45rem 0;
    color: var(--muted);
}

.accent {
    color: var(--accent);
    font-weight: 700;
}

input,
textarea,
button {
    width: 100%;
    min-height: 46px;
    border-radius: 8px;
    font: inherit;
}

input,
textarea {
    margin-bottom: 1rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--panel-strong);
    color: var(--text);
}

textarea {
    min-height: 7rem;
    resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible {
    outline: 3px solid rgba(184, 255, 112, 0.42);
    outline-offset: 2px;
}

button {
    border: 0;
    background: var(--button);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

button:hover {
    background: var(--button-hover);
}

button:active {
    transform: translateY(1px);
}

.guestbook-form {
    display: flex;
    flex-direction: column;
}

.guestbook-message {
    margin-top: 1rem;
    color: var(--accent);
}

.guestbook-entries {
    margin-top: 1.5rem;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.retro {
    filter: contrast(1.2) brightness(0.9);
    animation: crt-flicker 0.1s infinite;
}
@keyframes crt-flicker {
    0% { opacity: 0.98; }
    50% { opacity: 1; }
    100% { opacity: 0.98; }
}
.disco {
    animation: disco-bg 1s infinite;
}
@keyframes disco-bg {
    0% { background-color: red; }
    25% { background-color: yellow; }
    50% { background-color: blue; }
    75% { background-color: green; }
    100% { background-color: red; }
}
.mouth {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    border: 2px solid black;
    border-top: none;
    border-radius: 0 0 50% 50%;
}

.smiley {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 3rem;
    margin: 0 0.25rem;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(184, 255, 112, 0.14), 0 10px 28px rgba(184, 255, 112, 0.24);
}

.eye {
    position: absolute;
    top: 0.8rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    background: #05070a;
    transition: transform 0.18s ease;
}

.eye.left {
    left: 0.78rem;
}

.eye.right {
    right: 0.78rem;
}
.mouth-happy {
    border-radius: 0 0 50% 50%;
}
.mouth-sad {
    border-radius: 50% 50% 0 0;
    border-bottom: none;
    border-top: 2px solid black;
    top: 35px;
    bottom: auto;
}
.mouth-angry {
    height: 5px;
    background: black;
    border: none;
}
.mouth-scared {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: none;
    border: 2px solid black;
}
@media (prefers-reduced-motion: reduce) {
    *, .pulse, .disco, .retro {
        animation: none !important;
        transition: none !important;
    }
}
