@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --maxw: 1200px;
    --coral: #ff5d5d;
    --coral-dark: #e6483f;
    --tangerine: #ff8a3d;
    --grape: #2b1d3f;
    --grape-soft: #4a3766;
    --lime: #c6f135;
    --lime-dark: #a8d61e;
    --aqua: #2ee6c5;
    --gradient-brand: linear-gradient(120deg, #ff5d5d 0%, #ff8a3d 55%, #ffc23d 100%);
    --gradient-brand-hover: linear-gradient(120deg, #ff7a3d 0%, #ff5d5d 60%, #e6483f 100%);
    --gradient-dark: linear-gradient(160deg, #2b1d3f 0%, #432c5e 55%, #582f6e 100%);
    --gradient-mesh:
        radial-gradient(circle at 12% 18%, rgba(255, 138, 61, 0.10) 0%, transparent 42%),
        radial-gradient(circle at 88% 8%, rgba(198, 241, 53, 0.14) 0%, transparent 38%);
    --bg: #fff8f0;
    --surface: #ffffff;
    --surface-2: #fff1e4;
    --surface-3: #ffe6d1;
    --surface-glass: rgba(255, 255, 255, 0.92);
    --text-primary: #241730;
    --text-secondary: #6b5d7d;
    --text-muted: #a698b5;
    --text-on-brand: #2b1208;
    --border: rgba(43, 29, 63, 0.08);
    --border-soft: rgba(43, 29, 63, 0.05);
    --border-mid: rgba(43, 29, 63, 0.14);
    --border-strong: #241730;
    --shadow-xs: 0 1px 2px rgba(43, 29, 63, 0.06);
    --shadow-sm: 0 2px 8px rgba(43, 29, 63, 0.08);
    --shadow-md: 0 6px 16px rgba(43, 29, 63, 0.10);
    --shadow-lg: 0 10px 24px rgba(43, 29, 63, 0.14);
    --shadow-xl: 0 14px 32px rgba(43, 29, 63, 0.18);
    --shadow-pop: 4px 6px 0 var(--border-strong);
    --shadow-pop-sm: 3px 4px 0 var(--border-strong);
    --shadow-coral: 0 8px 20px rgba(255, 93, 93, 0.32);
    --shadow-lime: 0 5px 14px rgba(198, 241, 53, 0.40);
    --shadow-in: inset 0 1px 2px rgba(43, 29, 63, 0.05);
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --radius-pill: 999px;
    --display: 'Fredoka', system-ui, sans-serif;
    --ftfamily: 'Plus Jakarta Sans', system-ui, sans-serif;
    --pfont: 'Plus Jakarta Sans', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'Cascadia Code', monospace;
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.30, 1);
    --ease-pop: cubic-bezier(0.68, -0.4, 0.27, 1.4);
}

.dark {
    --bg: #1a1126;
    --surface: #251934;
    --surface-2: #2e1f40;
    --surface-3: #392a4d;
    --surface-glass: rgba(37, 25, 52, 0.94);
    --text-primary: #f7f0fa;
    --text-secondary: #b9a8c9;
    --text-muted: #7c6c8e;
    --border: rgba(198, 241, 53, 0.10);
    --border-soft: rgba(247, 240, 250, 0.06);
    --border-mid: rgba(198, 241, 53, 0.16);
    --border-strong: #c6f135;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.30);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.36);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.44);
    --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.52);
    --shadow-xl: 0 14px 32px rgba(0, 0, 0, 0.60);
    --shadow-pop: 4px 6px 0 var(--border-strong);
    --shadow-pop-sm: 3px 4px 0 var(--border-strong);
    --shadow-coral: 0 8px 20px rgba(255, 93, 93, 0.28);
    --shadow-lime: 0 5px 14px rgba(198, 241, 53, 0.28);
    --gradient-mesh:
        radial-gradient(circle at 12% 18%, rgba(255, 138, 61, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 88% 8%, rgba(198, 241, 53, 0.10) 0%, transparent 38%);
}

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

html,
body {
    height: 100%;
}

a {
    text-decoration: none;
}

body {
    font-family: var(--ftfamily);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    background-color: var(--bg);
    background-image: var(--gradient-mesh);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 100px;
}

h1 {
    font-family: var(--display);
    font-size: 2.3rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0;
}

h2 {
    font-family: var(--ftfamily);
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

h3 {
    font-family: var(--ftfamily);
    font-weight: 700;
    color: var(--text-secondary);
}

header {
    background: var(--gradient-dark);
    position: relative;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(43, 29, 63, 0.22);
}

header::after {
    content: '';
    display: block;
    height: 3px;
    width: 100%;
    background: var(--gradient-brand);
    position: absolute;
    bottom: 0;
    left: 0;
}

header .inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    height: 62px;
}

header a {
    color: rgba(247, 240, 250, 0.62);
    padding: 7px 14px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.18s, background-color 0.18s, transform 0.18s;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

@media (hover: hover) and (pointer: fine) {
    header a:hover {
        color: var(--lime);
        background: rgba(255, 255, 255, 0.08);
        transform: translateY(-1px);
    }
}

.entry-header {
    width: 100%;
    text-align: center;
    padding: 10px 0 2px;
}

.entry-header p {
    color: var(--text-secondary);
}

#themeToggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.14);
    color: rgba(247, 240, 250, 0.80);
    font-family: var(--ftfamily);
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out),
        color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
    white-space: nowrap;
    flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
    #themeToggle:hover {
        background: var(--lime);
        border-color: var(--lime);
        color: #1a1126;
        box-shadow: var(--shadow-lime);
        transform: translateY(-1px);
    }
}

