:root {
    --ps-primary: #8a5ac5;
    --ps-bg: #f5f7fb;
    --ps-border: #e2e8f0;
    --ps-text: #0f172a;
    --ps-muted: #475569;
    --ps-success: #166534;
    --ps-success-bg: #dcfce7;
    --ps-danger: #991b1b;
    --ps-danger-bg: #fee2e2;
    --ps-info: #334155;
    --ps-info-bg: #f1f5f9;
}

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

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--ps-text);
    background:
        radial-gradient(circle at 16% 0%, rgba(138, 90, 197, 0.07), transparent 42%),
        radial-gradient(circle at 92% 10%, rgba(53, 195, 255, 0.07), transparent 38%),
        var(--ps-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.psg-container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.psg-container-wide { width: min(1240px, calc(100% - 28px)); }

.fallback-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--ps-border);
    background: rgba(255, 255, 255, 0.94);
}

.fallback-header-inner { height: 70px; display: flex; align-items: center; }

.fallback-logo {
    color: var(--ps-primary);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.generator-shell { padding-bottom: 48px; flex: 1 0 auto; }

.hero {
    padding: 44px 0 52px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 251, 255, 0.9));
    border-bottom: 1px solid rgba(203, 213, 225, 0.75);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    right: -130px;
    top: -130px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 90, 197, 0.14), rgba(53, 195, 255, 0.02) 65%, transparent 78%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    justify-items: center;
    text-align: center;
    max-width: 920px;
}

.hero h1 {
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: #101626;
    font-size: clamp(1.65rem, 3.4vw, 2.45rem);
}

.hero p { margin: 0; color: #334155; line-height: 1.58; }

.hero-cta {
    display: inline-flex;
    margin-top: 4px;
    padding: 9px 16px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d5dde9;
    text-decoration: none;
    color: #364152;
    font-size: 0.82rem;
    font-weight: 700;
}

.generator-stage {
    margin-top: 20px;
    border: 1px solid #dbe4f2;
    border-radius: 20px;
    background: rgba(252, 253, 255, 0.92);
    box-shadow: 0 24px 34px -30px rgba(15, 23, 42, 0.55);
    overflow: hidden;
}

.builder-strip {
    padding: 14px 18px 12px;
    background: rgba(246, 249, 255, 0.75);
    border-bottom: 1px solid #e4ebf7;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.builder-pill {
    border: 1px solid #d3dce8;
    background: #fff;
    border-radius: 999px;
    color: #475569;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.content-section { padding: 24px 22px 30px; display: grid; gap: 16px; }

.tool-card {
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 26px -26px rgba(15, 23, 42, 0.55);
    padding: 18px;
}

.card-header { margin-bottom: 16px; }
.card-header h2 { margin: 0; font-size: 1.08rem; }
.card-header p { margin: 8px 0 0; color: #475569; font-size: 0.92rem; line-height: 1.52; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.info-card {
    border: 1px solid #dbe4f0;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
    display: grid;
    gap: 8px;
    min-height: 120px;
}

.info-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.info-card header span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    color: #64748b;
    font-family: 'Orbitron', sans-serif;
}

.info-card p {
    margin: 0;
    color: #1e293b;
    font-size: 0.87rem;
    line-height: 1.5;
    word-break: break-word;
}

.copy-btn,
.btn-primary {
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 0.73rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 7px 9px;
    cursor: pointer;
}

.copy-btn {
    color: #334155;
    background: #fff;
    border-color: #cbd5e1;
}

.send-form {
    display: grid;
    gap: 12px;
    max-width: 680px;
}

label { display: grid; gap: 6px; font-size: 0.83rem; color: #334155; font-weight: 600; }

input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    padding: 10px 11px;
}

input:focus {
    outline: none;
    border-color: #8a5ac5;
    box-shadow: 0 0 0 4px rgba(138, 90, 197, 0.14);
}

.btn-primary {
    width: fit-content;
    color: #fff;
    background: linear-gradient(135deg, #8a5ac5, #6f3eaf);
    border-color: #7f4bbb;
    padding: 10px 12px;
    font-size: 0.82rem;
}

.status-box {
    margin-top: 12px;
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--ps-info-bg);
    color: var(--ps-info);
    border: 1px solid #dbe4f0;
    font-size: 0.9rem;
}

.status-box.is-success { background: var(--ps-success-bg); color: var(--ps-success); border-color: #bbf7d0; }
.status-box.is-error { background: var(--ps-danger-bg); color: var(--ps-danger); border-color: #fecaca; }

.generator-seo {
    padding: 42px 0;
    margin-top: 12px;
    border-top: 1px solid #deebf7;
    background: linear-gradient(180deg, rgba(248, 250, 253, 0.9), rgba(241, 247, 255, 0.85));
}

.generator-seo h2 {
    margin: 0;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-size: clamp(1rem, 2.2vw, 1.34rem);
}

.seo-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.seo-grid article {
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #fff;
    padding: 14px;
}

.seo-grid h3 { margin: 0; font-size: 0.95rem; }
.seo-grid p { margin: 8px 0 0; color: #475569; line-height: 1.58; font-size: 0.9rem; }

.generator-footer { padding: 14px 0 24px; }
.generator-footer p { margin: 0; text-align: center; color: #64748b; font-size: 0.82rem; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translate(-50%, 18px);
    opacity: 0;
    background: #0f172a;
    color: #fff;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 300;
}

.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { background: #b91c1c; }

@media (max-width: 1080px) {
    .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .content-section { padding: 18px 14px 24px; }
    .info-grid, .seo-grid { grid-template-columns: 1fr; }
    .tool-card { padding: 14px; }
    .copy-btn, .btn-primary { width: 100%; }
}
