@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Manrope: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;
    --violet: #7c5cff;
    --violet-dark: #5b3df0;
    --sky: #38a4ff;
    --teal: #12d7b0;
    --teal-dark: #0aa98a;
    --pink: #ff6ac2;
    --night: #0c1230;
    --night-soft: #1b2350;
    --gradient-brand: linear-gradient(115deg, #7c5cff 0%, #38a4ff 48%, #12d7b0 100%);
    --gradient-brand-hover: linear-gradient(115deg, #5b3df0 0%, #2b8ef0 48%, #0aa98a 100%);
    --gradient-dark: linear-gradient(155deg, #0a0f28 0%, #131b44 52%, #241d58 100%);
    --gradient-aurora: linear-gradient(90deg, #12d7b0 0%, #38a4ff 30%, #7c5cff 62%, #ff6ac2 100%);
    --gradient-mesh:
        radial-gradient(ellipse at 15% 10%, rgba(124, 92, 255, 0.09) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 6%, rgba(18, 215, 176, 0.10) 0%, transparent 42%),
        radial-gradient(ellipse at 78% 88%, rgba(56, 164, 255, 0.08) 0%, transparent 46%),
        radial-gradient(ellipse at 6% 82%, rgba(255, 106, 194, 0.06) 0%, transparent 40%);
    --bg: #f5f8ff;
    --surface: #ffffff;
    --surface-2: #eef3fd;
    --surface-3: #dfe8fa;
    --surface-glass: rgba(255, 255, 255, 0.68);
    --text-primary: #121a36;
    --text-secondary: #4d5a7d;
    --text-muted: #8d99b8;
    --text-on-brand: #ffffff;
    --border: rgba(18, 26, 54, 0.08);
    --border-soft: rgba(18, 26, 54, 0.05);
    --border-mid: rgba(18, 26, 54, 0.13);
    --border-strong: rgba(18, 26, 54, 0.22);
    --ring: 0 0 0 4px rgba(124, 92, 255, 0.16);
    --ring-teal: 0 0 0 4px rgba(18, 215, 176, 0.18);
    --shadow-xs: 0 1px 3px rgba(18, 26, 54, 0.05);
    --shadow-sm: 0 4px 14px rgba(18, 26, 54, 0.07);
    --shadow-md: 0 10px 28px rgba(18, 26, 54, 0.09);
    --shadow-lg: 0 20px 48px rgba(18, 26, 54, 0.12);
    --shadow-xl: 0 30px 70px rgba(18, 26, 54, 0.16);
    --shadow-glow: 0 10px 30px rgba(124, 92, 255, 0.28), 0 4px 12px rgba(56, 164, 255, 0.18);
    --shadow-glow-teal: 0 8px 24px rgba(18, 215, 176, 0.30);
    --shadow-in: inset 0 1px 3px rgba(18, 26, 54, 0.05);
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;
    --display: 'Sora', system-ui, sans-serif;
    --ftfamily: 'Manrope', system-ui, sans-serif;
    --pfont: 'Manrope', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'Cascadia Code', monospace;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
}

.dark {
    --bg: #070c20;
    --surface: #101736;
    --surface-2: #172044;
    --surface-3: #202b56;
    --surface-glass: rgba(13, 19, 44, 0.72);
    --text-primary: #eef2ff;
    --text-secondary: #a7b2d4;
    --text-muted: #6d7899;
    --text-on-brand: #ffffff;
    --border: rgba(122, 148, 255, 0.12);
    --border-soft: rgba(238, 242, 255, 0.06);
    --border-mid: rgba(122, 148, 255, 0.18);
    --border-strong: rgba(18, 215, 176, 0.45);
    --ring: 0 0 0 4px rgba(124, 92, 255, 0.28);
    --ring-teal: 0 0 0 4px rgba(18, 215, 176, 0.25);
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.40);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.48);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
    --shadow-xl: 0 30px 70px rgba(0, 0, 0, 0.62);
    --shadow-glow: 0 10px 32px rgba(124, 92, 255, 0.35), 0 4px 14px rgba(18, 215, 176, 0.18);
    --shadow-glow-teal: 0 8px 26px rgba(18, 215, 176, 0.32);
    --gradient-mesh:
        radial-gradient(ellipse at 15% 8%, rgba(124, 92, 255, 0.16) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 4%, rgba(18, 215, 176, 0.13) 0%, transparent 42%),
        radial-gradient(ellipse at 80% 90%, rgba(56, 164, 255, 0.12) 0%, transparent 46%),
        radial-gradient(ellipse at 5% 84%, rgba(255, 106, 194, 0.09) 0%, transparent 40%);
}

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

html,
body {
    height: 100%;
}

a {
    text-decoration: none;
}

*,
*::before,
*::after {
    transition:
        background-color 0.22s ease,
        border-color 0.22s ease,
        color 0.16s ease,
        box-shadow 0.22s ease;
}

.loader,
.loader * {
    transition: none !important;
}

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

h1 {
    font-family: var(--display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
}

h2 {
    font-family: var(--ftfamily);
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    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 6px 30px rgba(10, 15, 40, 0.30);
}

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

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(238, 242, 255, 0.60);
    padding: 8px 14px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.18s, background 0.18s;
}

header a:active {
    color: #12d7b0;
    background: rgba(255, 255, 255, 0.08);
}

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

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

#themeToggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 17px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(238, 242, 255, 0.18);
    background: rgba(238, 242, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: rgba(238, 242, 255, 0.82);
    font-family: var(--ftfamily);
    font-size: 0.70rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.22s var(--ease-out);
    white-space: nowrap;
    flex-shrink: 0;
}

#themeToggle:active {
    transform: scale(0.96);
}

