/* ============================================================
   App-weite, einheitliche Button-Optik ("Sticker"-Stil)
   ------------------------------------------------------------
   Wird auf JEDER Seite NACH dem seitenspezifischen Stylesheet
   eingebunden, damit diese Regeln die Alt-Styles überschreiben.
   Es werden bewusst NUR Button-relevante Eigenschaften gesetzt –
   Layout-Properties (display, flex, margin, position) bleiben
   unangetastet und kaskadieren weiter aus den Seiten-CSS.

   Neue Buttons: Klasse .comic-btn (+ .comic-btn--secondary für Gelb).
   Die ID-/Klassenliste unten deckt bestehende Buttons ohne die Klasse ab.
   Ausgenommen (Icon-/Bild-Buttons, kein Text-CTA): .sound-btn, .impressum-close

   Look: dicker Tintenrand, harter Schatten schräg nach rechts unten,
   unregelmäßige Ecken (wie ausgeschnitten). Tokens: theme.css.
   ============================================================ */

/* --- Basis (Primär = Brick-Rot) --- */
.comic-btn,
.start-btn,
.highscore-submit-btn,
.highscore-back-btn,
.reward-btn,
.save-image-btn,
.control-btn,
.copy-btn,
.remove-button-btn,
#add-button-btn,
#new-game-btn,
#submit-btn,
#play-again-btn,
#test-btn-entry-form,
#test-btn-list,
#test-btn-add-entry,
#test-btn-clear {
    /* !important, um kontextspezifische Schrift-Overrides zu schlagen
       (z. B. .highscore-content *:not(...) { font-family: Marydale }) */
    font-family: var(--font-display) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: clamp(15px, 1.4vw + 8px, 22px);
    line-height: 1;
    color: #fff;
    text-decoration: none;
    background: var(--brick);
    border: 4px solid var(--ink);
    border-radius: 12px 15px 10px 14px / 14px 10px 15px 11px;
    padding: 14px 32px;
    box-shadow: 4px 6px 0 var(--ink);
    text-shadow: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
}

.comic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ::before-Texttrick & gestrichelte Deko-Ränder der Alt-Buttons abschalten */
.start-btn::before,
.highscore-submit-btn::before,
.highscore-back-btn::before,
.reward-btn::before,
.save-image-btn::before,
.control-btn::before {
    content: none !important;
}

/* --- Hover --- */
.comic-btn:hover,
.start-btn:hover,
.highscore-submit-btn:hover,
.reward-btn:hover,
.save-image-btn:hover,
#new-game-btn:hover,
#submit-btn:hover,
#play-again-btn:hover,
#test-btn-entry-form:hover,
#test-btn-list:hover,
#test-btn-add-entry:hover,
#test-btn-clear:hover {
    background: var(--brick-hover);
    transform: translate(-1px, -2px);
    box-shadow: 5px 8px 0 var(--ink);
}

/* --- Active --- */
.comic-btn:active,
.start-btn:active,
.highscore-submit-btn:active,
.highscore-back-btn:active,
.reward-btn:active,
.save-image-btn:active,
.control-btn:active,
.copy-btn:active,
.remove-button-btn:active,
#add-button-btn:active,
#new-game-btn:active,
#submit-btn:active,
#play-again-btn:active,
#test-btn-entry-form:active,
#test-btn-list:active,
#test-btn-add-entry:active,
#test-btn-clear:active {
    transform: translate(3px, 5px);
    box-shadow: 1px 1px 0 var(--ink);
}

/* --- Sekundär (Berlin-Gelb, dunkle Schrift) --- */
.comic-btn--secondary,
.highscore-back-btn,
.copy-btn,
.control-btn,
.remove-button-btn,
#add-button-btn {
    background: var(--yellow);
    color: var(--ink);
}

.comic-btn--secondary:hover,
.highscore-back-btn:hover,
.copy-btn:hover,
.control-btn:hover,
.remove-button-btn:hover,
#add-button-btn:hover {
    background: var(--yellow-hover);
    color: var(--ink);
    transform: translate(-1px, -2px);
    box-shadow: 5px 8px 0 var(--ink);
}

/* sprite-viewer: primärer Control-Button bleibt Primär (Brick) */
.control-btn.primary {
    background: var(--brick);
    color: #fff;
}

.control-btn.primary:hover {
    background: var(--brick-hover);
    border-color: var(--ink);
    color: #fff;
}

/* --- Disabled --- */
.comic-btn:disabled,
.start-btn:disabled,
.highscore-submit-btn:disabled,
.save-image-btn:disabled,
.control-btn:disabled,
.copy-btn:disabled,
.remove-button-btn:disabled,
#add-button-btn:disabled,
#new-game-btn:disabled,
#submit-btn:disabled,
#play-again-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: 4px 6px 0 var(--ink);
}

/* --- Tastatur-Fokus --- */
.comic-btn:focus-visible,
.start-btn:focus-visible,
.highscore-submit-btn:focus-visible,
.highscore-back-btn:focus-visible,
.reward-btn:focus-visible,
.save-image-btn:focus-visible,
.control-btn:focus-visible,
.copy-btn:focus-visible,
.remove-button-btn:focus-visible,
#add-button-btn:focus-visible,
#new-game-btn:focus-visible,
#submit-btn:focus-visible,
#play-again-btn:focus-visible {
    outline: 3px dashed var(--ink);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .comic-btn,
    .start-btn,
    .highscore-submit-btn,
    .highscore-back-btn,
    .reward-btn,
    .save-image-btn {
        transition: none;
    }
}