#themeToggle .icon-sun,
#themeToggle .icon-moon {
    font-size: 13px;
    line-height: 1;
}

#themeToggle .icon-moon {
    display: inline;
}

#themeToggle .icon-sun {
    display: none;
}

#themeToggle .label-dark {
    display: inline;
}

#themeToggle .label-light {
    display: none;
}

.dark #themeToggle .icon-moon {
    display: none;
}

.dark #themeToggle .icon-sun {
    display: inline;
}

.dark #themeToggle .label-dark {
    display: none;
}

.dark #themeToggle .label-light {
    display: inline;
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

#topMenu {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

#topMenu::-webkit-scrollbar {
    display: none;
}

#topMenu a {
    display: inline-flex;
    align-items: center;
    padding: 8px 17px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border: 1.5px solid var(--border-mid);
    background: var(--surface);
    transition: color 0.18s var(--ease-out), background-color 0.18s var(--ease-out),
        border-color 0.18s var(--ease-out), transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
}

@media (hover: hover) and (pointer: fine) {
    #topMenu a:hover {
        color: var(--coral-dark);
        background: var(--surface-2);
        border-color: var(--coral);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

    .dark #topMenu a:hover {
        color: var(--lime);
        background: var(--surface-2);
        border-color: var(--lime);
    }
}

#topMenu a.active {
    color: var(--text-on-brand);
    background: var(--gradient-brand);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-pop-sm);
    transform: translate(-1px, -1px);
}

#topMenu h3 {
    font-size: 0.60rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin: 0 6px;
    white-space: nowrap;
    opacity: 0.7;
}

.dark #topMenu a {
    background: var(--surface);
    border-color: var(--border-mid);
    color: var(--text-secondary);
}

.dark #topMenu a.active {
    color: var(--text-on-brand);
    background: var(--gradient-brand);
    border-color: var(--lime);
}

.input-section {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 14px 0 16px;
    gap: 10px;
    align-items: center;
    background: var(--surface-glass);
    border-bottom: 1px solid var(--border);
    margin-left: -24px;
    margin-right: -24px;
    padding-left: 24px;
    padding-right: 24px;
}

.input-section div {
    width: 100%;
    position: relative;
}

.input-section input {
    width: 100%;
    padding: 15px 54px 15px 24px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border-strong);
    background: var(--surface);
    font-family: var(--ftfamily);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    box-shadow: var(--shadow-pop-sm);
    letter-spacing: 0.01em;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s var(--ease-out);
}

.input-section input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.input-section input:focus {
    border-color: var(--coral);
    box-shadow: var(--shadow-pop);
    transform: translate(-1px, -1px);
}

#input-count {
    position: absolute;
    right: 26px;
    bottom: 4px;
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.clear-overlay {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 10;
    transition: color 0.18s, background-color 0.18s;
}

.clear-overlay:hover {
    color: var(--coral-dark);
    background: var(--surface-2);
}

