
/* =========================================================
   ZALGO TEXT GENERATOR — CharacterCounter.com

   DESKTOP:
   - Centered heading and short introduction
   - Your Text and Zalgo Text side by side
   - Adjustable glitch intensity slider
   - Editable intensity percentage
   - Above, Middle, Below direction controls
   - Character statistics
   - 300px Raptive sidebar

   TABLET / MOBILE:
   - Responsive input and output panels
   - Touch-friendly slider and controls
   - Sidebar hidden below 900px
   - Single-column layout on small screens

   ========================================================= */


/* =========================================================
   PAGE BASE
   ========================================================= */

.zalgo-page {
    width: 100%;
    padding: 105px 15px 45px;

    color: #333;
    font-family: "Roboto", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;

    --zalgo-blue: #1a73e8;
    --zalgo-blue-dark: #1558aa;
    --zalgo-border: #dce2e9;
    --zalgo-text: #333;
    --zalgo-muted: #666;
}

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

.zalgo-page [hidden] {
    display: none !important;
}

.zalgo-page button,
.zalgo-page textarea,
.zalgo-page input,
.zalgo-page output {
    font-family: "Roboto", Arial, sans-serif;
}

.zalgo-page button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.zalgo-page a {
    color: #1155cc;
    text-decoration: none;
}

.zalgo-page a:hover {
    text-decoration: underline;
}

.zalgo-page a:focus-visible,
.zalgo-page button:focus-visible,
.zalgo-page textarea:focus-visible,
.zalgo-page input:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.3);
    outline-offset: 3px;
}

.zalgo-page button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* =========================================================
   MAIN PAGE LAYOUT

   Main Content | 300px Raptive Sidebar
   ========================================================= */

.zalgo-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        300px;

    align-items: stretch;

    gap: 28px;

    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
}

.zalgo-main {
    width: 100%;
    min-width: 0;
}

.zalgo-sidebar {
    display: block;

    width: 300px;
    min-width: 300px;
    min-height: 100%;

    align-self: stretch;

    margin: 0;
    padding: 0;
}


/* =========================================================
   PAGE HEADING
   ========================================================= */

.zalgo-heading {
    width: 100%;

    margin: 0 0 23px;

    text-align: center;
}

.zalgo-heading h1 {
    margin: 0 0 9px;
    padding: 0;

    color: #333;

    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;

    overflow-wrap: break-word;
}

.zalgo-intro {
    width: 100%;
    max-width: 760px;

    margin: 0 auto;
    padding: 0;

    color: #555;

    font-size: 16px;
    line-height: 1.55;
    font-weight: 400;
}


/* =========================================================
   JAVASCRIPT NOTICE
   ========================================================= */

.zalgo-notice {
    margin: 0 0 18px;
    padding: 12px 15px;

    border: 1px solid #e3cf9b;
    border-radius: 7px;

    background: #fff9eb;
    color: #665022;

    font-size: 14px;
    line-height: 1.5;
}


/* =========================================================
   MAIN TOOL
   ========================================================= */

.zalgo-tool {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    margin: 0 0 40px;
    padding: 0;

    gap: 17px;
}


/* =========================================================
   WARNINGS AND ERRORS
   ========================================================= */

.zalgo-warning {
    width: 100%;

    margin: 0;
    padding: 12px 15px;

    border: 1px solid #e3cf9b;
    border-radius: 8px;

    background: #fff9eb;
    color: #74531e;

    font-size: 14px;
    line-height: 1.55;

    overflow-wrap: anywhere;
}

.zalgo-warning.is-error {
    border-color: #e7b1b1;

    background: #fff1f1;
    color: #a12424;
}

.zalgo-warning.is-success {
    border-color: #a8d9b5;

    background: #f1fff4;
    color: #246b38;
}


/* =========================================================
   GENERATOR GRID

   DESKTOP:
   Your Text | Zalgo Text

   MOBILE:
   Your Text
   Zalgo Text
   ========================================================= */

.zalgo-generator-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    align-items: stretch;

    gap: 18px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   INPUT AND OUTPUT PANELS
   ========================================================= */

.zalgo-input-panel,
.zalgo-output-panel,
.zalgo-settings {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 18px;

    border: 1px solid #dce2e9;
    border-radius: 11px;

    background: #fff;
}

.zalgo-input-panel,
.zalgo-output-panel {
    gap: 12px;
}

.zalgo-settings {
    gap: 18px;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.zalgo-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;

    gap: 8px 12px;

    width: 100%;

    margin: 0;
    padding: 0;
}

.zalgo-section-heading h2 {
    margin: 0;
    padding: 0;

    color: #333;

    font-size: 21px;
    line-height: 1.35;
    font-weight: 700;
}


/* =========================================================
   TEXTAREA WRAPPERS
   ========================================================= */

.zalgo-input-wrapper,
.zalgo-output-wrapper {
    position: relative;

    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;
}


/* =========================================================
   INPUT TEXTAREA
   ========================================================= */

