/* MIAU - AUTOPOET/app/style.css -- the colours and the type of the homepage (poetomat.mur.at styles.css) */

:root {
    --c-black: #000000;
    --c-void: #0a0a14;
    --c-gray: #888888;

    --c-electric-blue: #0087ff;
    --c-neon-cyan: #00ffff;
    --c-bright-cyan: #5fffff;
    --c-neon-pink: #ff00d7;
    --c-hot-pink: #ff5faf;
    --c-neon-magenta: #ff00ff;
    --c-neon-yellow: #ffff87;
    --c-neon-green: #87ff00;

    --color-logo: var(--c-neon-cyan);
    --color-menu: var(--c-neon-pink);
    --color-menu-selected: var(--c-bright-cyan);
    --color-info: var(--c-electric-blue);
    --color-warning: var(--c-neon-yellow);
    --color-accent: var(--c-hot-pink);
    --color-generated: var(--c-neon-magenta);
    --color-connected: var(--c-neon-green);
    --color-body-text: #d6faff;

    --text-size: clamp(1.0156rem, 0.6875rem + 0.525vw, 1.5625rem);   /* +25 %: every text of the app (the label has its own size) */
    --font: "Courier New", Courier, monospace;
    /* the logo's block letters: a font that has them, all as wide as each other */
    --font-logo: "MiauLogo", ui-monospace, Menlo, Consolas, "DejaVu Sans Mono", monospace;
    --footer-height: 3.4rem;
}

/* the logo's block letters (█ ═ ║ ╔ ╗ ╚ ╝ and the blank, all equally wide): a few glyphs of DejaVu Sans Mono
   -- Android's own monospace fonts lack some of them, the rows would shift */
@font-face {
    font-family: "MiauLogo";
    src: url("vendor/miau-logo.woff2") format("woff2");
    font-display: block;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--c-black);
}

body {
    background: radial-gradient(ellipse at 50% -10%, var(--c-void) 0%, var(--c-black) 60%);
    background-attachment: fixed;
    color: var(--color-body-text);
    font-family: var(--font);
    font-size: var(--text-size);
    line-height: 1.4;
    min-height: 100vh;
    padding-bottom: calc(var(--footer-height) + env(safe-area-inset-bottom));
    -webkit-tap-highlight-color: transparent;
}

pre,
p,
button,
input {
    font-family: var(--font);
    font-size: var(--text-size);
}

[hidden] {
    display: none !important;
}

/* ---- header: the logo --------------------------------------------------------- */

header {
    padding: calc(0.9rem + env(safe-area-inset-top)) 0.8rem 0.7rem;
    border-bottom: 2px solid var(--color-info);
    background: var(--c-black);          /* solid: nothing shows through (21.10.2026) */
    overflow: hidden;
}

.logo {
    margin: 0 auto;
    width: max-content;
    max-width: 100%;
    font-family: var(--font-logo);
    line-height: 1;
    letter-spacing: 0;
    white-space: pre;
    color: var(--color-logo);
    transition: color 2.5s ease-in-out, opacity 2.5s ease-in-out;
    user-select: none;
}

.logo.logo-blink {
    opacity: 0.92;
}

/* ---- the screens -------------------------------------------------------------- */

main {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 1.2rem 1rem 1.5rem;
}

.screen {
    display: none;
}

.screen.active {
    display: block;
}

h2 {
    margin: 1.4rem 0 0.5rem;
    font-size: var(--text-size);
    font-weight: normal;
    color: var(--color-info);
    letter-spacing: 0.08em;
}

h2:first-child {
    margin-top: 0;
}

/* ---- poet --------------------------------------------------------------------- */

.press {
    display: block;
    width: 100%;
    padding: 1.1rem 1rem;
    border: 1px solid var(--color-generated);
    background: transparent;
    color: var(--color-generated);
    cursor: pointer;
    letter-spacing: 0.08em;
}

@media (hover: hover) {
    .press:hover {
        background: var(--color-generated);
        color: var(--c-black);
    }

    .tab:hover {
        color: var(--color-menu-selected);
        border-color: var(--color-menu-selected);
    }
}

.press:active {
    background: var(--color-generated);
    color: var(--c-black);
}

.press:disabled {
    opacity: 0.4;
    cursor: default;
}

.notice {
    margin: 1rem 0 0;
    color: var(--color-warning);
    white-space: pre-wrap;
}

.result {
    margin-top: 1.5rem;
}

.poem {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--color-generated);
    line-height: 1.55;
}

/* the label: POETOMATIN's print, its pixels as they are (no smoothing) */
.label {
    display: block;
    width: 100%;
    max-width: 432px;
    margin: 0 auto;
    image-rendering: pixelated;
    cursor: zoom-in;
}