.dark .input-section {
    border-color: var(--border);
}

.dark .input-section input {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.dark .input-section input:focus {
    border-color: var(--lime);
    box-shadow: var(--shadow-pop);
}

button,
#othertools a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    background: transparent;
    font-size: 16px;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--ftfamily);
}

button:hover {
    opacity: 0.95;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 28px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border-strong);
    font-family: var(--ftfamily);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    box-shadow: var(--shadow-pop);
    white-space: nowrap;
    transition: transform 0.18s var(--ease-pop), box-shadow 0.18s, opacity 0.18s;
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translate(-2px, -2px);
        box-shadow: 6px 8px 0 var(--border-strong);
        opacity: 1;
    }

    .dark .btn:hover {
        box-shadow: 6px 8px 0 var(--lime);
    }
}

.btn:active {
    transform: translate(1px, 2px);
    box-shadow: 1px 2px 0 var(--border-strong);
}

.btn.secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border-color: var(--border-mid);
    box-shadow: var(--shadow-xs);
}

@media (hover: hover) and (pointer: fine) {
    .btn.secondary:hover {
        border-color: var(--coral);
        color: var(--coral-dark);
        background: var(--surface-2);
        box-shadow: var(--shadow-sm);
        transform: translateY(-2px);
    }

    .dark .btn.secondary:hover {
        background: var(--surface-2);
        color: var(--lime);
        border-color: var(--lime);
    }
}

button.btn.closeit {
    background: var(--grape);
    color: var(--lime);
    border-color: var(--grape);
}

button#menu {
    font-size: 1.2rem;
    height: 44px;
    width: 44px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-strong);
    background: var(--surface);
    box-shadow: var(--shadow-pop-sm);
    color: var(--text-secondary);
    transition: border-color 0.18s var(--ease-pop), background-color 0.18s var(--ease-pop),
        color 0.18s var(--ease-pop), transform 0.18s var(--ease-pop);
}

@media (hover: hover) and (pointer: fine) {
    button#menu:hover {
        border-color: var(--coral);
        background: var(--surface-2);
        color: var(--coral-dark);
        transform: translate(-1px, -1px);
    }
}

.dark button#menu {
    background: var(--surface);
    border-color: var(--lime);
    color: var(--text-secondary);
}

@media (hover: hover) and (pointer: fine) {
    .dark button#menu:hover {
        background: var(--surface-2);
        color: var(--lime);
    }
}

#othertools a {
    padding: 9px 18px;
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    border: 1.5px solid var(--border-mid);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color 0.18s var(--ease-out), background-color 0.18s var(--ease-out),
        border-color 0.18s var(--ease-out), transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
    box-shadow: var(--shadow-xs);
}

@media (hover: hover) and (pointer: fine) {
    #othertools a:hover {
        background: var(--gradient-brand);
        color: var(--text-on-brand);
        border-color: var(--border-strong);
        transform: translateY(-2px);
        box-shadow: var(--shadow-coral);
    }

    .dark #othertools a:hover {
        background: var(--gradient-brand);
        color: var(--text-on-brand);
        border-color: var(--lime);
    }
}

.dark #othertools a {
    background: var(--surface);
    color: var(--text-secondary);
    border-color: var(--border-mid);
}

svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

#randomcloud {
    text-align: center;
    width: 100%;
    overflow: auto;
    scrollbar-width: none;
}

#randomcloud::-webkit-scrollbar {
    display: none;
}

#randomcloud li {
    background: transparent;
    border: none;
    box-shadow: none;
}

#randomcloud p {
    color: var(--text-secondary);
    background: transparent;
    text-align: center;
    border: none;
    font-size: 26px !important;
    padding: 10px 0 0;
    margin: 0;
    cursor: pointer;
    font-family: var(--pfont);
    transition: color 0.18s, transform 0.2s var(--ease-spring);
}

@media (hover: hover) and (pointer: fine) {
    #randomcloud p:hover {
        color: var(--coral);
        transform: scale(1.14) rotate(-2deg);
    }

    .dark #randomcloud p:hover {
        color: var(--lime);
    }
}

.dark #randomcloud p {
    color: var(--text-secondary);
}