.zalgo-page .zalgo-input {
    display: block;

    width: 100%;
    max-width: 100%;

    height: 195px;
    min-height: 130px;

    margin: 0;
    padding: 14px 14px 55px;

    border: 2px solid #c9ced6;
    border-radius: 10px;

    background: #fff;
    color: #222;

    font-family: "Roboto", Arial, sans-serif;

    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;

    outline: none;

    resize: vertical;

    overflow-x: auto;
    overflow-y: auto;

    overflow-wrap: break-word;

    box-shadow: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.zalgo-page .zalgo-input::placeholder {
    color: #9299a2;
    opacity: 1;
}

.zalgo-page .zalgo-input:hover {
    border-color: #aeb4bd;
}

.zalgo-page .zalgo-input:focus {
    border-color: #1a73e8;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}


/* =========================================================
   OUTPUT TEXTAREA

   Combining marks can extend significantly above
   and below the normal text line.

   JavaScript dynamically adjusts line height
   according to the selected glitch intensity.

   ========================================================= */

.zalgo-page .zalgo-output {
    display: block;

    width: 100%;
    max-width: 100%;

    height: 195px;
    min-height: 130px;

    margin: 0;
    padding: 19px 14px 55px;

    border: 2px solid #c9ced6;
    border-radius: 10px;

    background: #fff;
    color: #222;

    font-family: "Roboto", Arial, sans-serif;

    font-size: 17px;
    line-height: 2.3;
    font-weight: 400;

    outline: none;

    resize: vertical;

    overflow-x: auto;
    overflow-y: auto;

    overflow-wrap: break-word;

    white-space: pre-wrap;

    box-shadow: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.zalgo-page .zalgo-output::placeholder {
    color: #9299a2;
    opacity: 1;

    font-size: 16px;
}

.zalgo-page .zalgo-output:hover {
    border-color: #aeb4bd;
}

.zalgo-page .zalgo-output:focus {
    border-color: #1a73e8;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.10);
}


/* =========================================================
   TEXTAREA ACTION CONTAINERS

   Clear and Copy buttons appear inside the
   lower-right corner of their textareas.

   ========================================================= */

.zalgo-input-actions,
.zalgo-output-actions {
    position: absolute;

    right: 11px;
    bottom: 11px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 7px;

    z-index: 2;

    max-width: calc(100% - 22px);
}


/* =========================================================
   INLINE TEXTAREA BUTTONS
   ========================================================= */

.zalgo-inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    min-height: 34px;

    margin: 0;
    padding: 7px 11px;

    border: 1px solid #cbd7e7;
    border-radius: 6px;

    background: #fff;
    color: #145ba8;

    font-size: 13px;
    line-height: 1.25;
    font-weight: 600;

    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05);

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.zalgo-inline-button i {
    font-size: 16px;
    line-height: 1;
}

.zalgo-inline-button:hover:not(:disabled) {
    border-color: #9bbce5;

    background: #e5f0ff;
    color: #104b8d;
}

.zalgo-inline-button:active:not(:disabled) {
    background: #d8e9ff;
}

.zalgo-inline-button:disabled {
    background: #f5f6f8;
    color: #8a919a;

    border-color: #d7dce3;

    box-shadow: none;
}

.zalgo-copy-button {
    min-width: 79px;
}


/* =========================================================
   FIELD HINTS
   ========================================================= */

.zalgo-field-hint {
    margin: 0;
    padding: 0;

    color: #777;

    font-size: 13px;
    line-height: 1.55;

    overflow-wrap: break-word;
}


/* =========================================================
   GLITCH SETTINGS GRID
   ========================================================= */

.zalgo-settings-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, 1fr);

    align-items: start;

    gap: 25px;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* =========================================================
   OPTION GROUPS
   ========================================================= */

.zalgo-option-group {
    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    border: 0;
}

.zalgo-option-title {
    display: block;

    width: 100%;

    margin: 0 0 12px;
    padding: 0;

    color: #333;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
}

.zalgo-option-help {
    margin: 11px 0 0;
    padding: 0;

    color: #777;

    font-size: 13px;
    line-height: 1.55;

    overflow-wrap: break-word;
}


/* =========================================================
   GLITCH INTENSITY GROUP
   ========================================================= */

.zalgo-intensity-group {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    gap: 0;
}


/* =========================================================
   INTENSITY HEADING

   Glitch Intensity                  [ 35 % ]
   ========================================================= */

.zalgo-intensity-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    width: 100%;

    margin: 0 0 10px;
    padding: 0;
}

.zalgo-intensity-heading .zalgo-option-title {
    width: auto;

    margin: 0;
    padding: 0;

    font-size: 15px;
    line-height: 1.4;
}


/* =========================================================
   EDITABLE INTENSITY PERCENTAGE WRAPPER

   Contains:
   - Editable number input
   - Fixed percentage symbol

   ========================================================= */

