/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #16a34a;
    --text-color: #1a1a1a;
    --text-muted: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Header */
.site-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 32px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-color);
    transition: all 0.3s;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

.hero-mini {
    text-align: center;
    padding: 40px 0 20px;
}

.hero-mini h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-mini p {
    font-size: 18px;
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 18px;
}

/* Секции */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 60px;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-color);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.step p {
    color: var(--text-muted);
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    text-align: center;
    padding: 80px 0;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.9;
}

.cta-section .btn {
    background: #fff;
    color: var(--primary-color);
}

.cta-section .btn:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-toggle {
    font-size: 24px;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
}

.faq-item.active .faq-answer {
    padding: 0 24px 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Footer */
.site-footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3,
.footer-col h4 {
    margin-bottom: 16px;
}

.footer-col p {
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: var(--text-muted);
}

.footer-col ul a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 14px;
}

/* SEO-сервис */
.seo-text-page .section {
    padding: 24px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.seo-text-page .section h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.seo-text-page .section .desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.form-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    margin: 20px 0 30px;
    box-shadow: var(--shadow);
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    font-size: 15px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.form-row input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #991b1b;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

/* Score header */
.score-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.score-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

.score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring .bg {
    fill: none;
    stroke: rgba(0, 0, 0, 0.05);
    stroke-width: 8;
}

.score-ring .fg {
    fill: none;
    stroke: var(--color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    transition: stroke-dashoffset 1s ease;
}

.score-value {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 38px;
    font-weight: 700;
    color: var(--color);
}

.score-label {
/*    position: absolute;*/
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-info h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.score-info .url {
    color: var(--primary-color);
    font-size: 14px;
    word-break: break-all;
    margin-bottom: 12px;
}

.score-info .meta-line {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 4px;
}

.score-info .meta-line strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Metrics */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.metric {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.metric:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.metric .value {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.metric .label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checks */
.checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.check-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border-color);
    transition: all 0.2s;
}

.check-item:hover {
    background: var(--bg-light);
}

.check-item.pass {
    border-left-color: var(--secondary-color);
}

.check-item.warn {
    border-left-color: #d97706;
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.06), var(--bg-color) 40%);
}

.check-item.fail {
    border-left-color: #dc2626;
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.06), var(--bg-color) 40%);
}

.check-item.info {
    border-left-color: var(--primary-color);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.04), var(--bg-color) 40%);
}

.check-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.check-item.pass .check-status {
    background: var(--secondary-color);
}

.check-item.warn .check-status {
    background: #d97706;
}

.check-item.fail .check-status {
    background: #dc2626;
}

.check-item.info .check-status {
    background: var(--primary-color);
}

.check-body {
    flex: 1;
    min-width: 0;
}

.check-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.check-msg {
    font-size: 14px;
    color: var(--text-muted);
}

.check-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-light);
    padding: 6px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.tab {
    padding: 10px 18px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.tab:hover {
    color: var(--text-color);
    background: var(--bg-color);
}

.tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* Word cloud */
.word-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 14px;
    padding: 28px 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    min-height: 120px;
    line-height: 1.3;
    border: 1px solid var(--border-color);
}

.word {
    font-weight: 500;
    transition: all 0.2s;
    cursor: default;
    white-space: nowrap;
    padding: 2px 4px;
    border-radius: 4px;
    position: relative;
}

.word:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
    background: rgba(0, 0, 0, 0.05);
}

.word::after {
    content: attr(data-count);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-color);
    color: var(--text-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.word:hover::after {
    opacity: 1;
}

/* Frequency table */
.freq-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.freq-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.freq-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border-color);
}

.freq-table tbody tr {
    transition: background 0.15s;
}

.freq-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

.freq-table .rank {
    color: var(--text-muted);
    width: 40px;
    font-variant-numeric: tabular-nums;
}

.freq-table .word {
    color: var(--text-color);
    font-weight: 500;
}