#randombutton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-pill);
    padding: 14px 32px;
    margin-top: 12px;
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid var(--border-strong);
    cursor: pointer;
    box-shadow: var(--shadow-pop);
    transition: transform 0.18s var(--ease-pop), box-shadow 0.18s;
}

@media (hover: hover) and (pointer: fine) {
    #randombutton:hover {
        transform: translate(-2px, -2px);
        box-shadow: 6px 8px 0 var(--border-strong);
    }
}

.font-size-controller {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: flex-end;
    padding: 10px 0;
}

.font-size-controller label {
    font-size: 0.64rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.font-size-controller input[type="range"] {
    width: 200px;
    height: 5px;
    background: var(--surface-3);
    border-radius: var(--radius-pill);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    border: none;
}

.font-size-controller input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--coral);
    border: 3px solid var(--border-strong);
    border-radius: 50%;
    box-shadow: var(--shadow-pop-sm);
    cursor: grab;
    transition: transform 0.15s var(--ease-spring);
}

@media (hover: hover) and (pointer: fine) {
    .font-size-controller input[type="range"]::-webkit-slider-thumb:hover {
        transform: scale(1.25);
    }
}

.font-size-controller input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--coral);
    border: 3px solid var(--border-strong);
    border-radius: 50%;
    cursor: grab;
}

#results {
    width: 100%;
}

.grid ul {
    display: grid;
    margin: 0;
    padding: 0;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
    list-style: none;
}

.onlinefontchangerlist li {
    display: flex;
    align-items: stretch;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1.5px solid var(--border-mid);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform 0.2s var(--ease-pop), box-shadow 0.2s, border-color 0.18s;
}

@media (hover: hover) and (pointer: fine) {
    .onlinefontchangerlist li:hover {
        border-color: var(--border-strong);
        transform: translate(-3px, -3px);
        box-shadow: var(--shadow-pop);
    }

    .dark .onlinefontchangerlist li:hover {
        border-color: var(--lime);
        box-shadow: 4px 6px 0 var(--lime);
    }
}

.onlinefontchangerlist li p {
    background: transparent;
    padding: 16px 0 30px 16px;
    margin: 0;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    text-align: left;
    width: 100%;
    position: relative;
    white-space: normal;
    word-break: break-word;
    font-family: var(--pfont);
    overflow: hidden;
    border: none;
    line-height: 1.55;
    transition: background-color 0.18s;
}

.onlinefontchangerlist li p:hover,
.onlinefontchangerlist li p:focus {
    outline: none;
    background: var(--surface-2);
}

.onlinefontchangerlist li i,
#flourishList li i {
    position: absolute;
    bottom: 6px;
    left: 16px;
    font-size: 10px;
    font-weight: 800;
    color: var(--coral-dark);
    z-index: 2;
    display: flex;
    align-items: baseline;
    gap: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-style: normal;
    font-family: var(--ftfamily);
    opacity: 0.8;
}

.onlinefontchangerlist li button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 800;
    padding: 8px;
    gap: 4px;
    color: var(--text-muted);
    background: var(--surface-2);
    border: none;
    border-left: 1.5px solid var(--border-mid);
    cursor: pointer;
    font-family: var(--ftfamily);
    letter-spacing: 0.06em;
    text-transform: capitalize;
    transition: background-color 0.18s, color 0.18s;
}

.onlinefontchangerlist li button:hover {
    background: var(--gradient-brand);
    color: var(--text-on-brand);
}

.dark .onlinefontchangerlist li {
    background: var(--surface);
    border-color: var(--border-mid);
}

.dark .onlinefontchangerlist li p {
    background: var(--surface);
}

.dark .onlinefontchangerlist li p:hover,
.dark .onlinefontchangerlist li p:focus {
    background: var(--surface-2);
}

.dark .onlinefontchangerlist li i,
.dark #flourishList li i {
    color: var(--lime);
}

.dark .onlinefontchanger li button {
    background: var(--surface-2);
    color: var(--text-muted);
    border-color: var(--border-soft);
}

.dark .onlinefontchanger li button:hover {
    background: var(--gradient-brand);
    color: var(--text-on-brand);
}

.onlinefontchangerlist {
    margin-bottom: 32px;
}

.onlinefontchangerlist h2 {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.70rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.onlinefontchangerlist h2::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--surface-3);
    border-radius: 2px;
}