#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: 8px;
    padding: 18px 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: 9px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    border: 1px solid var(--border-mid);
    background: var(--surface);
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
    box-shadow: var(--shadow-xs);
}

#topMenu a:active {
    transform: scale(0.97);
    border-color: var(--violet);
    color: var(--violet-dark);
}

#topMenu a.active {
    color: var(--text-on-brand);
    background: var(--gradient-brand);
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

#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: transparent;
}

.input-section {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 16px 0 6px;
    gap: 10px;
    align-items: flex-start;
    background: var(--surface-glass);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    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 textarea {
    width: 100%;
    height: 70px;
    padding: 18px 48px 14px 24px;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--border-mid);
    background: var(--surface);
    font-family: var(--ftfamily);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0.01em;
    transition: border-color 0.2s, box-shadow 0.25s var(--ease-out);
    display: block;
    resize: none;
    line-height: 1.45;
    min-height: 54px;
    max-height: 200px;
    overflow-y: auto;
    font-variant-ligatures: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.input-section textarea::-webkit-scrollbar {
    display: none;
}

.input-section textarea {
    scrollbar-width: none;
}

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

.input-section textarea:focus {
    border-color: var(--violet);
    box-shadow: var(--ring), var(--shadow-md);
}

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

.dark .input-section textarea:focus {
    border-color: var(--teal);
    box-shadow: var(--ring-teal), var(--shadow-md);
}

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

.clear-overlay:active {
    transform: scale(0.9);
    color: var(--violet-dark);
}

#input-count {
    position: static;
    display: block;
    width: 100%;
    text-align: right;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    opacity: 0.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px 30px;
    border-radius: var(--radius-pill);
    border: none;
    font-family: var(--ftfamily);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    box-shadow: var(--shadow-glow);
    white-space: nowrap;
    transition: transform 0.2s var(--ease-spring), box-shadow 0.22s, opacity 0.18s;
}

.btn:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-sm);
}

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

.btn.secondary:active {
    color: var(--violet-dark);
    border-color: var(--violet);
    transform: scale(0.96);
}

button.btn.closeit {
    background: var(--night);
    color: var(--teal);
    box-shadow: var(--shadow-sm);
}

button#menu {
    font-size: 1.2rem;
    height: 46px;
    width: 46px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-mid);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
    transition: all 0.2s var(--ease-out);
    margin-top: 12px;
    flex-shrink: 0;
}

button#menu:active {
    transform: scale(0.94);
    border-color: var(--violet);
    color: var(--violet-dark);
}

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

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

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

#othertools a {
    padding: 10px 19px;
    background: var(--surface);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid var(--border-mid);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: all 0.2s var(--ease-out);
    box-shadow: var(--shadow-xs);
}

#othertools a:active {
    transform: scale(0.96);
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    border-color: transparent;
}