.freq-table .count {
    color: var(--primary-color);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.freq-table .pct {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.freq-table .bar {
    width: 200px;
}

.bar-fill {
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 3px;
    transition: width 0.6s ease;
}

.density-cell {
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    font-size: 14px;
}

.density-high {
    color: #dc2626;
    font-weight: 600;
}

.density-medium {
    color: #d97706;
    font-weight: 500;
}

.density-normal {
    color: var(--secondary-color);
}

.word-forms {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
    font-style: italic;
}

/* Stats table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
}

.stats-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table tr:hover td {
    background: rgba(37, 99, 235, 0.04);
}

.stats-table .param-name {
    color: var(--text-color);
    font-weight: 500;
    width: 60%;
}

.stats-table .param-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.stats-table .param-hint {
    color: var(--text-muted);
    font-size: 14px;
    display: block;
    margin-top: 2px;
}

.stats-table tr.metric-excellent td {
    background: linear-gradient(90deg, rgba(22, 163, 74, 0.08), transparent 50%);
    border-left: 4px solid #16a34a;
}

.stats-table tr.metric-excellent td.param-value {
    color: #16a34a;
}

.stats-table tr.metric-warning td {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.08), transparent 50%);
    border-left: 4px solid #d97706;
}

.stats-table tr.metric-warning td.param-value {
    color: #d97706;
}

.stats-table tr.metric-bad td {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.08), transparent 50%);
    border-left: 4px solid #dc2626;
}

.stats-table tr.metric-bad td.param-value {
    color: #dc2626;
}

.stats-table tr.metric-neutral td:first-child {
    border-left: 4px solid transparent;
}



/* Цветовая индикация строк по качеству — только первая ячейка */
.stats-table tr.metric-excellent td:first-child {
    background: linear-gradient(90deg, rgba(22,163,74,0.12), rgba(22,163,74,0.03) 70%, transparent);
    border-left: 4px solid #16a34a;
    color: #16a34a;
}
.stats-table tr.metric-excellent td.param-value {
    color: #16a34a;
}
.stats-table tr.metric-excellent td.param-name::before {
    content: '●';
    color: #16a34a;
    margin-right: 8px;
    font-size: 12px;
}

.stats-table tr.metric-warning td:first-child {
    background: linear-gradient(90deg, rgba(217,119,6,0.12), rgba(217,119,6,0.03) 70%, transparent);
    border-left: 4px solid #d97706;
}
.stats-table tr.metric-warning td.param-value {
    color: #d97706;
}
.stats-table tr.metric-warning td.param-name::before {
    content: '●';
    color: #d97706;
    margin-right: 8px;
    font-size: 12px;
}

.stats-table tr.metric-bad td:first-child {
    background: linear-gradient(90deg, rgba(220,38,38,0.12), rgba(220,38,38,0.03) 70%, transparent);
    border-left: 4px solid #dc2626;
}
.stats-table tr.metric-bad td.param-value {
    color: #dc2626;
}
.stats-table tr.metric-bad td.param-name::before {
    content: '●';
    color: #dc2626;
    margin-right: 8px;
    font-size: 12px;
}

.stats-table tr.metric-neutral td:first-child {
    border-left: 4px solid transparent;
}

/* Hover-эффект остаётся на всей строке */
.stats-table tr:hover td {
    background: rgba(37,99,235,0.04);
}
.stats-table tr:hover td:first-child {
    background: linear-gradient(90deg, rgba(37,99,235,0.08), rgba(37,99,235,0.04) 70%, transparent);
}


/* Quality legend */
.quality-legend {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.quality-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

.quality-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.quality-dot.dot-excellent {
    background: #16a34a;
}

.quality-dot.dot-warning {
    background: #d97706;
}

.quality-dot.dot-bad {
    background: #dc2626;
}

.info-block {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 14px;
    line-height: 1.6;
}

.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Headers tree */
.headers-tree {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    max-height: 360px;
    overflow-y: auto;
}

.header-item {
    padding: 6px 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 14px;
    border-bottom: 1px dashed var(--border-color);
}

.header-item:last-child {
    border-bottom: none;
}

.header-tag {
    font-size: 14px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
    font-family: 'SF Mono', Menlo, monospace;
}

.h1-tag {
    background: rgba(236, 72, 153, 0.1);
    color: #db2777;
}

.h2-tag {
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
}

.h3-tag {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.h4-tag,
.h5-tag,
.h6-tag {
    background: var(--bg-light);
    color: var(--text-muted);
}

.header-item[data-level="1"] {
    padding-left: 0;
    font-weight: 600;
}

.header-item[data-level="2"] {
    padding-left: 18px;
}

.header-item[data-level="3"] {
    padding-left: 36px;
}

.header-item[data-level="4"],
.header-item[data-level="5"],
.header-item[data-level="6"] {
    padding-left: 54px;
    color: var(--text-muted);
}

/* Meta blocks */
.meta-block {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.meta-block .meta-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.meta-block .meta-value {
    font-size: 14px;
    color: var(--text-color);
    word-break: break-word;
}

.meta-block.empty .meta-value {
    color: var(--text-muted);
    font-style: italic;
}

/* Badge */
.badge {
    font-size: 14px;
    background: var(--bg-light);
    color: var(--text-muted);
    padding: 3px 9px;
    border-radius: 10px;
    font-weight: 500;
}

/* Share */
.share-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.share-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.share-btn.copied {
    background: rgba(22, 163, 74, 0.1);
    border-color: #16a34a;
    color: #16a34a;
}

.share-url {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'SF Mono', Menlo, monospace;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    word-break: break-all;
    user-select: all;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-color);
    color: var(--text-color);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    border-left: 4px solid #16a34a;
}

.toast.error {
    border-left: 4px solid #dc2626;
}

/* Forecast */
.forecast-summary {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.forecast-score {
    flex-shrink: 0;
    text-align: center;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    border: 2px solid currentColor;
    min-width: 140px;
}

.forecast-score-value {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.forecast-score-label {
    font-size: 14px;
    margin-top: 6px;
    opacity: 0.8;
}

.forecast-niche-title {
    font-size: 16px;
    margin-bottom: 4px;
}

.forecast-niche-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.forecast-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.forecast-table thead th {
    text-align: left;
    padding: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

.forecast-table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.forecast-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

.forecast-table .text-center {
    text-align: center;
}

.kw-phrase {
    font-size: 14px;
}

.kw-type {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-light);
    color: var(--text-muted);
    font-weight: 500;
    vertical-align: middle;
}

.forecast-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    min-width: 50px;
}

.comp-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.comp-low {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.comp-medium {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.comp-high {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.kw-comment {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

.strengths-title {
    color: #16a34a;
}

.weaknesses-title {
    color: #dc2626;
}

.recommendations-title {
    color: #2563eb;
}

.forecast-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.forecast-list li {
    padding: 12px 16px 12px 44px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}

.strength-item {
    background: rgba(22, 163, 74, 0.06);
    border-left: 3px solid #16a34a;
}

.strength-item::before {
    content: '+';
    position: absolute;
    left: 14px;
    top: 10px;
    font-weight: 700;
    color: #16a34a;
    font-size: 18px;
}

.weakness-item {
    background: rgba(220, 38, 38, 0.06);
    border-left: 3px solid #dc2626;
}

.weakness-item::before {
    content: '−';
    position: absolute;
    left: 16px;
    top: 10px;
    font-weight: 700;
    color: #dc2626;
    font-size: 18px;
}

.recommendations-list {
    counter-reset: rec-counter;
}

.recommendation-item {
    background: rgba(37, 99, 235, 0.04);
    border-left: 3px solid #2563eb;
    counter-increment: rec-counter;
    padding-left: 52px !important;
}

.recommendation-item::before {
    content: counter(rec-counter);
    position: absolute;
    left: 14px;
    top: 10px;
    width: 26px;
    height: 26px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 14px;
}

.recommendation-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

.recommendation-impact {
    margin-top: 6px;
    font-size: 14px;
    color: var(--text-muted);
}

.impact-value {
    color: #16a34a;
    font-weight: 600;
}

.forecast-conclusion {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(22, 163, 74, 0.04));
    border: 1px solid var(--border-color);
}

.forecast-conclusion p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
}

/* Match block */
.match-summary {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.match-percent {
    flex-shrink: 0;
    text-align: center;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    border: 2px solid currentColor;
    min-width: 160px;
}

.match-percent-value {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.match-percent-label {
    font-size: 14px;
    margin-top: 6px;
    opacity: 0.8;
}

.match-stats {
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-muted);
}

.match-stats strong {
    color: var(--text-color);
}

.match-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.match-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

.match-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.match-table tbody tr.match-found {
    background: rgba(22, 163, 74, 0.04);
}

.match-table tbody tr.match-missing {
    background: rgba(220, 38, 38, 0.04);
}

.match-phrase {
    font-size: 14px;
}

.source-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.source-title {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.source-h1 {
    background: rgba(168, 85, 247, 0.12);
    color: #9333ea;
}

.source-combined {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}

.status-badge.match-found {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.status-badge.match-missing {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.match-type {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

.match-freq,
.match-density {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* Main query */
.main-query-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.main-query-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.main-query-item:hover {
    border-color: var(--border-color);
}

.main-query-item.main {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.06), rgba(37, 99, 235, 0.04));
    border: 2px solid #16a34a;
    padding: 20px 24px;
}

.main-query-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.main-query-item.main .main-query-rank {
    background: #16a34a;
    color: #fff;
    width: 44px;
    height: 44px;
    font-size: 20px;
}

.main-query-body {
    flex: 1;
    min-width: 0;
}

.main-query-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    word-break: break-word;
}

.main-query-item.main .main-query-text {
    font-size: 22px;
}

.main-query-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.main-query-source {
    padding: 2px 10px;
    background: var(--bg-light);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.main-query-score {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.main-query-badge {
    padding: 6px 14px;
    background: #16a34a;
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.query-recommendation {
    padding: 16px 20px;
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid #2563eb;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
}

.query-recommendation strong {
    color: #2563eb;
}

/* 404 */
.page-404 {
    padding: 80px 0;
    text-align: center;
}

.error-block {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 120px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 20px;
}

.error-block h1 {
    font-size: 32px;
    margin-bottom: 16px;
}

.error-block p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow);
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    .main-nav li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        display: block;
        padding: 16px 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .features-grid,
    .steps {
        grid-template-columns: 1fr;
    }
    
    .score-header {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .forecast-summary,
    .match-summary {
        flex-direction: column;
        align-items: stretch;
    }
    
    .forecast-table .kw-comment {
        display: none;
    }
    
    .main-query-item {
        flex-wrap: wrap;
    }
    
    .main-query-badge {
        margin-top: 8px;
    }
}






/* ========================================
   ЛЕНДИНГ SEO-АНАЛИЗАТОРА
   ======================================== */

/* Hero секция лендинга */
.landing-hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.landing-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.15;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.landing-hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 780px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.landing-hero .form-card {
    max-width: 780px;
    margin: 0 auto 24px;
}

/* Hero features badges */
.hero-features {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.hero-features span {
    padding: 8px 18px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 24px;
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.2s;
}

.hero-features span:hover {
    background: rgba(37, 99, 235, 0.15);
    transform: translateY(-1px);
}

/* Feature cards с номерами */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.feature-card {
    background: var(--bg-color);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-number {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding: 4px 10px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 6px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 700;
    line-height: 1.3;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 15px;
}

/* Metrics detail */
.metrics-detail {
    display: grid;
    gap: 20px;
    margin-top: 40px;
}

.metric-detail-item {
    background: var(--bg-color);
    padding: 28px 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.metric-detail-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(4px);
}

.metric-detail-item h3 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--primary-dark);
    font-weight: 700;
}

.metric-detail-item p {
    margin-bottom: 12px;
    line-height: 1.7;
    color: var(--text-color);
}

.metric-detail-item p:last-child {
    margin-bottom: 0;
}

.metric-detail-item strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Audience grid с буквенными иконками */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.audience-card {
    background: var(--bg-color);
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.audience-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.audience-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.audience-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 700;
}

.audience-card p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 15px;
}

/* Advantages grid */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.advantage-item {
    background: var(--bg-color);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    position: relative;
}

.advantage-item::before {
    content: '';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.1);
    border: 2px solid var(--secondary-color);
    display: grid;
    place-items: center;
}

.advantage-item::after {
    content: '';
    position: absolute;
    top: 22px;
    right: 22px;
    width: 12px;
    height: 6px;
    border-left: 2px solid var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
    transform: rotate(-45deg);
}

.advantage-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.advantage-item h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-color);
    font-weight: 700;
    padding-right: 40px;
}

.advantage-item p {
    color: var(--text-muted);
    line-height: 1.65;
    font-size: 15px;
}

/* CTA секция с тёмной формой */
.cta-section .form-card-dark {
    max-width: 780px;
    margin: 32px auto 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 24px;
    border-radius: var(--radius);
}

.btn-light {
    background: #fff;
    color: var(--primary-color);
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
}

.btn-light:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* SEO text блок */
.seo-text {
    line-height: 1.8;
    font-size: 16px;
    max-width: 900px;
    margin: 40px auto 0;
    background: var(--bg-color);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.seo-text h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 800;
}

.seo-text h3 {
    font-size: 20px;
    margin-top: 28px;
    margin-bottom: 14px;
    color: var(--primary-dark);
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

.seo-text p {
    margin-bottom: 14px;
    color: var(--text-color);
}

.seo-text ul,
.seo-text ol {
    margin-bottom: 16px;
    padding-left: 28px;
}

.seo-text li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.seo-text strong {
    color: var(--text-color);
    font-weight: 600;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .landing-hero h1 {
        font-size: 34px;
    }
    
    .landing-hero-subtitle {
        font-size: 16px;
    }
    
    .features-grid,
    .audience-grid,
    .advantages-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 40px 0 30px;
    }
    
    .landing-hero h1 {
        font-size: 28px;
    }
    
    .landing-hero-subtitle {
        font-size: 15px;
        padding: 0 10px;
    }
    
    .hero-features {
        gap: 8px;
    }
    
    .hero-features span {
        font-size: 12px;
        padding: 6px 14px;
    }
    
    .features-grid,
    .metrics-detail,
    .audience-grid,
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-card,
    .metric-detail-item,
    .audience-card,
    .advantage-item {
        padding: 22px;
    }
    
    .feature-card h3,
    .audience-card h3,
    .advantage-item h3 {
        font-size: 18px;
    }
    
    .seo-text {
        padding: 24px 20px;
        margin: 24px 0 0;
    }
    
    .seo-text h2 {
        font-size: 22px;
    }
    
    .seo-text h3 {
        font-size: 18px;
    }
    
    .seo-text {
        font-size: 15px;
    }
    
    .cta-section h2 {
        font-size: 28px;
    }
    
    .cta-section p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .landing-hero h1 {
        font-size: 24px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row input[type="text"] {
        width: 100%;
    }
    
    .form-row .btn {
        width: 100%;
    }
}