/*
 * PonyWave Tools – main.css
 * Globales Design-System: CSS-Variablen, Reset, Typografie, Basis-Layout
 *
 * Wird von index.html und allen tools/*.html eingebunden.
 */

/* ─── CSS-VARIABLEN ──────────────────────────────────── */

:root {
    /* Farben */
    --color-bg:           #0D0D0D;
    --color-surface:      #1A1A1A;
    --color-surface-plus: #252525;
    --color-surface-high: #2E2E2E;
    --color-border:       #2A2A2A;
    --color-border-mid:   #363636;
    --color-purple:       #7F006E;
    --color-pink:         #FF7FED;
    --color-pink-dim:     rgba(255, 127, 237, 0.12);
    --color-pink-glow:    rgba(255, 127, 237, 0.25);
    --color-purple-dim:   rgba(127, 0, 110, 0.2);
    --color-grey:         #636363;
    --color-muted:        #ADADAD;
    --color-text:         #E8E8E8;

    /* Typografie */
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro',
                 Menlo, Consolas, 'Courier New', monospace;

    /* Abstände */
    --radius:    6px;
    --radius-lg: 10px;
    --radius-xl: 14px;

    /* Transitionen */
    --transition-fast: 120ms ease;
    --transition-base: 180ms ease;
}

/* ─── RESET ──────────────────────────────────────────── */

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

html {
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--color-pink);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* ─── TYPOGRAFIE ─────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

p {
    color: var(--color-muted);
    line-height: 1.65;
}

code, pre {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

pre {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 12px 16px;
    overflow-x: auto;
}

/* Label / Eyebrow text */
.label {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-grey);
}

/* ─── SCROLLBAR ──────────────────────────────────────── */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-mid) transparent;
}

*::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--color-border-mid);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--color-grey);
}

/* ─── FOCUS ──────────────────────────────────────────── */

:focus-visible {
    outline: 2px solid var(--color-pink);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* ─── UTILITY ────────────────────────────────────────── */

.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;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── KOMPAKTER MODUS (niedrige Viewport-Höhe) ───────── */

@media (max-height: 720px) {
    .tool-header {
        padding: 10px 20px !important;
    }

    .tool-header-icon {
        width: 28px !important;
        height: 28px !important;
    }
}

@media (max-height: 600px) {
    .tool-header {
        padding: 8px 16px !important;
    }

    .tool-header-icon {
        width: 24px !important;
        height: 24px !important;
    }
}