.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.22s var(--ease-spring);
}

#randomcloud p:active {
    color: var(--violet);
    transform: scale(1.08);
}

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

#randombutton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--radius-pill);
    padding: 15px 34px;
    margin-top: 12px;
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: transform 0.2s var(--ease-spring), box-shadow 0.22s;
}

#randombutton:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-sm);
}

.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: 6px;
    background: linear-gradient(90deg, rgba(124, 92, 255, 0.30), rgba(18, 215, 176, 0.30));
    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(--violet);
    border: 3px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.45);
    cursor: grab;
    transition: transform 0.15s var(--ease-spring);
}

.font-size-controller input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.2);
    cursor: grabbing;
}

.font-size-controller input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--violet);
    border: 3px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(124, 92, 255, 0.45);
    cursor: grab;
}

#results {
    width: 100%;
}

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

.cool-fontlist li {
    display: flex;
    align-items: stretch;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-mid);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform 0.22s var(--ease-out), box-shadow 0.22s, border-color 0.2s;
}

.cool-fontlist li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-aurora);
    opacity: 0;
    transition: opacity 0.22s ease;
    z-index: 3;
    pointer-events: none;
}

.cool-fontlist li:active {
    border-color: var(--violet);
}

.cool-fontlist li p {
    background: transparent;
    padding: 16px 0 32px 18px;
    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 0.18s;
}

.cool-fontlist li p:focus {
    outline: none;
    background: var(--surface-2);
}

.cool-fontlist li p:active {
    background: var(--surface-2);
}

.cool-fontlist li i,
#flourishList li i {
    position: absolute;
    bottom: 7px;
    left: 18px;
    font-size: 10px;
    font-weight: 800;
    color: var(--violet-dark);
    z-index: 2;
    display: flex;
    align-items: baseline;
    gap: 4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-style: normal;
    font-family: var(--ftfamily);
    opacity: 0.85;
}



.cool-fontlist li button.flourishit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 10px;
    background: var(--surface-2);
    border: none;
    border-left: 1px solid var(--border-mid);
    cursor: pointer;
    font-family: var(--ftfamily);
    transition: background 0.18s;
    position: relative;
    overflow: hidden;
}

.cool-fontlist li button.flourishit .material-symbols-outlined {
    font-family: var(--ftfamily);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--gradient-aurora);
    background-size: 200% auto;
    background-position: 0% center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 1px 4px rgba(124, 92, 255, 0.25));
    transition: background-position 0.45s var(--ease-out), filter 0.2s;
}

.cool-fontlist li button.flourishit:active {
    background: var(--gradient-brand);
}

.cool-fontlist li button.flourishit:active .material-symbols-outlined {
    background: none;
    -webkit-text-fill-color: var(--text-on-brand);
    color: var(--text-on-brand);
    filter: none;
}

.dark .cool-fontlist li button.flourishit {
    background: var(--surface-2);
    border-color: var(--border-soft);
}

.dark .cool-fontlist li button.flourishit .material-symbols-outlined {
    filter: drop-shadow(0 1px 5px rgba(18, 215, 176, 0.30));
}

@media (hover: hover) and (pointer: fine) {
    .cool-fontlist li button.flourishit:hover {
        background: var(--gradient-brand);
    }

    .cool-fontlist li button.flourishit:hover .material-symbols-outlined {
        background: none;
        -webkit-text-fill-color: var(--text-on-brand);
        color: var(--text-on-brand);
        filter: none;
    }
}

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

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

.dark .cool-fontlist li p:focus,
.dark .cool-fontlist li p:active {
    background: var(--surface-2);
}

.dark .cool-fontlist li i,
.dark #flourishList li i {
    color: var(--teal);
}

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

.cool-fontlist {
    margin-bottom: 36px;
}

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

.cool-fontlist h2::before {
    content: '';
    width: 22px;
    height: 3px;
    background: var(--gradient-aurora);
    border-radius: 2px;
    flex-shrink: 0;
}

.cool-fontlist h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-mid);
    border-radius: 1px;
}

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

.buttons button {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--border-mid);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s var(--ease-out);
}

.buttons button:active {
    transform: scale(0.92);
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    border-color: transparent;
}

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

#bulbBtn:active svg {
    stroke: var(--text-on-brand);
}

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

