
/* ============================================================
   ASCII ART GENERATOR
   ascii-art-generator.css
   ============================================================ */


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

html {
    margin: 0;
    padding: 0;
    border: none;
    font-family: Arial, sans-serif;
}


.ascii-page {
    width: 100%;
    padding: 105px 15px 30px;
    color: #333;
    font-family: Arial, sans-serif;
}


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


.ascii-page button,
.ascii-page input,
.ascii-page select,
.ascii-page textarea {
    font-family: Arial, sans-serif;
}


.ascii-page button {
    cursor: pointer;
}


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


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


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


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


.ascii-page .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


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

.ascii-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}


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


.ascii-tool-section {
    width: 100%;
    min-width: 0;
}


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

.ascii-heading {
    margin-bottom: 22px;
    text-align: center;
}


.ascii-heading h1 {
    margin: 0 0 10px;
    padding: 0;
    color: #333;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
}


.ascii-intro {
    max-width: 760px;
    margin: 0 auto;
    color: #555;
    font-size: 17px;
    line-height: 1.55;
}


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

.ascii-tool-card {
    width: 100%;
    min-width: 0;
    padding: 20px;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    background: #fff;
}


/* ============================================================
   TEXT / IMAGE TABS
   ============================================================ */

.ascii-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e5e9;
}


.ascii-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 45px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #d5d9df;
    border-radius: 7px;
    background: #f8f9fb;
    color: #555;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
    text-align: center;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}


.ascii-tab i {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
}


.ascii-tab:hover {
    border-color: #aebbd0;
    background: #f1f5fb;
    color: #333;
}


.ascii-tab.active,
.ascii-tab[aria-selected="true"] {
    border-color: #1a73e8;
    background: #eef5ff;
    color: #1155cc;
}


.ascii-tab-panel {
    width: 100%;
    min-width: 0;
}


/* ============================================================
   TEXT INPUT SECTION
   ============================================================ */

.ascii-input-section {
    width: 100%;
    min-width: 0;
    margin-bottom: 24px;
}


.ascii-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}


.ascii-input-label {
    display: block;
    margin: 0;
    color: #333;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
}


.ascii-clear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    margin: 0;
    padding: 5px 7px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #666;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 500;
}


.ascii-clear-button i {
    font-size: 16px;
}


.ascii-clear-button:hover {
    background: #f1f3f6;
    color: #333;
}


/* ============================================================
   MAIN TEXTAREA
   ============================================================ */

.ascii-text-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 105px;
    min-height: 65px;
    max-height: 350px;
    margin: 0;
    padding: 13px 15px;
    border: 2px solid #b9c2ce;
    border-radius: 8px;
    background: #fff;
    color: #222;
    outline: none;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 400;
    resize: vertical;
    overflow: auto;
    overflow-wrap: break-word;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.ascii-text-input:hover {
    border-color: #99a7b8;
}


.ascii-text-input:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}


.ascii-text-input::placeholder {
    color: #9098a3;
    opacity: 1;
}


.ascii-input-help {
    margin: 8px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.45;
}


/* ============================================================
   FONT SECTION
   ============================================================ */

.ascii-font-section {
    width: 100%;
    min-width: 0;
}


.ascii-section-heading {
    margin: 0 0 15px;
}


.ascii-section-heading h2 {
    margin: 0 0 6px;
    padding: 0;
    color: #333;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
}


.ascii-section-heading p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}


/* ============================================================
   FONT SEARCH TOOLBAR
   ============================================================ */

.ascii-font-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-bottom: 16px;
}


.ascii-search-wrapper {
    position: relative;
    flex: 1 1 220px;
    min-width: 0;
    max-width: 420px;
}


.ascii-search-wrapper > i {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 13px;
    color: #87909b;
    font-size: 18px;
    line-height: 1;
    transform: translateY(-50%);
    pointer-events: none;
}


