:root {
    --bg-main: #f2efe8;
    --bg-accent: #f6ead7;
    --card: rgba(255, 255, 255, 0.88);
    --card-strong: #ffffff;
    --ink: #1d2430;
    --muted: #5a6775;
    --line: #d7d2c8;
    --accent: #0a7f8f;
    --accent-strong: #075f6b;
    --accent-soft: #d9eff2;
    --warning: #c4451c;
    --ok: #1f8a4d;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-card: 0 18px 45px rgba(24, 37, 53, 0.12);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background:
        radial-gradient(1400px 700px at -10% -20%, #fff4d6 0%, rgba(255, 244, 214, 0) 58%),
        radial-gradient(1100px 600px at 105% 10%, #d8eff3 0%, rgba(216, 239, 243, 0) 60%),
        linear-gradient(135deg, var(--bg-main), var(--bg-accent));
    line-height: 1.45;
    position: relative;
    overflow-x: hidden;
}

.orb {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    filter: blur(32px);
    pointer-events: none;
    animation: orbit 16s ease-in-out infinite;
}

.orb-one {
    width: 260px;
    height: 260px;
    top: 8vh;
    left: -60px;
    background: rgba(255, 204, 124, 0.35);
}

.orb-two {
    width: 320px;
    height: 320px;
    right: -90px;
    bottom: 8vh;
    background: rgba(96, 188, 201, 0.28);
    animation-delay: -7s;
}

.app-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 40px));
    margin: 28px auto 34px;
}

.site-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.62));
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow-card);
}

.brand-block h1 {
    margin: 0;
    font-size: clamp(1.5rem, 1.4rem + 0.75vw, 2rem);
    letter-spacing: -0.02em;
}

.eyebrow {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.74rem;
    color: var(--accent);
    font-weight: 700;
}

.top-nav {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.top-nav a {
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
    padding: 8px 13px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 180ms ease;
}

.top-nav a:hover {
    color: var(--accent-strong);
    border-color: rgba(10, 127, 143, 0.28);
    background: rgba(255, 255, 255, 0.62);
}

.top-nav a.active {
    color: #fff;
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    box-shadow: 0 10px 20px rgba(10, 127, 143, 0.24);
}

.content {
    margin-top: 18px;
}

.section {
    margin-top: 16px;
    padding: 18px 18px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.56);
    background: var(--card);
    box-shadow: var(--shadow-card);
    animation: rise-in 420ms ease both;
}

.section:nth-of-type(2) {
    animation-delay: 70ms;
}

.section:nth-of-type(3) {
    animation-delay: 120ms;
}

h2,
h3 {
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.meta {
    color: var(--muted);
    margin: 8px 0;
}

code,
pre,
textarea,
input,
select,
button {
    font-family: "JetBrains Mono", "Consolas", monospace;
}

code {
    background: #eff3f5;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.9em;
}

form:not(.inline-form) {
    margin-top: 10px;
}

label strong {
    color: #2a3340;
}

input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    margin-top: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px 11px;
    color: var(--ink);
    font-size: 0.94rem;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

select {
    width: auto;
    min-width: 220px;
}

textarea {
    min-height: 280px;
    resize: vertical;
    line-height: 1.5;
}

textarea.is-hidden {
    display: none;
}

.code-editor {
    margin-top: 6px;
    min-height: 280px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    overflow: hidden;
}

.code-editor:focus-within {
    border-color: rgba(10, 127, 143, 0.65);
    box-shadow: 0 0 0 3px rgba(10, 127, 143, 0.15);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(10, 127, 143, 0.65);
    box-shadow: 0 0 0 3px rgba(10, 127, 143, 0.15);
}

button {
    border: 0;
    border-radius: 11px;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(120deg, var(--accent-strong), var(--accent));
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(7, 95, 107, 0.22);
    filter: saturate(1.06);
}

button:active {
    transform: translateY(0);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-strong);
}

th,
td {
    padding: 10px 11px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid #ebe6dc;
}

th {
    background: #f7f5ef;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #485361;
}

tr:last-child td {
    border-bottom: 0;
}

tr:hover td {
    background: #fcfbf8;
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.87rem;
}

.statement {
    padding: 14px;
    border: 1px solid #e7e2d7;
    border-radius: var(--radius-md);
    background: #fffdfa;
    white-space: normal;
}

.error,
.success {
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.error {
    color: var(--warning);
    background: #fff0eb;
    border-color: #f6c8b9;
}

.success {
    color: var(--ok);
    background: #ecfbf1;
    border-color: #bfe8cd;
}

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

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

.inline-form {
    display: inline-block;
    margin-right: 8px;
    margin-top: 2px;
}

.inline-form button {
    padding: 7px 10px;
    font-size: 0.78rem;
}

@media (max-width: 860px) {
    .app-shell {
        width: calc(100% - 22px);
        margin: 16px auto 26px;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
    }

    .top-nav a {
        padding: 7px 11px;
    }

    .section {
        padding: 14px;
    }

    select {
        width: 100%;
    }

    textarea {
        min-height: 220px;
    }

    th,
    td {
        padding: 8px;
    }

    .inline-form {
        margin-bottom: 6px;
    }
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes orbit {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -14px, 0);
    }
}
