:root {
    color-scheme: dark;
    --bg: #09111d;
    --bg-soft: #0f1a2b;
    --panel: #111c2d;
    --panel-strong: #0d1726;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #f3f7ff;
    --text-soft: #b8c4d8;
    --accent: #67e8f9;
    --accent-strong: #22d3ee;
    --success-bg: rgba(34, 197, 94, 0.14);
    --success-border: rgba(34, 197, 94, 0.3);
    --success-text: #d8ffe7;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: 1120px;
    --transition: 0.18s ease;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    background:
        radial-gradient(circle at top left, rgba(103, 232, 249, 0.08), transparent 26%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.1), transparent 30%),
        linear-gradient(180deg, #07101a 0%, #0a1420 100%);
    color: var(--text);
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: inherit;
}

.tool-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tool-header,
.tool-main,
.tool-footer {
    width: 100%;
}

.tool-header__inner,
.tool-main,
.tool-footer {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.tool-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(7, 14, 24, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tool-header__inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.tool-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.tool-brand__logo {
    height: 34px;
    width: auto;
}

.tool-header__nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.tool-header__link {
    text-decoration: none;
    color: var(--text-soft);
    font-weight: 600;
    transition: color var(--transition);
}

.tool-header__link:hover,
.tool-header__link:focus-visible {
    color: var(--text);
}

.tool-main {
    flex: 1;
    padding: 40px 0 48px;
}

.tool-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 22px;
    margin-bottom: 26px;
}

.tool-hero__content,
.tool-hero__badge-group {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.tool-hero__content {
    padding: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        linear-gradient(135deg, rgba(103, 232, 249, 0.08), rgba(96, 165, 250, 0.04));
}

.tool-hero__logo-wrap {
    margin-bottom: 18px;
}

.tool-hero__logo {
    max-height: 76px;
    width: auto;
}

.tool-hero__eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tool-hero__title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.02;
}

.tool-hero__tagline {
    margin: 12px 0 0;
    font-size: 1.08rem;
    color: var(--text);
}

.tool-hero__description {
    margin: 14px 0 0;
    max-width: 64ch;
    color: var(--text-soft);
    line-height: 1.75;
}

.tool-hero__badge-group {
    padding: 20px;
    display: grid;
    gap: 12px;
    align-content: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        linear-gradient(135deg, rgba(103, 232, 249, 0.05), rgba(96, 165, 250, 0.03));
}

.tool-badge {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(8, 15, 28, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tool-badge__label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tool-badge__value {
    display: block;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
}

.generator-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at top left, rgba(103, 232, 249, 0.08), transparent 28%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.015)),
        var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.generator-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.generator-card__eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.generator-card__title {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
}

.generator-card__status {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-soft);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
}

.generator-card__status.is-copied {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.preset-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.preset-tab {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    padding: 11px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition:
        border-color var(--transition),
        background var(--transition),
        color var(--transition),
        transform var(--transition);
    font-weight: 700;
}

.preset-tab:hover,
.preset-tab:focus-visible {
    color: var(--text);
    border-color: rgba(103, 232, 249, 0.35);
    transform: translateY(-1px);
}

.preset-tab.is-active {
    background: rgba(103, 232, 249, 0.14);
    color: var(--text);
    border-color: rgba(103, 232, 249, 0.42);
    box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.08);
}

.generator-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.control-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-soft);
    font-weight: 600;
    cursor: pointer;
}

.control-toggle input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-strong);
    cursor: pointer;
}

.generator-output-wrap {
    position: relative;
    margin-bottom: 18px;
}

.generator-output {
    position: relative;
    min-height: 122px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
        rgba(8, 15, 28, 0.78);
    border: 1px solid var(--border-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.1;
    word-break: break-word;
    cursor: pointer;
    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}

.generator-output:hover,
.generator-output:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(103, 232, 249, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 0 0 1px rgba(103, 232, 249, 0.08);
}

.generator-output.is-refreshing {
    opacity: 0.5;
}

.mini-action {
    position: absolute;
    right: 14px;
    bottom: 14px;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 19, 31, 0.92);
    color: var(--text-soft);
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.mini-action:hover,
.mini-action:focus-visible {
    color: var(--text);
    border-color: rgba(103, 232, 249, 0.3);
    background: rgba(14, 23, 36, 0.96);
}

.generator-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tool-button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 14px 20px;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}

.tool-button:hover,
.tool-button:focus-visible {
    transform: translateY(-1px);
}

.tool-button--primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #06111a;
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.18);
}

.tool-button--secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.generator-help {
    margin-top: 14px;
}

.generator-help p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.6;
    font-size: 0.95rem;
}

.tool-footer {
    padding: 0 0 34px;
}

.tool-footer p {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
    color: var(--text-soft);
    text-align: center;
}

@media (max-width: 920px) {
    .tool-hero {
        grid-template-columns: 1fr;
    }

    .tool-main {
        padding-top: 28px;
    }
}

@media (max-width: 720px) {
    .tool-header__inner {
        min-height: auto;
        padding: 16px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .tool-header__nav {
        gap: 14px;
    }

    .tool-hero__content,
    .tool-hero__badge-group,
    .generator-card {
        padding: 22px;
    }

    .generator-output {
        min-height: 110px;
        padding: 24px 18px 58px;
    }

    .mini-action {
        right: 12px;
        bottom: 12px;
    }
}

@media (max-width: 520px) {
    .tool-header__inner,
    .tool-main,
    .tool-footer {
        width: min(calc(100% - 20px), var(--container));
    }

    .preset-tabs,
    .generator-controls,
    .generator-card__actions {
        gap: 10px;
    }

    .preset-tab,
    .tool-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .control-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .generator-output {
        font-size: 1.7rem;
    }
}