.zalgo-intensity-number-wrapper {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    gap: 2px;

    width: 82px;
    min-width: 82px;
    height: 38px;

    margin: 0;
    padding: 0 9px 0 5px;

    border: 1px solid #b9d3f7;
    border-radius: 6px;

    background: #eaf3ff;
    color: #1558aa;

    cursor: text;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


/* Percentage field hover */

.zalgo-intensity-number-wrapper:hover {
    border-color: #81afea;

    background: #e2efff;
}


/* Percentage field focus */

.zalgo-intensity-number-wrapper:focus-within {
    border-color: #1a73e8;

    background: #fff;

    box-shadow:
        0 0 0 3px rgba(26, 115, 232, 0.12);
}


/* =========================================================
   EDITABLE INTENSITY NUMBER INPUT
   ========================================================= */

.zalgo-page .zalgo-intensity-number {
    display: block;

    flex: 1 1 auto;

    width: 100%;
    min-width: 0;
    height: 100%;

    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
    color: #1558aa;

    font-size: 16px;
    line-height: normal;
    font-weight: 700;

    font-variant-numeric: tabular-nums;

    text-align: center;

    outline: none;
    box-shadow: none;

    appearance: textfield;
    -webkit-appearance: none;
    -moz-appearance: textfield;

    cursor: text;
}


/* Input hover and focus */

.zalgo-page .zalgo-intensity-number:hover,
.zalgo-page .zalgo-intensity-number:focus,
.zalgo-page .zalgo-intensity-number:focus-visible {
    border: 0;

    background: transparent;

    outline: none;
    box-shadow: none;
}


/* =========================================================
   HIDE NUMBER INPUT SPINNER ARROWS

   Users can still type numbers and use keyboard
   arrow keys to adjust the value.

   ========================================================= */

.zalgo-intensity-number::-webkit-inner-spin-button,
.zalgo-intensity-number::-webkit-outer-spin-button {
    margin: 0;

    -webkit-appearance: none;
}


/* =========================================================
   FIXED PERCENTAGE SYMBOL
   ========================================================= */

.zalgo-intensity-percent {
    display: inline-block;

    flex: 0 0 auto;

    margin: 0;
    padding: 0;

    color: #1558aa;

    font-size: 15px;
    line-height: 1;
    font-weight: 700;

    user-select: none;
}


/* =========================================================
   DISABLED PERCENTAGE INPUT
   ========================================================= */

.zalgo-intensity-number-wrapper:has(input:disabled) {
    opacity: 0.5;

    cursor: not-allowed;
}

.zalgo-page .zalgo-intensity-number:disabled {
    cursor: not-allowed;
}


/* =========================================================
   SLIDER WRAPPER
   ========================================================= */

.zalgo-slider-wrapper {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    gap: 5px;
}


/* =========================================================
   GLITCH INTENSITY SLIDER

   Default: 35%
   Minimum: 0%
   Maximum: 100%
   Step: 1%

   JavaScript updates --zalgo-slider-progress
   whenever the slider or number field changes.

   ========================================================= */

.zalgo-page .zalgo-intensity-slider {
    --zalgo-slider-progress: 35%;

    display: block;

    width: 100%;
    min-width: 0;

    height: 34px;

    margin: 0;
    padding: 0;

    border: 0;

    background: transparent;

    outline: none;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    accent-color: #1a73e8;

    cursor: pointer;

    touch-action: pan-y;

    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   SLIDER TRACK — CHROME / SAFARI / EDGE
   ========================================================= */

.zalgo-intensity-slider::-webkit-slider-runnable-track {
    width: 100%;

    height: 8px;

    border: 0;
    border-radius: 999px;

    background: linear-gradient(
        to right,
        #1a73e8 0%,
        #1a73e8 var(--zalgo-slider-progress),
        #e1e6ed var(--zalgo-slider-progress),
        #e1e6ed 100%
    );

    cursor: pointer;
}


/* =========================================================
   SLIDER THUMB — CHROME / SAFARI / EDGE
   ========================================================= */

.zalgo-intensity-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;

    width: 23px;
    height: 23px;

    margin-top: -7.5px;

    border: 2px solid #fff;
    border-radius: 50%;

    background: #1a73e8;

    box-shadow:
        0 0 0 1px #1a73e8,
        0 2px 5px rgba(0, 0, 0, 0.15);

    cursor: grab;

    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


/* Slider thumb hover */

.zalgo-intensity-slider:hover::-webkit-slider-thumb {
    background: #155bb7;

    box-shadow:
        0 0 0 1px #155bb7,
        0 0 0 5px rgba(26, 115, 232, 0.12);
}


/* Slider thumb dragging */

.zalgo-intensity-slider:active::-webkit-slider-thumb {
    background: #104c9e;

    cursor: grabbing;

    transform: scale(1.06);

    box-shadow:
        0 0 0 1px #104c9e,
        0 0 0 6px rgba(26, 115, 232, 0.16);
}


/* =========================================================
   SLIDER TRACK — FIREFOX
   ========================================================= */

.zalgo-intensity-slider::-moz-range-track {
    width: 100%;

    height: 8px;

    border: 0;
    border-radius: 999px;

    background: #e1e6ed;

    cursor: pointer;
}


/* Firefox filled portion */

.zalgo-intensity-slider::-moz-range-progress {
    height: 8px;

    border: 0;
    border-radius: 999px;

    background: #1a73e8;
}


/* =========================================================
   SLIDER THUMB — FIREFOX
   ========================================================= */

.zalgo-intensity-slider::-moz-range-thumb {
    width: 19px;
    height: 19px;

    border: 2px solid #fff;
    border-radius: 50%;

    background: #1a73e8;

    box-shadow:
        0 0 0 1px #1a73e8,
        0 2px 5px rgba(0, 0, 0, 0.15);

    cursor: grab;

    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


/* Firefox slider thumb hover */

.zalgo-intensity-slider:hover::-moz-range-thumb {
    background: #155bb7;

    box-shadow:
        0 0 0 1px #155bb7,
        0 0 0 5px rgba(26, 115, 232, 0.12);
}


/* Firefox slider thumb dragging */

.zalgo-intensity-slider:active::-moz-range-thumb {
    background: #104c9e;

    cursor: grabbing;

    transform: scale(1.06);

    box-shadow:
        0 0 0 1px #104c9e,
        0 0 0 6px rgba(26, 115, 232, 0.16);
}


/* =========================================================
   SLIDER KEYBOARD FOCUS
   ========================================================= */

.zalgo-page .zalgo-intensity-slider:focus {
    outline: none;
}

.zalgo-page .zalgo-intensity-slider:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.3);
    outline-offset: 3px;

    border-radius: 8px;
}

.zalgo-intensity-slider:focus-visible::-webkit-slider-thumb {
    box-shadow:
        0 0 0 1px #1a73e8,
        0 0 0 5px rgba(26, 115, 232, 0.18);
}

.zalgo-intensity-slider:focus-visible::-moz-range-thumb {
    box-shadow:
        0 0 0 1px #1a73e8,
        0 0 0 5px rgba(26, 115, 232, 0.18);
}


/* =========================================================
   DISABLED SLIDER
   ========================================================= */

.zalgo-intensity-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.zalgo-intensity-slider:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
}

