:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-soft: #fff7f8;
    --text: #111111;
    --muted: #5b5b5b;
    --border: #ececec;
    --primary: #e60f2e;
    --primary-dark: #b90d25;
    --shadow: 0 20px 50px rgba(17, 17, 17, 0.06);
    --radius-xl: 28px;
    --radius-lg: 18px;
    --hero-width: 1320px;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top center, rgba(230, 15, 46, 0.08), transparent 38%),
        linear-gradient(180deg, #fff8f9 0%, #ffffff 28%);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.page-shell {
    min-height: 100vh;
}

.layout-shell {
    max-width: 1280px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.hero-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    flex: 1;
}

.hero-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.hero-nav a:hover {
    color: var(--primary);
}

.brand-mark {
    display: inline-block;
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    color: var(--text);
    text-decoration: none;
}

.brand-mark span {
    color: var(--primary);
}

.brand-tag {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.98rem;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem;
    background: #f7f7f7;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.lang-switch a {
    padding: 0.6rem 1rem;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.lang-switch a:hover {
    color: var(--primary);
}

.lang-switch a.is-active {
    color: #fff;
    background: var(--primary);
}

.lang-short {
    display: none;
}

.hero-wrap {
    padding: 2rem 0 0.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 110px;
    gap: 2rem;
    align-items: start;
}

.hero-block {
    max-width: var(--hero-width);
    margin: 0 auto;
    text-align: center;
}

.hero-side-ad {
    margin-top: 8.5rem;
}

h1 {
    max-width: 20ch;
    margin: 0 auto 1rem;
    font-size: clamp(2.2rem, 4.3vw, 4.1rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.lead-text {
    max-width: 72ch;
    margin: 0 auto 2rem;
    color: var(--muted);
    font-size: 1.12rem;
}

.generator-panel {
    max-width: 980px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.generator-form {
    max-width: 100%;
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1rem;
    color: var(--muted);
}

.loading-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    text-align: left;
}

.loading-copy strong {
    color: var(--text);
}

.loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(230, 15, 46, 0.18);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.generator-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: stretch;
}

.form-control,
.btn,
.nav-link {
    border-radius: 16px;
}

.form-control {
    min-height: 4.25rem;
    border: 1px solid rgba(230, 15, 46, 0.42);
    color: var(--text);
}

.form-control:focus {
    border-color: rgba(230, 15, 46, 0.35);
    box-shadow: 0 0 0 0.25rem rgba(230, 15, 46, 0.12);
}

.form-control::placeholder {
    color: #8a8a8a;
}

.btn-primary {
    min-width: 220px;
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 980px;
    margin: 1.25rem auto 0;
    color: #666;
    font-weight: 700;
}

.section-box {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.result-block,
.content-section,
.bottom-section,
.page-ad {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.result-block,
.content-section,
.bottom-section {
    margin-top: 2.5rem;
}

.ad-slot {
    margin: 2rem auto 0;
}

.ad-slot.is-hidden {
    display: none;
}

.page-ad {
    margin-top: 2.25rem;
}

.benefits-section {
    margin-top: 2.5rem;
}

.ad-slot-side {
    width: 100%;
    max-width: 160px;
}

.section-title {
    margin-bottom: 1rem;
    font-size: 1.65rem;
    letter-spacing: -0.03em;
}

.section-subtitle,
.faq-item p,
.content-copy p,
.feature-list li,
.footer-note {
    color: var(--muted);
}

.feature-list {
    margin: 0;
    padding-left: 1.15rem;
}

.feature-list li + li,
.faq-item + .faq-item {
    margin-top: 0.8rem;
}

.faq-item h3 {
    margin-bottom: 0.45rem;
    font-size: 1.05rem;
}

.nav-pills .nav-link {
    color: var(--text);
    border: 1px solid var(--border);
    background: transparent;
}

.nav-pills .nav-link:hover,
.btn-outline-dark:hover,
.btn-outline-dark:focus {
    color: var(--primary);
    border-color: var(--primary);
}

.nav-pills .nav-link.active {
    background: var(--primary);
    border-color: var(--primary);
}

.copy-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.download-btn {
    color: var(--muted);
    text-decoration: none;
}

.download-btn:hover,
.download-btn:focus {
    color: var(--primary);
}

.result-output {
    min-height: 22rem;
    padding: 1rem;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92rem;
    background: #fff;
    border: 1px solid var(--border);
}

.footer-note {
    max-width: 1100px;
    margin: 2.5rem auto 0;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    border-top: 1px solid var(--border);
}

.footer-note a {
    color: var(--text);
    text-decoration: none;
}

.footer-note a:hover {
    color: var(--primary);
}

.footer-note span {
    margin: 0 0.3rem;
}

.legal-wrap {
    max-width: 980px;
    margin: 0 auto;
}

.legal-box {
    padding: 2.25rem;
}

.legal-head {
    margin-bottom: 2rem;
    text-align: left;
}

.legal-kicker {
    color: var(--primary);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.legal-title {
    max-width: none;
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1;
}

.legal-intro {
    max-width: 62ch;
    margin: 0 0 1.25rem;
}

.legal-content section + section {
    margin-top: 1.75rem;
}

.legal-content h2 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

.legal-content p,
.legal-content li {
    color: var(--muted);
}

.legal-content ul {
    padding-left: 1.2rem;
}

@media (max-width: 991.98px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .generator-bar {
        grid-template-columns: 1fr;
    }

    .btn-primary {
        width: 100%;
        min-width: 0;
    }

    .section-box,
    .generator-panel {
        padding: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .layout-shell {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-header {
        display: grid;
        grid-template-columns: auto auto;
        justify-content: center;
        align-items: start;
        column-gap: 1rem;
        row-gap: 0.2rem;
        text-align: left;
    }

    .site-header > div:first-child {
        transform: translate(-0.08rem, 0.14rem);
    }

    .brand-mark {
        font-size: 1.5rem;
    }

    .brand-tag {
        font-size: 0.78rem;
    }

    .lang-switch {
        margin-left: 0;
        padding: 0.15rem;
        transform: translateX(0.12rem);
    }

    .lang-switch a {
        padding: 0.36rem 0.55rem;
        min-width: 38px;
        text-align: center;
        font-size: 0.78rem;
    }

    .lang-full {
        display: none;
    }

    .lang-short {
        display: inline;
    }

    .lead-text {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 0.85rem 1.25rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.4rem;
    }
}