.ascii-font-search {
    display: block;
    width: 100%;
    min-width: 0;
    height: 43px;
    margin: 0;
    padding: 9px 13px 9px 40px;
    border: 1px solid #cbd2dc;
    border-radius: 7px;
    background: #fff;
    color: #333;
    outline: none;
    font-size: 15px;
    line-height: 1.3;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.ascii-font-search::placeholder {
    color: #89919c;
    opacity: 1;
}


.ascii-font-search:hover {
    border-color: #aab5c4;
}


.ascii-font-search:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}


.ascii-font-count {
    flex: 0 0 auto;
    color: #777;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}


/* ============================================================
   FONT STATUS
   ============================================================ */

.ascii-font-status {
    width: 100%;
    margin: 0 0 14px;
    padding: 11px 13px;
    border: 1px solid #d7e1ef;
    border-radius: 7px;
    background: #f5f9ff;
    color: #4f617a;
    font-size: 14px;
    line-height: 1.5;
}


.ascii-font-status:empty {
    display: none;
}


.ascii-font-status.error,
.ascii-font-status.is-error {
    border-color: #efc5c5;
    background: #fff6f6;
    color: #a12828;
}


/* ============================================================
   FONT GRID
   ONE FONT CARD PER ROW

   A full-width card allows more space for ASCII art.
   ============================================================ */

.ascii-font-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    min-width: 0;
}


/* ============================================================
   FONT CARD
   ============================================================ */

.ascii-font-card {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 14px;
    border: 1px solid #d9dee6;
    border-radius: 9px;
    background: #fff;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.ascii-font-card:hover {
    border-color: #bcc8d8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}


/* ============================================================
   FONT CARD HEADER
   ============================================================ */

.ascii-font-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin-bottom: 11px;
}


.ascii-font-name {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 700;
    overflow-wrap: anywhere;
}


/* ============================================================
   COPY BUTTON
   ============================================================ */

.ascii-font-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    min-height: 36px;
    margin: 0;
    padding: 7px 13px;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    background: #1a73e8;
    color: #fff;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}


.ascii-font-copy-button i {
    font-size: 15px;
}


.ascii-font-copy-button:hover:not(:disabled) {
    border-color: #155fc3;
    background: #155fc3;
    color: #fff;
}


.ascii-font-copy-button.copied,
.ascii-font-copy-button.is-copied {
    border-color: #198754;
    background: #198754;
    color: #fff;
}


/* ============================================================
   SCROLLABLE FONT PREVIEW

   Important:
   - Keep all whitespace intact.
   - Do not wrap ASCII art.
   - Scroll vertically and horizontally INSIDE the preview.
   - Prevent page-level horizontal overflow.
   ============================================================ */

.ascii-font-preview-wrapper {
    display: block;
    width: 100%;
    min-width: 0;
    height: 155px;
    min-height: 100px;
    max-width: 100%;
    margin: 0;
    padding: 11px 12px;
    overflow: auto;
    border: 1px solid #e1e5ea;
    border-radius: 6px;
    background: #f8f9fb;
    scrollbar-width: thin;
    scrollbar-color: #bcc5d1 #f1f3f6;
    overscroll-behavior: contain;
}


.ascii-font-output {
    display: block;
    width: max-content;
    min-width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #222;
    font-family:
        "Courier New",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 12px;
    line-height: 1.18;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    word-spacing: 0;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    tab-size: 4;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "calt" 0;
    text-align: left;
    user-select: text;
    -webkit-user-select: text;
}


.ascii-font-preview-wrapper::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}


.ascii-font-preview-wrapper::-webkit-scrollbar-track {
    background: #f1f3f6;
    border-radius: 6px;
}


.ascii-font-preview-wrapper::-webkit-scrollbar-thumb {
    border: 2px solid #f1f3f6;
    border-radius: 6px;
    background: #b9c4d2;
}


.ascii-font-preview-wrapper::-webkit-scrollbar-thumb:hover {
    background: #97a8bd;
}