.f-m {
    position: fixed;
    top: 0;
    right: 0;
    width: 310px;
    height: 100%;
    background: var(--surface);
    border-left: 1px solid var(--border-mid);
    box-shadow: -20px 0 60px rgba(10, 15, 40, 0.18);
    z-index: 9999;
    display: none;
    overflow-y: auto;
    padding: 26px 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: 9px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    margin: 3px;
    font-family: var(--ftfamily);
    white-space: nowrap;
    transition: all 0.2s var(--ease-out);
}

.floatmenu a:active,
.right-menu a:active {
    color: var(--violet-dark);
    border-color: var(--violet);
    transform: scale(0.97);
}

.dark .f-m {
    background: var(--surface);
    border-color: var(--border-mid);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.45);
}

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

#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: 44px;
    height: 44px;
    font-size: 16px;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 10000;
    padding: 0;
    transition: all 0.2s var(--ease-out);
}

.close-button:active {
    transform: scale(0.92);
    border-color: var(--violet);
    color: var(--violet-dark);
}

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

.copied {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    position: fixed;
    top: 12%;
    right: 0;
    z-index: 9999;
    width: 214px;
    background: var(--night);
    color: var(--teal);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    border: 1px solid rgba(18, 215, 176, 0.35);
    border-right: none;
    box-shadow: -12px 12px 40px rgba(10, 15, 40, 0.35), 0 0 24px rgba(18, 215, 176, 0.15);
    animation: slideIn 0.28s var(--ease-out);
}

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

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

.copied textarea {
    background: transparent;
    border: none;
    color: rgba(18, 215, 176, 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: 4px 12px;
    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(--violet);
    border-right-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.7s 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;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(10, 15, 40, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    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: 1px solid var(--border-mid);
    box-shadow: var(--shadow-xl);
    animation: popIn 0.28s var(--ease-spring);
}

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

@keyframes popIn {
    from {
        transform: scale(0.94) translateY(14px);
        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: 1px solid var(--border-mid);
    padding: 4px 16px;
}

.popup-header h3 {
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 13px 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 0.18s, color 0.18s;
}

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

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

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

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

#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: 1px solid var(--border-mid);
    background: var(--surface-2);
    transition: border-color 0.18s, box-shadow 0.2s, transform 0.2s var(--ease-out);
}

#flourishList li:active {
    border-color: var(--violet);
}

#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: 1px 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: 10px 32px 10px 15px;
    font-size: 0.84rem;
    font-family: var(--ftfamily);
    font-weight: 700;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-mid);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.2s;
}

#flourishSelect:focus {
    border-color: var(--violet);
    box-shadow: var(--ring);
}

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

.dark #flourishSelect:focus {
    border-color: var(--teal);
    box-shadow: var(--ring-teal);
}

#flourishRegenerate {
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    background: var(--gradient-brand);
    color: var(--text-on-brand);
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: transform 0.2s var(--ease-spring), box-shadow 0.22s;
}

#flourishRegenerate:active {
    transform: scale(0.96);
    box-shadow: var(--shadow-sm);
}

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

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

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

footer::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--gradient-aurora);
    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(--teal);
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.18s;
}

footer a:active {
    color: #fff;
}

footer p,
footer span {
    color: rgba(238, 242, 255, 0.45);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
}

.info-text {
    font-family: var(--ftfamily);
    line-height: 1.85;
    color: var(--text-secondary);
    padding: 56px 52px;
    background: var(--surface);
    margin-top: 36px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-mid);
    box-shadow: var(--shadow-sm);
    white-space: normal;
    word-break: break-word;
    position: relative;
    overflow: hidden;
}

.info-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-aurora);
}

.info-text h1 {
    font-family: var(--display);
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 36px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border-mid);
    letter-spacing: -0.02em;
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    line-height: 1.22;
}

.info-text h2 {
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 50px;
    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: 5px;
    bottom: 5px;
    width: 4px;
    background: var(--gradient-aurora);
    border-radius: 3px;
}

.info-text h3 {
    font-family: var(--ftfamily);
    font-size: 1.05rem;
    font-weight: 800;
    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: 800;
}