.buttons {
    position: fixed;
    right: 18px;
    bottom: 80px;
    z-index: 99;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.buttons button {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow-pop-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background-color 0.18s var(--ease-pop), color 0.18s var(--ease-pop),
        border-color 0.18s var(--ease-pop), transform 0.18s var(--ease-pop);
}

@media (hover: hover) and (pointer: fine) {
    .buttons button:hover {
        background: var(--gradient-brand);
        color: var(--text-on-brand);
        border-color: var(--border-strong);
        transform: translate(-2px, -2px);
        box-shadow: var(--shadow-pop);
    }

    .dark .buttons button:hover {
        background: var(--gradient-brand);
        color: var(--text-on-brand);
    }
}

#bulbBtn svg {
    stroke: var(--coral);
}

@media (hover: hover) and (pointer: fine) {
    #bulbBtn:hover svg {
        stroke: var(--text-on-brand);
    }
}

.dark .buttons button {
    background: var(--surface-2);
    color: var(--text-secondary);
    border-color: var(--lime);
}

.f-m {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: var(--surface);
    border-left: 2px solid var(--border-strong);
    box-shadow: -8px 0 24px rgba(43, 29, 63, 0.20);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    padding: 24px 20px;
}

.floatmenu h3 {
    color: var(--text-muted);
    font-size: 0.60rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 800;
    margin-bottom: 8px;
}

.floatmenu a,
.right-menu a {
    display: inline-block;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-2);
    border: 1.5px solid var(--border-mid);
    margin: 3px;
    font-family: var(--ftfamily);
    white-space: nowrap;
    transition: color 0.18s var(--ease-out), background-color 0.18s var(--ease-out),
        border-color 0.18s var(--ease-out), transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {

    .floatmenu a:hover,
    .right-menu a:hover {
        color: var(--coral-dark);
        background: var(--surface-3);
        border-color: var(--coral);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

    .dark .floatmenu a:hover,
    .dark .right-menu a:hover {
        background: var(--surface-3);
        color: var(--lime);
        border-color: var(--lime);
    }
}

.dark .f-m {
    background: var(--surface);
    border-color: var(--lime);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}

.dark .floatmenu a,
.dark .right-menu a {
    background: var(--surface-2);
    color: var(--text-secondary);
    border-color: var(--border-mid);
}

#fMN {
    overflow: auto;
}

.fAr {
    display: none;
}

#menu {
    color: var(--text-secondary);
}

.close-button {
    position: fixed;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 16px;
    border: 2px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--surface);
    box-shadow: var(--shadow-pop-sm);
    cursor: pointer;
    z-index: 10000;
    padding: 0;
    transition: border-color 0.18s var(--ease-pop), background-color 0.18s var(--ease-pop),
        color 0.18s var(--ease-pop), transform 0.18s var(--ease-pop);
}

@media (hover: hover) and (pointer: fine) {
    .close-button:hover {
        border-color: var(--coral);
        background: var(--surface-2);
        color: var(--coral-dark);
        transform: translate(-1px, -1px);
    }
}

.dark .close-button {
    background: var(--surface);
    border-color: var(--lime);
    color: var(--text-secondary);
}

@media (hover: hover) and (pointer: fine) {
    .dark .close-button:hover {
        background: var(--surface-2);
        color: var(--lime);
    }
}

.copied {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    position: fixed;
    top: 12%;
    right: 0;
    z-index: 9999;
    width: 210px;
    background: var(--grape);
    color: var(--lime);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    border: 2px solid var(--border-strong);
    border-right: none;
    box-shadow: -8px 8px 0 rgba(43, 29, 63, 0.25);
    animation: slideIn 0.26s var(--ease-pop);
}