/* ============================================================
   FONT CARD ACTIONS
   ============================================================ */

.ascii-font-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 11px;
}


.ascii-font-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 33px;
    margin: 0;
    padding: 6px 11px;
    border: 1px solid #d4dae3;
    border-radius: 6px;
    background: #fff;
    color: #4d5663;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}


.ascii-font-secondary-button i {
    font-size: 15px;
}


.ascii-font-secondary-button:hover:not(:disabled) {
    border-color: #9cb7dc;
    background: #f3f8ff;
    color: #1155cc;
}


/* ============================================================
   EMPTY SEARCH RESULTS
   ============================================================ */

.ascii-no-results {
    width: 100%;
    padding: 30px 16px;
    border: 1px dashed #d2d9e3;
    border-radius: 8px;
    background: #fafbfc;
    text-align: center;
}


.ascii-no-results > i {
    display: block;
    margin-bottom: 10px;
    color: #a1aab7;
    font-size: 29px;
    line-height: 1;
}


.ascii-no-results p {
    margin: 0 0 14px;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}


.ascii-reset-search {
    min-height: 36px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    background: #fff;
    color: #1155cc;
    font-size: 13px;
    font-weight: 600;
}


.ascii-reset-search:hover {
    background: #eef5ff;
}


/* ============================================================
   LOAD MORE FONTS
   ============================================================ */

.ascii-load-more-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 18px;
}


.ascii-load-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    margin: 0;
    padding: 10px 20px;
    border: 1px solid #1a73e8;
    border-radius: 7px;
    background: #fff;
    color: #1155cc;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 700;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}


.ascii-load-more-button i {
    font-size: 18px;
}


.ascii-load-more-button:hover:not(:disabled) {
    background: #eef5ff;
}


/* ============================================================
   IMAGE TO ASCII HEADING
   ============================================================ */

.ascii-image-heading {
    margin-bottom: 18px;
}


.ascii-image-heading h2 {
    margin: 0 0 7px;
    color: #333;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 700;
}


.ascii-image-heading p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.55;
}


/* ============================================================
   IMAGE SELECTION SECTION
   ============================================================ */

.ascii-upload-section {
    width: 100%;
    min-width: 0;
    margin-bottom: 22px;
}


.ascii-upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 215px;
    padding: 22px;
    overflow: hidden;
    border: 2px dashed #bdc9d9;
    border-radius: 9px;
    background: #f9fbff;
    text-align: center;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}


.ascii-upload-zone.is-dragover,
.ascii-upload-zone.dragover {
    border-color: #1a73e8;
    background: #edf5ff;
}


/* ============================================================
   FILE INPUT

   Visually hidden, but still available to JavaScript.
   ============================================================ */

.ascii-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}


/* ============================================================
   IMAGE UPLOAD PLACEHOLDER
   ============================================================ */

.ascii-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}


.ascii-upload-icon {
    margin-bottom: 10px;
    color: #7c9cc7;
    font-size: 40px;
    line-height: 1;
}


.ascii-upload-title {
    margin: 0 0 6px;
    color: #333;
    font-size: 17px;
    line-height: 1.3;
    font-weight: 700;
}


.ascii-upload-description {
    margin: 0 0 14px;
    color: #6e7783;
    font-size: 13px;
    line-height: 1.5;
}


.ascii-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    margin: 0;
    padding: 9px 17px;
    border: 1px solid #1a73e8;
    border-radius: 7px;
    background: #1a73e8;
    color: #fff;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
}


.ascii-upload-button i {
    font-size: 17px;
}


.ascii-upload-button:hover {
    border-color: #155fc3;
    background: #155fc3;
}


.ascii-upload-help {
    margin: 13px 0 0;
    color: #808894;
    font-size: 12px;
    line-height: 1.45;
}


/* ============================================================
   SELECTED IMAGE PREVIEW
   ============================================================ */