.zalgo-intensity-slider:disabled::-moz-range-thumb {
    cursor: not-allowed;
}


/* =========================================================
   SLIDER SCALE LABELS

   Light     Medium     Heavy     Extreme

   ========================================================= */

.zalgo-slider-labels {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    align-items: center;

    gap: 4px;

    width: 100%;

    margin: 0;
    padding: 0;

    user-select: none;
}

.zalgo-slider-labels span {
    display: block;

    color: #666;

    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;

    white-space: nowrap;

    text-align: center;
}

.zalgo-slider-labels span:first-child {
    text-align: left;
}

.zalgo-slider-labels span:last-child {
    text-align: right;
}

.zalgo-intensity-group .zalgo-option-help {
    margin-top: 12px;
}


/* =========================================================
   GLITCH DIRECTION CHECKBOXES
   ========================================================= */

.zalgo-direction-options {
    display: flex;
    align-items: center;

    flex-wrap: wrap;

    gap: 10px;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* =========================================================
   INDIVIDUAL CHECKBOX LABEL
   ========================================================= */

.zalgo-checkbox {
    display: inline-flex;

    align-items: center;
    justify-content: flex-start;

    gap: 8px;

    min-height: 43px;

    margin: 0;
    padding: 9px 13px;

    border: 1px solid #cbd5e1;
    border-radius: 7px;

    background: #fff;
    color: #444;

    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;

    cursor: pointer;

    user-select: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.zalgo-checkbox:hover {
    border-color: #a8c4ea;

    background: #f1f7ff;
    color: #1558aa;
}


/* =========================================================
   NATIVE CHECKBOX
   ========================================================= */

.zalgo-checkbox input {
    display: inline-block;

    width: 17px;
    height: 17px;

    flex: 0 0 17px;

    margin: 0;
    padding: 0;

    accent-color: #1a73e8;

    cursor: pointer;
}

.zalgo-checkbox input:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.3);
    outline-offset: 3px;
}


/* Checked checkbox labels */

.zalgo-checkbox:has(input:checked) {
    border-color: #9ec1f0;

    background: #f1f7ff;
    color: #1558aa;
}


/* =========================================================
   SETTINGS ACTIONS
   ========================================================= */

.zalgo-settings-actions {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 12px;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* =========================================================
   REGENERATE BUTTON
   ========================================================= */

.zalgo-regenerate-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    min-width: 150px;
    min-height: 43px;

    margin: 0;
    padding: 11px 18px;

    border: 1px solid #1a73e8;
    border-radius: 7px;

    background: #1a73e8;
    color: #fff;

    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;

    text-align: center;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.1s ease;
}

.zalgo-regenerate-button i {
    font-size: 18px;
    line-height: 1;
}

.zalgo-regenerate-button:hover:not(:disabled) {
    border-color: #155bb7;

    background: #155bb7;

    box-shadow:
        0 2px 6px rgba(26, 115, 232, 0.15);
}

