@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@300;400;500;600;700&display=swap');

:root {
    --color-bg: #1C1917;
    --color-surface: #27243A;
    --color-surface-2: #322F47;
    --color-surface-3: #3D3A56;
    --color-primary: #7C3AED;
    --color-primary-hover: #6D28D9;
    --color-primary-active: #5B21B6;
    --color-accent: #0891B2;
    --color-accent-hover: #0E7490;
    --color-success: #22C55E;
    --color-text: #F1F0F5;
    --color-text-muted: #9B96B8;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-error: #EF4444;

    /* kept for internal compatibility */
    --pane-background: var(--color-surface);
    --component-base-color: var(--color-surface-2);
    --component-hover-background: var(--color-surface-3);
    --component-focus-background: rgba(124, 58, 237, 0.35);
    --component-active-background: var(--color-primary);
    --component-border-radius: 0.75rem;

    font-family: 'Nunito', system-ui, sans-serif;
    line-height: 1.5;
    color: var(--color-text);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

* {
    outline: none;
    box-sizing: border-box;
}

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

body,
body::backdrop,
body:fullscreen {
    margin: 0;
    background-color: var(--color-bg);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(8, 145, 178, 0.08) 0%, transparent 50%);
}

footer,
.help-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

footer {
    padding: 0.4rem;
    background-color: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--color-border);
}

.help-footer {
    flex-wrap: wrap;
}

a:link,
a:visited {
    color: var(--color-primary);
}

a:hover {
    text-decoration: underline;
    color: var(--color-primary-hover);
}

h1, h2 {
    margin: 0;
    text-align: center;
    font-family: 'Fredoka', sans-serif;
    color: var(--color-text);
}

h1 { font-size: 6rem; }
h2 { font-size: 4rem; }

ul { margin: 0; }

select,
input,
button,
textarea {
    background-color: var(--component-base-color);
    color: var(--color-text);
    border-radius: var(--component-border-radius);
    border: 1px solid var(--color-border);
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 16px; /* prevents iOS auto-zoom on focus */
    touch-action: manipulation; /* removes 300ms tap delay */
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

button {
    min-height: 44px; /* iOS minimum touch target */
    min-width: 44px;
}

input:hover,
select:hover,
textarea:hover {
    background-color: var(--component-hover-background);
    border-color: rgba(124, 58, 237, 0.4);
}

input:focus,
select:focus,
textarea:focus {
    background-color: var(--component-focus-background);
    border-color: var(--color-primary);
    outline: none;
}

button:hover {
    background-color: var(--component-hover-background);
    cursor: pointer;
}

button:active {
    background-color: var(--component-active-background);
    transform: scale(0.97);
}

input,
select {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

textarea {
    padding: 0.4rem 0.5rem;
    min-width: 0;
    resize: none;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.noscript {
    display: flex;
    font-size: 2.5rem;
    font-weight: bold;
    justify-content: center;
    border-bottom: 1rem solid var(--color-primary);
    padding: 10px;
    color: var(--color-text);
}