.ascii-image-preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
}


.ascii-image-preview {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 270px;
    height: auto;
    margin: 0 auto;
    border: 1px solid #d9dee5;
    border-radius: 6px;
    background: #fff;
    object-fit: contain;
}


.ascii-image-file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    min-width: 0;
}


.ascii-image-file-name {
    min-width: 0;
    max-width: 100%;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}


.ascii-remove-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 auto;
    min-height: 32px;
    margin: 0;
    padding: 6px 10px;
    border: 1px solid #e4baba;
    border-radius: 6px;
    background: #fff;
    color: #b33b3b;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
}


.ascii-remove-image i {
    font-size: 15px;
}


.ascii-remove-image:hover {
    border-color: #d59a9a;
    background: #fff5f5;
}


/* ============================================================
   IMAGE ERROR MESSAGE
   ============================================================ */

.ascii-upload-error {
    width: 100%;
    margin: 11px 0 0;
    padding: 10px 13px;
    border: 1px solid #efc5c5;
    border-radius: 6px;
    background: #fff6f6;
    color: #a12828;
    font-size: 13px;
    line-height: 1.5;
}


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

.ascii-image-settings {
    width: 100%;
    min-width: 0;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid #d9dee6;
    border-radius: 9px;
    background: #fff;
}


.ascii-image-settings h3 {
    margin: 0 0 17px;
    padding: 0;
    color: #333;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
}


.ascii-settings-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 23px 18px;
    width: 100%;
    min-width: 0;
}


.ascii-setting-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
}


.ascii-setting-group > label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
    color: #444;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
}


.ascii-setting-value {
    color: #1a73e8;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}


/* ============================================================
   RANGE SLIDERS
   ============================================================ */

.ascii-setting-range {
    display: block;
    width: 100%;
    height: 7px;
    margin: 10px 0;
    padding: 0;
    border: none;
    border-radius: 5px;
    background: #dfe5ed;
    outline: none;
    cursor: pointer;
    accent-color: #1a73e8;
    appearance: none;
    -webkit-appearance: none;
}


.ascii-setting-range::-webkit-slider-runnable-track {
    height: 7px;
    border-radius: 5px;
    background: #dfe5ed;
}


.ascii-setting-range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    margin-top: -5.5px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #1a73e8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.17);
    appearance: none;
    -webkit-appearance: none;
}


.ascii-setting-range::-moz-range-track {
    height: 7px;
    border-radius: 5px;
    background: #dfe5ed;
}


.ascii-setting-range::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #1a73e8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.17);
}


.ascii-range-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 2px;
    color: #888;
    font-size: 11px;
    line-height: 1.4;
}


/* ============================================================
   CHARACTER SET SELECT
   ============================================================ */

.ascii-setting-select {
    display: block;
    width: 100%;
    min-width: 0;
    height: 42px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #cbd2dc;
    border-radius: 7px;
    background: #fff;
    color: #333;
    outline: none;
    font-size: 14px;
    line-height: 1.3;
    cursor: pointer;
}


.ascii-setting-select:hover {
    border-color: #aeb9c7;
}


.ascii-setting-select:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}


/* ============================================================
   INVERT CHECKBOX
   ============================================================ */

.ascii-checkbox-label {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    max-width: 100%;
    margin: 19px 0 0;
    color: #444;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    cursor: pointer;
}


.ascii-checkbox-label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #1a73e8;
    cursor: pointer;
}


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

.ascii-reset-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 17px 0 0;
    padding: 6px 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #1155cc;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}


.ascii-reset-settings i {
    font-size: 16px;
}


.ascii-reset-settings:hover {
    color: #0b429e;
    text-decoration: underline;
}


/* ============================================================
   IMAGE RESULT SECTION
   ============================================================ */

.ascii-image-result-section {
    width: 100%;
    min-width: 0;
}