.info-text code {
    background: var(--surface-2);
    color: var(--violet-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: 1px solid var(--border-mid);
    border-left: 4px solid var(--violet);
    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(--violet-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: 10px 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(--border-mid);
}

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

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

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

.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(--teal);
    border-color: var(--border-mid);
}

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

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

.dark .info-text .example-title {
    color: var(--teal);
}

@media (hover: hover) and (pointer: fine) {
    header a:hover {
        color: var(--teal);
        background: rgba(255, 255, 255, 0.07);
    }

    #themeToggle:hover {
        border-color: var(--teal);
        color: var(--teal);
        background: rgba(18, 215, 176, 0.10);
        box-shadow: var(--shadow-glow-teal);
        transform: translateY(-1px);
    }

    #topMenu a:hover {
        color: var(--violet-dark);
        background: var(--surface-2);
        border-color: var(--violet);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

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

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

    button:hover {
        opacity: 0.97;
    }

    .btn:hover {
        transform: translateY(-2px);
        background: var(--gradient-brand-hover);
        box-shadow: 0 14px 36px rgba(124, 92, 255, 0.36), 0 6px 16px rgba(18, 215, 176, 0.22);
        opacity: 1;
    }

    .btn.secondary:hover {
        border-color: var(--violet);
        color: var(--violet-dark);
        background: var(--surface-2);
        box-shadow: var(--shadow-sm);
        transform: translateY(-2px);
    }

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

    button#menu:hover {
        border-color: var(--violet);
        background: var(--surface-2);
        color: var(--violet-dark);
        transform: translateY(-1px);
    }

    .dark button#menu:hover {
        background: var(--surface-2);
        color: var(--teal);
        border-color: var(--teal);
    }

    #othertools a:hover {
        background: var(--gradient-brand);
        color: var(--text-on-brand);
        border-color: transparent;
        transform: translateY(-2px);
        box-shadow: var(--shadow-glow);
    }

    #randomcloud p:hover {
        color: var(--violet);
        transform: scale(1.12) rotate(-2deg);
    }

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

    #randombutton:hover {
        transform: translateY(-2px);
        background: var(--gradient-brand-hover);
        box-shadow: 0 14px 36px rgba(124, 92, 255, 0.36);
    }

    .font-size-controller input[type="range"]::-webkit-slider-thumb:hover {
        transform: scale(1.22);
    }

    .cool-fontlist li:hover {
        border-color: rgba(124, 92, 255, 0.45);
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

    .cool-fontlist li:hover::before {
        opacity: 1;
    }

    .cool-fontlist li p:hover {
        outline: none;
        background: var(--surface-2);
    }

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

    .dark .cool-fontlist li:hover {
        border-color: rgba(18, 215, 176, 0.45);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.50), 0 0 20px rgba(18, 215, 176, 0.12);
    }

    .dark .cool-fontlist li p:hover {
        background: var(--surface-2);
    }

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

    .buttons button:hover {
        background: var(--gradient-brand);
        color: var(--text-on-brand);
        border-color: transparent;
        transform: translateY(-3px);
        box-shadow: var(--shadow-glow);
    }

    #bulbBtn:hover svg {
        stroke: var(--text-on-brand);
    }

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

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

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

    .close-button:hover {
        border-color: var(--violet);
        background: var(--surface-2);
        color: var(--violet-dark);
        transform: translateY(-1px);
    }

    .dark .close-button:hover {
        background: var(--surface-2);
        color: var(--teal);
        border-color: var(--teal);
    }

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

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

    #flourishList li:hover {
        border-color: rgba(124, 92, 255, 0.45);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

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

    .dark #flourishList li:hover {
        border-color: rgba(18, 215, 176, 0.45);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    }

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

    #flourishRegenerate:hover {
        transform: translateY(-2px);
        background: var(--gradient-brand-hover);
        box-shadow: 0 14px 36px rgba(124, 92, 255, 0.36);
    }

    footer a:hover {
        color: #fff;
    }
}

a:focus-visible,
button:focus-visible,
textarea:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 2px;
}

.dark a:focus-visible,
.dark button:focus-visible,
.dark textarea:focus-visible,
.dark select:focus-visible,
.dark input:focus-visible {
    outline-color: var(--teal);
}

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

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

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

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

    .input-section textarea {
        font-size: 16px;
    }

    #flourishSelect {
        font-size: 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.75rem;
    }

    .floatmenu a {
        display: block;
    }

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

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