/* the label on the whole screen -- white like the paper */
.full {
    position: fixed;
    inset: 0;
    z-index: 60;
    overflow-y: auto;
    background: #ffffff;
    cursor: zoom-out;
}

.full img {
    display: block;
    width: 100%;
    image-rendering: pixelated;
}

/* ---- tune --------------------------------------------------------------------- */

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.choices button,
button.small,
.stations button {
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-menu);
    background: transparent;
    color: var(--color-menu);
    cursor: pointer;
}

.choices button.on {
    color: var(--c-black);
    background: var(--color-menu-selected);
    border-color: var(--color-menu-selected);
}

.choices button:disabled {
    opacity: 0.35;
    cursor: default;
}

button.small {
    margin-top: 0.8rem;
    border-color: var(--c-gray);
    color: var(--c-gray);
}

/* TUNE's last line: back to the homepage (01.11.2026) */
a.homepage {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 1.6rem 0 0.4rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-menu);
    color: var(--color-menu);
    font-family: var(--font);
    font-size: var(--text-size);
    text-decoration: none;
}

.now {
    margin: 0 0 0.5rem;
    color: var(--color-menu-selected);
}

.hint {
    margin: 0.5rem 0 0;
    color: var(--c-gray);
    font-size: calc(var(--text-size) * 0.9);
    white-space: pre-wrap;
}

input[type="search"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--color-accent);
    background: transparent;
    color: var(--color-body-text);
    border-radius: 0;
    -webkit-appearance: none;
}

input[type="search"]::placeholder {
    color: var(--c-gray);
}

.stations {
    margin-top: 0.4rem;
    max-height: 13.5rem;
    overflow-y: auto;
    border: 1px solid rgba(255, 0, 215, 0.35);
}

.stations button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid rgba(255, 0, 215, 0.2);
    color: var(--color-body-text);
}

.stations button.on {
    color: var(--c-black);
    background: var(--color-menu-selected);
}

.stations .empty {
    padding: 0.6rem;
    color: var(--color-warning);
}

.sensor-groups h3 {
    margin: 0.9rem 0 0.4rem;
    font-size: calc(var(--text-size) * 0.9);
    font-weight: normal;
    color: var(--c-gray);
}

/* ---- info --------------------------------------------------------------------- */

.info {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--color-info);
}

.state {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--color-body-text);
    font-size: calc(var(--text-size) * 0.9);
}

/* ---- logs: the stamps of every autopoem, what the phone can do ---------------- */

.logs-list pre {
    margin: 0 0 1.1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(0, 135, 255, 0.4);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--color-body-text);
    font-size: calc(var(--text-size) * 0.9);
}

.logs-list .prompt {
    color: var(--c-gray);
}

/* one row of a log on its own line; a long row wraps under its text (app.js logRow: hanging indent) */
.log-row {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* the meaning colours of the logs -- as the homepage's logs and ARCADE's LOGS screen */
.log-time { color: var(--c-gray); }
.log-name { color: var(--c-neon-yellow); }
.log-label,
.log-id { color: var(--color-logo); }
.log-value { color: var(--c-bright-cyan); }
.log-ok { color: var(--c-neon-green); }
.log-fail { color: #ff3b3b; }
.log-warn { color: var(--c-neon-yellow); }

.logs-list .empty {
    color: var(--c-gray);
}

/* ---- loading: the logo, what happens, the time -------------------------------- */

.loading {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding: 1rem;
    background: var(--c-black);          /* solid: nothing shows through */
}

.loading-text {
    color: var(--color-info);
    text-align: center;
    min-height: 1.4em;
}

/* the poem as the model writes it -- the newest lines stay in view */
.loading-poem {
    margin: 0;
    width: 100%;
    max-width: 30rem;
    max-height: 45vh;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--color-generated);
    line-height: 1.45;
    font-size: calc(var(--text-size) * 0.9);
}

.loading-timer {
    color: var(--color-warning);
    letter-spacing: 0.15em;
}

.loading-ask {
    max-width: 30rem;
    text-align: center;
    color: var(--color-warning);
}

.loading-ask p {
    margin: 0 0 0.8rem;
}

.loading-ask .choices {
    justify-content: center;
}

/* ---- footer: poet / tune / info ----------------------------------------------- */

.footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    gap: 0.45rem;
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom));
    border-top: 2px solid var(--color-info);
    background: var(--c-black);          /* solid: nothing shows through */
}

.tab {
    flex: 1;
    padding: 0.65rem 0.5rem;
    border: 1px solid var(--color-menu);
    background: transparent;
    color: var(--color-menu);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tab.active {
    color: var(--c-black);
    background: var(--color-menu-selected);
    border-color: var(--color-menu-selected);
}