.ascii-result-heading {
    margin: 0 0 11px;
}


.ascii-result-heading h3 {
    margin: 0;
    padding: 0;
    color: #333;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
}


/* ============================================================
   IMAGE ASCII OUTPUT

   Independent scrolling for large generated images.
   ============================================================ */

.ascii-image-result-box {
    display: block;
    width: 100%;
    min-width: 0;
    height: 340px;
    min-height: 180px;
    max-width: 100%;
    margin: 0;
    padding: 14px;
    overflow: auto;
    border: 1px solid #d9dee6;
    border-radius: 8px;
    background: #f8f9fb;
    scrollbar-width: thin;
    scrollbar-color: #bcc5d1 #f1f3f6;
    overscroll-behavior: contain;
}


.ascii-image-output {
    display: block;
    width: max-content;
    min-width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: #222;
    font-family:
        "Courier New",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 10px;
    line-height: 1;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0;
    word-spacing: 0;
    white-space: pre;
    overflow-wrap: normal;
    word-break: normal;
    tab-size: 4;
    font-variant-ligatures: none;
    font-feature-settings: "liga" 0, "calt" 0;
    text-align: left;
    user-select: text;
    -webkit-user-select: text;
}


.ascii-image-result-box::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}


.ascii-image-result-box::-webkit-scrollbar-track {
    background: #f1f3f6;
    border-radius: 6px;
}


.ascii-image-result-box::-webkit-scrollbar-thumb {
    border: 2px solid #f1f3f6;
    border-radius: 6px;
    background: #b9c4d2;
}


.ascii-image-result-box::-webkit-scrollbar-thumb:hover {
    background: #97a8bd;
}


/* ============================================================
   IMAGE STATUS
   ============================================================ */

.ascii-image-status {
    min-height: 0;
    margin: 9px 0 0;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}


.ascii-image-status:empty {
    display: none;
}


.ascii-image-status.error,
.ascii-image-status.is-error {
    color: #b33b3b;
}


/* ============================================================
   IMAGE ACTION BUTTONS
   ============================================================ */

.ascii-image-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 15px;
}


.ascii-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    margin: 0;
    padding: 9px 13px;
    border: 1px solid #ccd5e0;
    border-radius: 7px;
    background: #fff;
    color: #4c5665;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}


.ascii-action-button i {
    font-size: 16px;
}


.ascii-action-button:hover:not(:disabled) {
    border-color: #9bb7dc;
    background: #f4f8ff;
    color: #1155cc;
}


.ascii-primary-button {
    border-color: #1a73e8;
    background: #1a73e8;
    color: #fff;
}


.ascii-primary-button:hover:not(:disabled) {
    border-color: #155fc3;
    background: #155fc3;
    color: #fff;
}


/* ============================================================
   COPY FEEDBACK
   ============================================================ */

.ascii-copy-feedback {
    position: fixed;
    z-index: 9999;
    right: 20px;
    bottom: 20px;
    max-width: min(340px, calc(100vw - 40px));
    padding: 11px 16px;
    border-radius: 7px;
    background: #263442;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}


.ascii-copy-feedback.show,
.ascii-copy-feedback.visible,
.ascii-copy-feedback.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.ascii-copy-feedback.error,
.ascii-copy-feedback.is-error {
    background: #a12828;
}


/* ============================================================
   NO JAVASCRIPT MESSAGE
   ============================================================ */

.ascii-noscript-message {
    margin: 15px 0;
    padding: 13px 15px;
    border: 1px solid #efc5c5;
    border-radius: 7px;
    background: #fff6f6;
    color: #a12828;
    font-size: 14px;
    line-height: 1.5;
}


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

.ascii-related-tools {
    width: 100%;
    min-width: 0;
    margin-top: 26px;
}


.ascii-related-tools h2 {
    margin: 0 0 13px;
    padding: 0;
    color: #333;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
}


.ascii-related-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}