@keyframes slideIn {
    from {
        transform: translateX(110%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.copied textarea {
    background: transparent;
    border: none;
    color: rgba(198, 241, 53, 0.85);
    font-family: var(--mono);
    font-size: 0.78rem;
    resize: none;
    outline: none;
    padding: 6px;
}

.copied-btn {
    position: absolute;
    top: 8px;
    left: 10px;
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    border-radius: var(--radius-pill);
    padding: 3px 11px;
    font-size: 0.66rem;
    font-weight: 800;
    border: none;
    cursor: default;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.loader {
    width: 38px;
    height: 38px;
    border: 3px solid var(--surface-3);
    border-top-color: var(--coral);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.page-load-status,
.aryapage {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 24px 0;
}

.loadmore {
    text-align: center;
    padding: 16px 0;
}

.flourish-popup {
    position: fixed;
    inset: 0;
    background: rgba(26, 16, 36, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.flourish-popup.hidden {
    display: none;
}

.popup-box {
    background: var(--surface);
    width: 92%;
    max-width: 460px;
    max-height: 72vh;
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border-strong);
    box-shadow: var(--shadow-xl);
    animation: popIn 0.26s var(--ease-pop);
}

.popup-box::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--gradient-brand);
    flex-shrink: 0;
}

@keyframes popIn {
    from {
        transform: scale(0.92) translateY(16px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-2);
    border-bottom: 1.5px solid var(--border-mid);
    padding: 4px 16px;
}

.popup-header h3 {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px 0;
    margin: 0;
}

.popup-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 14px;
    border-radius: var(--radius-sm);
    transition: background-color 0.18s, color 0.18s;
}

.popup-header button:hover {
    background: var(--surface-3);
    color: var(--coral-dark);
}

.dark .popup-box {
    background: var(--surface);
    border-color: var(--lime);
}

.dark .popup-header {
    background: var(--surface-2);
    border-color: var(--border-mid);
}

.dark .popup-header h3 {
    color: var(--text-primary);
}

.dark .popup-header button:hover {
    background: var(--surface-3);
    color: var(--lime);
}

#flourishList {
    padding: 14px;
    overflow-y: auto;
    list-style: none;
    flex: 1;
}

#flourishList li {
    margin-bottom: 8px;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1.5px solid var(--border-mid);
    background: var(--surface-2);
    transition: transform 0.18s var(--ease-pop), border-color 0.18s, box-shadow 0.18s;
}

@media (hover: hover) and (pointer: fine) {
    #flourishList li:hover {
        border-color: var(--coral);
        transform: translate(-2px, -2px);
        box-shadow: var(--shadow-pop-sm);
    }

    #flourishList li:hover p {
        color: var(--coral-dark);
    }

    .dark #flourishList li:hover {
        border-color: var(--lime);
        box-shadow: 3px 4px 0 var(--lime);
    }

    .dark #flourishList li:hover p {
        color: var(--lime);
    }
}

#flourishList .count {
    display: flex;
    justify-content: flex-end;
    font-size: 9px;
    color: var(--text-muted);
    padding: 2px 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#flourishList li p {
    font-size: 1rem !important;
    color: var(--text-primary);
    border-radius: 0;
    border: none;
    background: transparent;
    text-align: center;
    padding: 12px;
    font-family: var(--pfont);
    cursor: pointer;
    transition: color 0.15s;
}

.dark #flourishList li {
    background: var(--surface-2);
    border-color: var(--border-mid);
}

.dark #flourishList li p {
    color: var(--text-primary);
}

.flourishit {
    padding: 14px 18px;
    text-align: center;
    border-top: 1.5px solid var(--border-mid);
    background: var(--surface-2);
}

.dark .flourishit {
    background: var(--surface-2);
    border-color: var(--border-mid);
}

.select-flourish {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.select-flourish label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#flourishSelect {
    appearance: none;
    padding: 9px 30px 9px 14px;
    font-size: 0.84rem;
    font-family: var(--ftfamily);
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 2px solid var(--border-mid);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

#flourishSelect:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(255, 93, 93, 0.18);
}

.dark #flourishSelect {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--border-mid);
}

#flourishRegenerate {
    padding: 13px 30px;
    border-radius: var(--radius-pill);
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid var(--border-strong);
    cursor: pointer;
    box-shadow: var(--shadow-pop-sm);
    transition: transform 0.18s var(--ease-pop), box-shadow 0.18s;
}

@media (hover: hover) and (pointer: fine) {
    #flourishRegenerate:hover {
        transform: translate(-2px, -2px);
        box-shadow: var(--shadow-pop);
    }
}

#flourishRegenerate:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 2px 0 var(--border-strong);
}

.ads {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    margin: 16px 0;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 2px dashed var(--border-mid);
    overflow: hidden;
}

.dark .ads {
    background: var(--surface-2);
    border-color: var(--border-mid);
}