.zalgo-regenerate-button:active:not(:disabled) {
    transform: translateY(1px);
}

.zalgo-regenerate-button:disabled {
    border-color: #c4ccd7;

    background: #e5e9ef;
    color: #808995;

    box-shadow: none;
}


/* =========================================================
   SETTINGS HINT
   ========================================================= */

.zalgo-settings-hint {
    width: 100%;

    margin: -4px 0 0;
    padding: 0;

    color: #777;

    font-size: 13px;
    line-height: 1.55;

    text-align: left;

    overflow-wrap: break-word;
}


/* =========================================================
   TEXT STATISTICS
   ========================================================= */

.zalgo-stats {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    align-items: stretch;

    gap: 12px;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* =========================================================
   INDIVIDUAL STATISTIC BOX
   ========================================================= */

.zalgo-stat {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 5px;

    width: 100%;
    min-width: 0;

    min-height: 102px;

    margin: 0;
    padding: 15px 10px;

    border: 1px solid #dce2e9;
    border-radius: 10px;

    background: #fff;

    text-align: center;
}


/* Large statistic number */

.zalgo-stat-value {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #333;

    font-size: 25px;
    line-height: 1.2;
    font-weight: 700;

    font-variant-numeric: tabular-nums;

    overflow-wrap: anywhere;
}


/* Statistic description */

.zalgo-stat-label {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    color: #666;

    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;

    overflow-wrap: break-word;
}


/* =========================================================
   PRIVACY NOTE
   ========================================================= */

.zalgo-privacy-note {
    width: 100%;

    margin: 0;
    padding: 0;

    color: #777;

    font-size: 13px;
    line-height: 1.6;

    text-align: center;
}


/* =========================================================
   ACCESSIBLE SCREEN-READER STATUS
   ========================================================= */

.zalgo-sr-only {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    margin: -1px !important;
    padding: 0 !important;

    border: 0 !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;

    white-space: nowrap !important;
}


/* =========================================================
   INFORMATIONAL ARTICLE
   ========================================================= */

.zalgo-article {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    color: #444;

    font-size: 16px;
    line-height: 1.8;

    overflow-wrap: break-word;
}


/* =========================================================
   ARTICLE SECTIONS
   ========================================================= */

.zalgo-article-section {
    width: 100%;
    min-width: 0;

    margin: 0 0 35px;
    padding: 0;
}

.zalgo-article-section:last-child {
    margin-bottom: 0;
}


/* =========================================================
   ARTICLE HEADINGS
   ========================================================= */

.zalgo-article h2 {
    margin: 0 0 15px;
    padding: 0;

    color: #333;

    font-size: 25px;
    line-height: 1.4;
    font-weight: 700;

    overflow-wrap: break-word;
}

.zalgo-article h3 {
    margin: 24px 0 10px;
    padding: 0;

    color: #333;

    font-size: 19px;
    line-height: 1.45;
    font-weight: 700;

    overflow-wrap: break-word;
}


/* =========================================================
   ARTICLE PARAGRAPHS
   ========================================================= */

.zalgo-article p {
    margin: 0 0 16px;
    padding: 0;

    color: #444;

    font-size: 16px;
    line-height: 1.8;
}

.zalgo-article p:last-child {
    margin-bottom: 0;
}

.zalgo-article strong {
    font-weight: 700;
    color: #333;
}


/* =========================================================
   ARTICLE LINKS
   ========================================================= */

.zalgo-article a {
    color: #1155cc;

    text-decoration: none;

    overflow-wrap: anywhere;
}

.zalgo-article a:hover {
    text-decoration: underline;
}

.zalgo-article a:focus-visible {
    outline: 3px solid rgba(26, 115, 232, 0.3);
    outline-offset: 3px;
}


/* =========================================================
   ARTICLE LISTS
   ========================================================= */

.zalgo-article-list {
    display: block;

    width: 100%;

    margin: 12px 0 20px;
    padding: 0 0 0 25px;

    list-style-position: outside;
}

ul.zalgo-article-list {
    list-style-type: disc;
}

ol.zalgo-article-list {
    list-style-type: decimal;
}

.zalgo-article-list li {
    margin: 0 0 11px;
    padding: 0 0 0 3px;

    color: #444;

    font-size: 16px;
    line-height: 1.75;
}

.zalgo-article-list li:last-child {
    margin-bottom: 0;
}

.zalgo-article-list li::marker {
    color: #555;
}


/* =========================================================
   INLINE CODE
   ========================================================= */

.zalgo-article code {
    padding: 2px 5px;

    border-radius: 4px;

    background: #f1f3f5;
    color: #333;

    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;

    font-size: 0.92em;

    overflow-wrap: anywhere;
}


/* =========================================================
   ZALGO TEXT EXAMPLE
   ========================================================= */

.zalgo-example {
    display: flex;
    flex-direction: column;

    gap: 9px;

    width: 100%;
    min-width: 0;

    margin: 19px 0 23px;
    padding: 20px;

    border: 1px solid #dce2e9;
    border-radius: 10px;

    background: #f9fafc;
}


/* Example labels */

.zalgo-article .zalgo-example-label {
    margin: 0;
    padding: 0;

    color: #666;

    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}


/* Example text */

.zalgo-example-text {
    display: block;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 10px 14px;

    border: 1px solid #e1e5eb;
    border-radius: 7px;

    background: #fff;
    color: #222;

    font-size: 18px;
    line-height: 1.9;
    font-weight: 500;

    overflow-wrap: anywhere;
}


/* Distorted example */

.zalgo-example-distorted {
    min-height: 68px;

    padding-top: 16px;
    padding-bottom: 16px;

    font-size: 21px;
    line-height: 2.3;

    overflow: hidden;
}


/* =========================================================
   FAQ SECTION
   ========================================================= */

.zalgo-faq-item {
    display: block;

    width: 100%;

    margin: 0 0 21px;
    padding: 0;
}

.zalgo-faq-item:last-child {
    margin-bottom: 0;
}

.zalgo-faq-item h3 {
    margin: 0 0 7px;

    color: #333;

    font-size: 18px;
    line-height: 1.45;
    font-weight: 700;
}

.zalgo-faq-item p {
    margin: 0;

    color: #444;

    font-size: 16px;
    line-height: 1.75;
}


/* =========================================================
   RELATED TOOLS
   ========================================================= */

.zalgo-related {
    width: 100%;
    min-width: 0;
}

.zalgo-article .zalgo-related-intro {
    margin: 0 0 17px;
}


/* =========================================================
   RELATED TOOL LINKS
   ========================================================= */

.zalgo-related-links {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    align-items: start;

    gap: 11px 23px;

    width: 100%;

    margin: 0 0 25px;
    padding: 0;

    list-style: none;
}

.zalgo-related-links li {
    position: relative;

    display: block;

    min-width: 0;

    margin: 0;
    padding: 0 0 0 18px;

    color: #444;

    font-size: 15px;
    line-height: 1.6;
}

.zalgo-related-links li::before {
    content: "•";

    position: absolute;

    left: 0;
    top: 0;

    color: #777;

    font-size: 18px;
    line-height: 1.4;
}

.zalgo-related-links a {
    color: #1155cc;

    font-size: 15px;
    font-weight: 500;

    text-decoration: none;

    overflow-wrap: anywhere;
}

.zalgo-related-links a:hover {
    text-decoration: underline;
}


/* =========================================================
   RELATED TOOL CALLOUTS
   ========================================================= */

.zalgo-related-callouts {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    align-items: stretch;

    gap: 16px;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* Individual callout */

.zalgo-related-callout {
    display: flex;
    flex-direction: column;

    gap: 10px;

    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 19px;

    border: 1px solid #dce2e9;
    border-radius: 10px;

    background: #f9fafc;
}

.zalgo-article .zalgo-related-callout h3 {
    margin: 0;
    padding: 0;

    color: #333;

    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}

.zalgo-article .zalgo-related-callout p {
    margin: 0;
    padding: 0;

    color: #555;

    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   RESPONSIVE — MEDIUM DESKTOP

   Retain 300px advertising sidebar.

   ========================================================= */

@media screen and (max-width: 1050px) and (min-width: 900px) {

    .zalgo-layout {
        gap: 22px;
    }

    .zalgo-generator-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .zalgo-page .zalgo-input,
    .zalgo-page .zalgo-output {
        height: 175px;
    }

    .zalgo-settings-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .zalgo-stats {
        gap: 8px;
    }

    .zalgo-stat {
        padding: 13px 7px;
    }

    .zalgo-stat-value {
        font-size: 22px;
    }

    .zalgo-stat-label {
        font-size: 12px;
    }

}


/* =========================================================
   RESPONSIVE — TABLET

   Hide advertising sidebar below 900px.

   ========================================================= */

@media screen and (max-width: 899px) {

    .zalgo-page {
        padding: 95px 16px 40px;
    }

    .zalgo-layout {
        display: block;

        width: 100%;
        max-width: 800px;

        margin: 0 auto;
    }

    .zalgo-main {
        width: 100%;
    }

    .zalgo-sidebar {
        display: none !important;
    }

    .zalgo-heading {
        margin-bottom: 22px;
    }

    .zalgo-heading h1 {
        font-size: 30px;
    }

    .zalgo-generator-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }

    .zalgo-page .zalgo-input,
    .zalgo-page .zalgo-output {
        height: 170px;
    }

    .zalgo-settings-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 20px;
    }

}


/* =========================================================
   RESPONSIVE — SMALL TABLET / LARGE PHONE
   ========================================================= */

@media screen and (max-width: 700px) {

    .zalgo-page {
        padding: 90px 14px 36px;
    }

    .zalgo-heading h1 {
        font-size: 28px;
    }

    .zalgo-intro {
        font-size: 15px;
        line-height: 1.6;
    }

    .zalgo-tool {
        gap: 15px;
        margin-bottom: 34px;
    }

    .zalgo-input-panel,
    .zalgo-output-panel,
    .zalgo-settings {
        padding: 16px;
    }

    .zalgo-section-heading h2 {
        font-size: 20px;
    }

    .zalgo-settings-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 23px;
    }

    .zalgo-intensity-heading .zalgo-option-title {
        font-size: 16px;
    }

    .zalgo-slider-labels span {
        font-size: 13px;
    }

    .zalgo-stats {
        gap: 9px;
    }

    .zalgo-stat {
        min-height: 95px;

        padding: 13px 6px;
    }

    .zalgo-stat-value {
        font-size: 23px;
    }

    .zalgo-stat-label {
        font-size: 12px;
    }

    .zalgo-article h2 {
        font-size: 23px;
    }

    .zalgo-article h3 {
        font-size: 18px;
    }

    .zalgo-related-callouts {
        grid-template-columns: minmax(0, 1fr);
    }

}