.ascii-related-card {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
    min-height: 54px;
    padding: 12px 14px;
    border: 1px solid #d9dee6;
    border-radius: 8px;
    background: #fff;
    color: #1155cc !important;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    text-decoration: none !important;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}


.ascii-related-card i {
    flex: 0 0 auto;
    color: #1a73e8;
    font-size: 21px;
    line-height: 1;
}


.ascii-related-card span {
    min-width: 0;
    overflow-wrap: anywhere;
}


.ascii-related-card:hover {
    border-color: #a8bedb;
    background: #f5f9ff;
}


/* ============================================================
   INFORMATIONAL SEO CONTENT
   ============================================================ */

.ascii-content {
    width: 100%;
    min-width: 0;
    margin-top: 34px;
    color: #333;
    font-size: 17px;
    line-height: 1.7;
}


.ascii-content h2 {
    margin: 34px 0 12px;
    padding: 0;
    color: #292929;
    font-size: 25px;
    line-height: 1.3;
    font-weight: 700;
}


.ascii-content > h2:first-child {
    margin-top: 0;
}


.ascii-content h3 {
    margin: 26px 0 9px;
    padding: 0;
    color: #333;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
}


.ascii-content p {
    margin: 0 0 17px;
    padding: 0;
    color: #444;
    font-size: 17px;
    line-height: 1.7;
}


.ascii-content strong {
    color: #333;
    font-weight: 700;
}


.ascii-content a strong {
    color: inherit;
}


.ascii-content ol,
.ascii-content ul {
    margin: 8px 0 20px 28px;
    padding: 0;
    color: #444;
    list-style-position: outside;
}


.ascii-content ol {
    list-style-type: decimal;
}


.ascii-content ul {
    list-style-type: disc;
}


.ascii-content li {
    margin-bottom: 8px;
    padding-left: 3px;
    color: #444;
    font-size: 17px;
    line-height: 1.65;
}


.ascii-content ol li {
    list-style: decimal;
}


.ascii-content ul li {
    list-style: disc;
}


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

.ascii-faq-section {
    margin-top: 38px;
}


.ascii-faq-section > h2 {
    margin-bottom: 16px;
}


.ascii-faq-item {
    padding: 17px 0;
    border-bottom: 1px solid #e1e4e8;
}


.ascii-faq-item:first-of-type {
    border-top: 1px solid #e1e4e8;
}


.ascii-faq-item h3 {
    margin: 0 0 7px;
    padding: 0;
    color: #333;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
}


.ascii-faq-item p {
    margin: 0;
    padding: 0;
    color: #444;
    font-size: 16px;
    line-height: 1.65;
}


/* ============================================================
   BOTTOM HOMEPAGE LINK
   ============================================================ */

.ascii-content .ascii-bottom-link {
    margin-top: 30px;
    padding: 14px 16px;
    border: 1px solid #dce5f1;
    border-radius: 8px;
    background: #f7faff;
    color: #444;
    font-size: 15px;
    line-height: 1.6;
}


/* ============================================================
   RAPTIVE SIDEBAR
   KEEP THE ID UNCHANGED
   ============================================================ */

.ascii-layout > #sidebar {
    position: relative;
    align-self: stretch;
    width: 300px;
    min-width: 300px;
    min-height: 600px;
}


/* ============================================================
   1280PX
   ============================================================ */

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

    .ascii-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 22px;
    }


    .ascii-layout > #sidebar {
        width: 280px;
        min-width: 280px;
    }

}


/* ============================================================
   992PX
   SIDEBAR MOVES BELOW MAIN CONTENT
   ============================================================ */

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

    .ascii-page {
        padding-top: 95px;
    }


    .ascii-layout {
        display: block;
        max-width: 820px;
    }


    .ascii-main {
        width: 100%;
    }


    .ascii-layout > #sidebar {
        width: 100%;
        min-width: 0;
        min-height: 0;
        margin-top: 28px;
    }

}