footer {
    margin-top: 72px;
    background: var(--gradient-dark);
    padding: 36px 0;
    position: relative;
}

footer::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--gradient-brand);
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

footer .inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

footer a {
    color: var(--lime);
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.18s;
}

footer a:hover {
    color: #fff;
}

footer p,
footer span {
    color: rgba(247, 240, 250, 0.45);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}

.info-text {
    font-family: var(--ftfamily);
    line-height: 1.82;
    color: var(--text-secondary);
    padding: 52px 48px;
    background: var(--surface);
    margin-top: 32px;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border-mid);
    box-shadow: var(--shadow-sm);
    white-space: normal;
    word-break: break-word;
}

.info-text h1 {
    font-family: var(--display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--surface-3);
    letter-spacing: -0.01em;
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    line-height: 1.2;
}

.info-text h2 {
    font-family: var(--ftfamily);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 48px;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
    text-transform: none;
    font-style: normal;
    position: relative;
    padding-left: 18px;
}

.info-text h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    background: var(--gradient-brand);
    border-radius: 3px;
}

.info-text h3 {
    font-family: var(--ftfamily);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 28px;
    margin-bottom: 8px;
    font-style: normal;
}

.info-text p {
    font-size: 1rem;
    margin-bottom: 18px;
    text-align: justify;
    color: var(--text-secondary);
}

.info-text ul,
.info-text ol {
    margin-bottom: 24px;
    padding-left: 22px;
}

.info-text li {
    font-size: 1rem;
    margin-bottom: 8px;
}

.info-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.info-text code {
    background: var(--surface-2);
    color: var(--coral-dark);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-family: var(--mono);
    font-size: 0.87rem;
    word-break: break-all;
    display: inline-block;
    margin: 1px;
    border: 1px solid var(--border-mid);
}

.info-text img {
    border-radius: var(--radius-md);
}

.info-text ul {
    overflow: auto;
}

.info-text .example-box {
    background: var(--surface-2);
    border-left: 4px solid var(--coral);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 24px 0;
    box-shadow: var(--shadow-xs);
}

.info-text .example-title {
    font-weight: 800;
    font-size: 0.72rem;
    color: var(--coral-dark);
    margin-top: 14px;
    margin-bottom: 8px;
    letter-spacing: 0.10em;
    font-style: normal;
    text-transform: uppercase;
}

.info-text .example-title:first-child {
    margin-top: 0;
}

.info-text .example-box ol {
    list-style-type: decimal;
    margin-bottom: 12px;
}

.info-text .example-box li {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    color: var(--text-primary);
    background: var(--surface);
    padding: 9px 14px;
    margin-bottom: 5px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-mid);
}

.copyright-area {
    color: #fff;
}

.dark .info-text {
    background: var(--surface);
    border-color: var(--border-mid);
}

.dark .info-text h1 {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    border-color: var(--surface-3);
}

.dark .entry-header p {
    background: var(--surface);
    border-color: var(--border-mid);
    color: var(--text-secondary);
}

.dark .info-text h2 {
    color: var(--text-primary);
}

.dark .info-text h3 {
    color: var(--text-secondary);
}

.dark .info-text p {
    color: var(--text-secondary);
}

.dark .info-text strong {
    color: var(--text-primary);
}

.dark .info-text code {
    background: var(--surface-3);
    color: var(--lime);
    border-color: var(--border-mid);
}

.dark .info-text .example-box {
    background: var(--surface-2);
}

.dark .info-text .example-box li {
    background: var(--surface-3);
    border-color: var(--border-mid);
    color: var(--text-primary);
}

@media (max-width: 940px) {
    .grid ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 1.7rem;
    }

    .container {
        padding: 0 16px;
        max-width: 100%;
    }

    .input-section {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .f-m {
        width: 100%;
    }

    .font-size-controller input[type="range"] {
        width: 130px;
    }

    .grid ul {
        grid-template-columns: 1fr;
    }

    .info-text {
        padding: 28px 20px;
        border-radius: var(--radius-lg);
    }

    .info-text h1 {
        font-size: 1.8rem;
    }

    .floatmenu a {
        display: block;
    }

    .info-text h2 {
        font-size: 1.2rem;
    }

    .info-text img {
        max-width: 100% !important;
    }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}