/* =========================================================
   RESPONSIVE — STACK TEXT PANELS
   ========================================================= */

@media screen and (max-width: 600px) {

    .zalgo-generator-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media screen and (max-width: 480px) {

    .zalgo-page {
        padding: 88px 12px 32px;
    }

    .zalgo-heading {
        margin-bottom: 19px;
    }

    .zalgo-heading h1 {
        margin-bottom: 8px;

        font-size: 26px;
        line-height: 1.3;
    }

    .zalgo-intro {
        font-size: 14px;
        line-height: 1.6;
    }

    .zalgo-tool {
        gap: 13px;
        margin-bottom: 30px;
    }

    .zalgo-generator-grid {
        gap: 13px;
    }

    .zalgo-input-panel,
    .zalgo-output-panel,
    .zalgo-settings {
        padding: 14px;

        border-radius: 9px;
    }

    .zalgo-section-heading h2 {
        font-size: 19px;
    }


    /* =====================================================
       TEXTAREAS
       ===================================================== */

    .zalgo-page .zalgo-input {
        height: 155px;
        min-height: 115px;

        padding: 12px 12px 52px;

        font-size: 16px;
        line-height: 1.65;
    }

    .zalgo-page .zalgo-output {
        height: 155px;
        min-height: 115px;

        padding: 17px 12px 52px;

        font-size: 16px;
        line-height: 2.2;
    }


    /* =====================================================
       TEXTAREA BUTTONS
       ===================================================== */

    .zalgo-input-actions,
    .zalgo-output-actions {
        right: 9px;
        bottom: 9px;
    }

    .zalgo-inline-button {
        min-height: 34px;

        padding: 7px 10px;

        font-size: 12px;
    }


    /* =====================================================
       SETTINGS
       ===================================================== */

    .zalgo-settings {
        gap: 16px;
    }

    .zalgo-settings-grid {
        gap: 23px;
    }

    .zalgo-option-title {
        font-size: 15px;
    }


    /* =====================================================
       MOBILE INTENSITY HEADING
       ===================================================== */

    .zalgo-intensity-heading {
        margin-bottom: 9px;
    }

    .zalgo-intensity-heading .zalgo-option-title {
        font-size: 16px;
    }


    /* =====================================================
       MOBILE EDITABLE PERCENTAGE

       Larger touch target.
       Font size remains at least 16px to help
       prevent automatic input zoom on iOS.

       ===================================================== */

    .zalgo-intensity-number-wrapper {
        width: 82px;
        min-width: 82px;

        height: 44px;

        padding: 0 9px 0 5px;
    }

    .zalgo-page .zalgo-intensity-number {
        font-size: 17px;
    }

    .zalgo-intensity-percent {
        font-size: 16px;
    }


    /* =====================================================
       MOBILE SLIDER

       Larger thumb and touch target for easier
       adjustment on touchscreen devices.

       ===================================================== */

    .zalgo-page .zalgo-intensity-slider {
        height: 44px;
    }

    .zalgo-intensity-slider::-webkit-slider-runnable-track {
        height: 9px;
    }

    .zalgo-intensity-slider::-webkit-slider-thumb {
        width: 27px;
        height: 27px;

        margin-top: -9px;
    }

    .zalgo-intensity-slider::-moz-range-track {
        height: 9px;
    }

    .zalgo-intensity-slider::-moz-range-progress {
        height: 9px;
    }

    .zalgo-intensity-slider::-moz-range-thumb {
        width: 23px;
        height: 23px;
    }

    .zalgo-slider-wrapper {
        gap: 2px;
    }

    .zalgo-slider-labels span {
        font-size: 13px;
        line-height: 1.5;
    }

    .zalgo-intensity-group .zalgo-option-help {
        margin-top: 10px;
    }


    /* =====================================================
       GLITCH DIRECTIONS
       ===================================================== */

    .zalgo-direction-options {
        gap: 8px;
    }

    .zalgo-checkbox {
        min-height: 44px;

        padding: 9px 10px;

        font-size: 14px;
    }

    .zalgo-checkbox input {
        width: 16px;
        height: 16px;

        flex-basis: 16px;
    }

    .zalgo-option-help,
    .zalgo-settings-hint {
        font-size: 12px;
    }


    /* =====================================================
       REGENERATE
       ===================================================== */

    .zalgo-settings-actions {
        justify-content: stretch;
    }

    .zalgo-regenerate-button {
        width: 100%;
        min-width: 0;

        min-height: 44px;
    }


    /* =====================================================
       STATISTICS
       ===================================================== */

    .zalgo-stats {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 6px;
    }

    .zalgo-stat {
        min-height: 90px;

        gap: 5px;

        padding: 11px 5px;

        border-radius: 8px;
    }

    .zalgo-stat-value {
        font-size: 21px;
    }

    .zalgo-stat-label {
        font-size: 11px;
        line-height: 1.35;
    }

    .zalgo-privacy-note {
        font-size: 12px;
    }


    /* =====================================================
       ARTICLE
       ===================================================== */

    .zalgo-article {
        font-size: 15px;
        line-height: 1.75;
    }

    .zalgo-article-section {
        margin-bottom: 30px;
    }

    .zalgo-article h2 {
        margin-bottom: 12px;

        font-size: 22px;
        line-height: 1.4;
    }

    .zalgo-article h3 {
        margin: 20px 0 9px;

        font-size: 17px;
    }

    .zalgo-article p {
        margin-bottom: 14px;

        font-size: 15px;
        line-height: 1.75;
    }

    .zalgo-article-list {
        padding-left: 22px;
    }

    .zalgo-article-list li {
        font-size: 15px;
        line-height: 1.7;
    }


    /* =====================================================
       EXAMPLE
       ===================================================== */

    .zalgo-example {
        padding: 14px;
    }

    .zalgo-example-text {
        padding: 10px 12px;

        font-size: 16px;
    }

    .zalgo-example-distorted {
        min-height: 65px;

        padding-top: 15px;
        padding-bottom: 15px;

        font-size: 18px;
        line-height: 2.2;
    }


    /* =====================================================
       FAQ
       ===================================================== */

    .zalgo-faq-item {
        margin-bottom: 19px;
    }

    .zalgo-faq-item h3 {
        margin: 0 0 7px;

        font-size: 17px;
    }

    .zalgo-faq-item p {
        margin: 0;

        font-size: 15px;
    }


    /* =====================================================
       RELATED TOOLS
       ===================================================== */

    .zalgo-related-links {
        grid-template-columns: minmax(0, 1fr);

        gap: 9px;

        margin-bottom: 22px;
    }

    .zalgo-related-links li,
    .zalgo-related-links a {
        font-size: 14px;
    }

    .zalgo-related-callout {
        padding: 16px;
    }

    .zalgo-article .zalgo-related-callout h3 {
        font-size: 17px;
    }

    .zalgo-article .zalgo-related-callout p {
        font-size: 14px;
    }

}


/* =========================================================
   EXTRA SMALL MOBILE
   ========================================================= */

@media screen and (max-width: 350px) {

    .zalgo-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .zalgo-heading h1 {
        font-size: 24px;
    }

    .zalgo-input-panel,
    .zalgo-output-panel,
    .zalgo-settings {
        padding: 12px;
    }

    .zalgo-intensity-heading {
        gap: 8px;
    }

    .zalgo-intensity-heading .zalgo-option-title {
        font-size: 15px;
    }

    .zalgo-intensity-number-wrapper {
        width: 76px;
        min-width: 76px;
    }

    .zalgo-slider-labels span {
        font-size: 12px;
    }

    .zalgo-direction-options {
        gap: 6px;
    }

    .zalgo-checkbox {
        gap: 6px;

        padding: 9px 8px;

        font-size: 13px;
    }

    .zalgo-stat {
        padding: 9px 4px;
    }

    .zalgo-stat-value {
        font-size: 19px;
    }

    .zalgo-stat-label {
        font-size: 10px;
    }

}


/* =========================================================
   HIGH CONTRAST ACCESSIBILITY
   ========================================================= */

@media (forced-colors: active) {

    .zalgo-page .zalgo-intensity-slider {
        appearance: auto;
        -webkit-appearance: auto;

        accent-color: Highlight;
    }

    .zalgo-intensity-number-wrapper {
        border: 1px solid ButtonText;

        background: Field;
        color: FieldText;
    }

    .zalgo-page .zalgo-intensity-number,
    .zalgo-intensity-percent {
        color: FieldText;
    }

    .zalgo-intensity-number-wrapper:focus-within {
        outline: 2px solid Highlight;
        outline-offset: 2px;
    }

    .zalgo-checkbox {
        border: 1px solid ButtonText;
    }

}


/* =========================================================
   REDUCED MOTION ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .zalgo-page *,
    .zalgo-page *::before,
    .zalgo-page *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

}


/* =========================================================
   END OF ZALGO TEXT GENERATOR CSS
   ========================================================= */