/* ============================================================
   760PX
   TABLET / MOBILE
   ============================================================ */

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

    .ascii-page {
        padding: 88px 12px 26px;
    }


    .ascii-heading {
        margin-bottom: 18px;
    }


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


    .ascii-intro {
        font-size: 16px;
    }


    .ascii-tool-card {
        padding: 16px;
    }


    .ascii-tabs {
        margin-bottom: 19px;
        padding-bottom: 14px;
    }


    .ascii-tab {
        min-height: 43px;
        padding: 9px 11px;
        font-size: 14px;
    }


    .ascii-tab i {
        font-size: 17px;
    }


    .ascii-text-input {
        height: 100px;
        font-size: 17px;
    }


    .ascii-section-heading h2,
    .ascii-image-heading h2 {
        font-size: 21px;
    }


    .ascii-font-preview-wrapper {
        height: 150px;
    }


    .ascii-font-output {
        font-size: 11px;
    }


    .ascii-image-settings {
        padding: 16px;
    }


    .ascii-content {
        margin-top: 30px;
    }


    .ascii-content h2 {
        font-size: 23px;
    }


    .ascii-content p,
    .ascii-content li {
        font-size: 16px;
        line-height: 1.65;
    }


    .ascii-content h3 {
        font-size: 19px;
    }

}


/* ============================================================
   560PX
   SMALL MOBILE
   ============================================================ */

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

    .ascii-page {
        padding: 85px 10px 24px;
    }


    .ascii-heading h1 {
        font-size: 26px;
    }


    .ascii-intro {
        font-size: 15px;
        line-height: 1.5;
    }


    .ascii-tool-card {
        padding: 13px;
    }


    .ascii-tabs {
        gap: 7px;
        margin-bottom: 17px;
        padding-bottom: 13px;
    }


    .ascii-tab {
        gap: 5px;
        min-height: 42px;
        padding: 8px 7px;
        font-size: 13px;
    }


    .ascii-tab i {
        font-size: 16px;
    }


    .ascii-input-label {
        font-size: 16px;
    }


    .ascii-clear-button {
        font-size: 12px;
    }


    .ascii-text-input {
        height: 95px;
        min-height: 60px;
        padding: 11px 12px;
        font-size: 16px;
    }


    .ascii-input-help {
        font-size: 12px;
    }


    .ascii-section-heading h2,
    .ascii-image-heading h2 {
        font-size: 20px;
    }


    .ascii-section-heading p,
    .ascii-image-heading p {
        font-size: 13px;
    }


    .ascii-font-toolbar {
        align-items: stretch;
        gap: 8px;
    }


    .ascii-search-wrapper {
        flex: 1 1 100%;
        max-width: none;
    }


    .ascii-font-search {
        height: 41px;
        font-size: 14px;
    }


    .ascii-font-count {
        font-size: 12px;
    }


    .ascii-font-grid {
        gap: 12px;
    }


    .ascii-font-card {
        padding: 11px;
    }


    .ascii-font-card-header {
        margin-bottom: 9px;
    }


    .ascii-font-name {
        font-size: 15px;
    }


    .ascii-font-copy-button {
        min-height: 33px;
        padding: 6px 10px;
        font-size: 12px;
    }


    .ascii-font-preview-wrapper {
        height: 145px;
        padding: 10px;
    }


    .ascii-font-output {
        font-size: 10px;
        line-height: 1.2;
    }


    .ascii-font-card-actions {
        gap: 6px;
        margin-top: 9px;
    }


    .ascii-font-secondary-button {
        min-height: 32px;
        padding: 6px 8px;
        font-size: 11px;
    }


    .ascii-font-secondary-button i {
        font-size: 14px;
    }


    .ascii-upload-zone {
        min-height: 200px;
        padding: 17px 12px;
    }


    .ascii-upload-icon {
        font-size: 35px;
    }


    .ascii-upload-title {
        font-size: 16px;
    }


    .ascii-upload-description {
        font-size: 12px;
    }


    .ascii-image-settings {
        padding: 14px;
    }


    .ascii-image-settings h3 {
        font-size: 17px;
    }


    .ascii-settings-grid {
        grid-template-columns: 1fr;
        gap: 21px;
    }


    .ascii-image-result-box {
        height: 285px;
        padding: 11px;
    }


    .ascii-image-output {
        font-size: 9px;
    }


    .ascii-image-actions {
        gap: 8px;
    }


    .ascii-action-button {
        min-height: 38px;
        padding: 8px 11px;
        font-size: 12px;
    }


    .ascii-related-tools h2 {
        font-size: 20px;
    }


    .ascii-related-grid {
        gap: 8px;
    }


    .ascii-related-card {
        min-height: 51px;
        padding: 10px;
        font-size: 12px;
    }


    .ascii-related-card i {
        font-size: 18px;
    }


    .ascii-content h2 {
        margin-top: 30px;
        font-size: 22px;
    }


    .ascii-content h3 {
        font-size: 18px;
    }


    .ascii-content p,
    .ascii-content li {
        font-size: 16px;
    }


    .ascii-content ol,
    .ascii-content ul {
        margin-left: 24px;
    }


    .ascii-faq-item h3 {
        font-size: 17px;
    }


    .ascii-faq-item p {
        font-size: 15px;
    }


    .ascii-copy-feedback {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
    }

}


/* ============================================================
   420PX
   EXTRA SMALL MOBILE
   ============================================================ */

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

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


    .ascii-intro {
        font-size: 15px;
    }


    .ascii-tab {
        font-size: 12px;
    }


    .ascii-tab i {
        font-size: 15px;
    }


    .ascii-font-name {
        font-size: 15px;
    }


    .ascii-font-preview-wrapper {
        height: 140px;
        padding: 9px;
    }


    .ascii-font-output {
        font-size: 10px;
    }


    .ascii-font-secondary-button {
        padding: 6px 7px;
        font-size: 11px;
    }


    .ascii-image-result-box {
        height: 260px;
    }


    .ascii-image-output {
        font-size: 9px;
    }


    .ascii-related-grid {
        grid-template-columns: 1fr;
    }


    .ascii-related-card {
        font-size: 13px;
    }


    .ascii-content .ascii-bottom-link {
        padding: 12px;
        font-size: 14px;
    }

}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.ascii-page button:focus-visible,
.ascii-page input:focus-visible,
.ascii-page select:focus-visible,
.ascii-page textarea:focus-visible,
.ascii-page a:focus-visible,
.ascii-page pre:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 3px;
}


.ascii-font-preview-wrapper:focus-within,
.ascii-image-result-box:focus-within {
    border-color: #92b5e6;
}


.ascii-upload-zone:focus-within {
    border-color: #1a73e8;
}


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

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

    .ascii-page *,
    .ascii-page *::before,
    .ascii-page *::after {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
        scroll-behavior: auto !important;
    }

}


/* ============================================================
   PRINT
   ============================================================ */

@media print {

    .ascii-page {
        padding: 15px 0;
    }


    .ascii-layout {
        display: block;
        max-width: 100%;
    }


    .ascii-layout > #sidebar,
    .ascii-tabs,
    .ascii-font-toolbar,
    .ascii-font-copy-button,
    .ascii-font-card-actions,
    .ascii-load-more-wrapper,
    .ascii-image-actions,
    .ascii-related-tools,
    .ascii-copy-feedback {
        display: none !important;
    }


    .ascii-font-card {
        break-inside: avoid;
        box-shadow: none;
    }


    .ascii-font-preview-wrapper,
    .ascii-image-result-box {
        height: auto;
        max-height: none;
        overflow: visible;
    }


    .ascii-font-output,
    .ascii-image-output {
        color: #000;
    }

}
