@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    overscroll-behavior-x: none;
}

[hidden] {
    display: none !important;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --success: #10b981;
    --text: #0f172a;
    --text-light: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --glass: rgba(255, 255, 255, 0.95);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] {
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --bg: #0f172a;
    --white: #1e293b;
    --glass: rgba(30, 41, 59, 0.95);
    --border: #334155;
    --gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #764ba2 100%);
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
    position: relative;
    overflow-x: clip;
    overscroll-behavior-y: none;
    transition: background 0.5s ease;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveGrid 20s linear infinite;
    pointer-events: none;
    opacity: 0.3;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.toolbar {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
    animation: fadeInRight 0.8s ease;
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.toolbar-btn {
    position: relative;
    width: 48px;
    height: 48px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.toolbar-btn-wide {
    width: auto;
    height: 48px;
    border-radius: 999px;
    padding: 0 16px;
    gap: 8px;
}

.toolbar-btn-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.toolbar-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.theme-icon {
    font-size: 22px;
}

.toolbar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    display: none;
}

.toolbar-btn-wide .toolbar-badge {
    position: static;
    margin-left: 2px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: 16px 32px;
    border-radius: 100px;
    margin-bottom: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-5px);
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #000000 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 42px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease 0.2s both;
    width: 100%;
    overflow: clip;
}

@media (min-width: 1200px) {
    .container { max-width: 1180px; }
    .card { padding: 46px 44px; }
}

.account-panel {
    margin-bottom: 28px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
}

.account-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.account-panel-header h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.auth-marketing-card {
    margin: 4px 0 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.12), transparent 55%),
        radial-gradient(circle at 90% 20%, rgba(16, 185, 129, 0.10), transparent 60%),
        rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255,255,255,0.24);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.auth-marketing-card h3 {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--text);
}

.auth-marketing-card p {
    margin: 0;
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
}

.auth-marketing-card p + p {
    margin-top: 8px;
}

.account-status-text {
    color: var(--text-light);
    font-size: 13px;
}

.account-logout-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
}

.account-limits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.limit-item {
    background: var(--white);
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    font-weight: 600;
    font-size: 14px;
}

.account-tabs {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 12px;
}

.account-tab {
    border: 1px solid rgba(255,255,255,0.2);
    background: var(--white);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
}

.account-tab.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

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

.account-form-grid input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--white);
    color: var(--text);
    font-family: inherit;
}

.account-form-grid input:focus {
    outline: none;
    border-color: var(--primary);
}

.account-action-btn {
    margin-top: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    color: #fff;
    background: var(--gradient);
    font-weight: 700;
}

.account-note {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-light);
}

.auth-helper {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.28);
    border: 1px solid rgba(255,255,255,0.16);
}

.auth-helper-text {
    font-size: 13px;
    color: var(--text);
    margin: 0;
}

.auth-helper-link {
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
    padding: 0;
}

.auth-helper-bonus {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-light);
}

.my-checks {
    margin-top: 14px;
    background: rgba(255,255,255,0.35);
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}

.my-checks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.my-checks-header h4 {
    font-size: 14px;
    margin: 0;
}

.my-checks-header span {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(99,102,241,0.16);
}

.my-checks-list {
    display: grid;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.my-check-item {
    background: var(--white);
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.25);
}

.my-check-item-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-light);
}

.my-check-item-keyword {
    margin-top: 6px;
    font-weight: 700;
    color: var(--text);
    font-size: 14px;
}

.my-check-item-url {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-light);
    overflow-wrap: anywhere;
}

.my-checks-empty {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    padding: 10px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    margin-bottom: 28px;
}

@media (max-width: 768px) {
    .account-limits {
        grid-template-columns: 1fr;
    }
    .account-form-grid {
        grid-template-columns: 1fr;
    }
    .account-panel-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 12px;
}

.input-group label svg {
    color: var(--primary);
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    border: 2px solid transparent;
    background: var(--bg);
    color: var(--text);
    border-radius: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.marketplace-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid transparent;
    background: var(--bg);
    color: var(--text);
    border-radius: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.marketplace-select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.input-group input:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.input-hint {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.loader-container {
    display: none;
    text-align: center;
    padding: 14px 8px 8px;
}

.loader-container.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loader-spinner {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 32px;
}

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

.loader-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.loader-text p {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 32px;
}

.progress-bar {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 999px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.success-container {
    display: none;
    text-align: center;
    padding: 14px 8px 8px;
}

.success-container.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.success-status {
    transition: opacity 0.35s ease, max-height 0.35s ease, margin 0.35s ease;
    max-height: 280px;
    opacity: 1;
    overflow: hidden;
}

.success-container.compact .success-status {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

.success-container.compact {
    padding: 2px 0 0;
}

.success-icon svg {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    animation: scaleIn 0.6s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-container h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.success-container p {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 24px;
}

.success-container .report-accordion-block {
    text-align: left;
    margin-top: 24px;
    margin-bottom: 24px;
}

.success-container .report-accordion-block.visible {
    display: block;
}

.success-actions {
    margin-top: 8px;
    margin-bottom: 12px;
    position: sticky;
    top: 10px;
    z-index: 5;
    display: flex;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,0.35);
    backdrop-filter: blur(8px);
}

.new-analysis-btn {
    padding: 14px 36px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 0;
    box-shadow: 0 12px 24px rgba(79,70,229,0.22);
}

.new-analysis-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.cabinet-new-analysis-wrap {
    margin-top: 6px;
    margin-bottom: 4px;
}

.cabinet-new-analysis-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.share-btn {
    padding: 12px 28px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Блок данных отчёта — аккордеон карточек в стилистике сайта */
.report-accordion-block {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: none;
}
.report-accordion-block.visible {
    display: block;
    animation: fadeIn 0.5s ease;
}
.report-block-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}
.report-block-title::before {
    content: "";
    width: 4px;
    height: 28px;
    background: var(--gradient);
    border-radius: 4px;
}
.report-accordion {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.report-accordion-item {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}
.report-accordion-item:hover {
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}
.report-accordion-item[open] {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}
.report-accordion-summary {
    padding: 18px 22px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.25s ease, color 0.2s ease;
    background: rgba(255, 255, 255, 0.03);
}

.report-card-summary-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.report-card-role {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.16);
}

.report-card-role.own {
    background: linear-gradient(135deg, rgba(37,99,235,0.16), rgba(124,58,237,0.16));
    color: #1d4ed8;
}

.report-card-role.competitor {
    background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(239,68,68,0.10));
    color: #b45309;
}
.report-accordion-summary:hover {
    background: rgba(99, 102, 241, 0.08);
}
.report-accordion-item[open] .report-accordion-summary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}
.report-accordion-summary::-webkit-details-marker {
    display: none;
}
.report-accordion-summary::after {
    content: "▾";
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 12px;
}
.report-accordion-item[open] .report-accordion-summary::after {
    transform: rotate(180deg);
}
.report-accordion-body {
    padding: 20px 22px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.02);
    animation: reportBodyIn 0.35s ease;
}

.report-card-premium-top {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)),
        radial-gradient(circle at 0% 0%, rgba(99,102,241,0.12), transparent 55%);
    border: 1px solid rgba(255,255,255,0.12);
}

.report-card-premium-title {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: var(--text);
    line-height: 1.35;
}

.report-card-premium-badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.report-card-ai-actions {
    margin-bottom: 12px;
    display: flex;
    justify-content: flex-start;
}

.report-highlight-pill {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 6px 16px rgba(15,23,42,0.05);
}

.report-highlight-pill span {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 600;
}

.report-highlight-pill strong {
    font-size: 13px;
    color: var(--text);
    line-height: 1.3;
}
@keyframes reportBodyIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.report-fields-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    margin-top: 4px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.report-fields-table th,
.report-fields-table td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.report-fields-table tr {
    transition: background 0.2s ease;
}
.report-fields-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}
.report-fields-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.06);
}
.report-fields-table th {
    color: var(--text-light);
    font-weight: 600;
    width: 38%;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.01em;
}
.report-fields-table td {
    color: var(--text);
    font-weight: 500;
}

/* Частая причина "съехавшей" мобильной вёрстки — длинные значения в таблице */
.report-fields-table {
    max-width: 100%;
}
.report-fields-table a {
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
    text-decoration: none;
    transition: color 0.2s ease;
}
.report-fields-table a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}
.report-photos {
    margin-top: 22px;
    padding: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}
.report-photos strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 12px;
}
.report-photos ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.report-photos li {
    margin: 0;
}
.report-photos a {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-dark);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(99, 102, 241, 0.25);
    transition: all 0.25s ease;
}
.report-photos a:hover {
    background: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.report-reviews {
    margin-top: 22px;
    padding: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}
.report-reviews strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    display: block;
    margin-bottom: 14px;
}
.report-review-item {
    margin-bottom: 14px;
    padding: 16px 18px;
    background: var(--glass);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.report-review-item:last-child {
    margin-bottom: 0;
}
.report-review-item:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}
.report-review-meta {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}
.report-review-meta::before {
    content: "★ ";
    color: #f59e0b;
}
.report-review-text {
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding-left: 0;
}
.report-empty {
    color: var(--text-light);
    font-size: 14px;
    padding: 20px 24px;
    margin: 0;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Блок ответа Gemini под карточкой */
.gemini-block {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: none;
}
.gemini-block.visible {
    display: block;
    animation: fadeIn 0.4s ease;
}
.gemini-block-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.gemini-loading {
    color: var(--text-light);
    font-size: 14px;
    padding: 12px 0;
}
.gemini-content {
    background: var(--bg);
    border-radius: 16px;
    padding: 20px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    white-space: normal;
    max-height: none;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-wrap: anywhere;
}
.gemini-content:empty {
    display: none;
}

.parse-stats-box {
    margin-bottom: 16px;
}

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

.product-search-brand-list {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.product-search-brand-item {
    border: 1px solid rgba(148,163,184,0.22);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.72);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
/* Обёртка таблицы: горизонтальный скролл, если не влезает */
.gemini-table-wrap {
    overflow-x: auto;
    margin: 1em 0;
    -webkit-overflow-scrolling: touch;
}
.gemini-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
    font-size: 14px;
}
.gemini-table th,
.gemini-table td {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: left;
}
.gemini-table thead th {
    background: rgba(99, 102, 241, 0.15);
    font-weight: 600;
}
.gemini-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 8px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 12px;
}
.gemini-error:empty {
    display: none;
}

.gemini-hero-title {
    margin: 0 0 12px 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(124,58,237,0.10));
    border: 1px solid rgba(99,102,241,0.16);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
}

.ai-exec-wrap {
    margin: 0 0 12px;
    display: grid;
    gap: 10px;
}

.ai-exec-hero {
    border-radius: 14px;
    padding: 14px 16px;
    background:
      radial-gradient(circle at 0% 0%, rgba(37,99,235,0.22), transparent 36%),
      radial-gradient(circle at 100% 0%, rgba(16,185,129,0.18), transparent 42%),
      linear-gradient(135deg, rgba(15,23,42,0.92), rgba(30,41,59,0.84));
    border: 1px solid rgba(148,163,184,0.32);
    color: #fff;
}

.ai-exec-hero-title {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.ai-exec-hero-subtitle {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.86);
}

.ai-exec-kpis {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0,1fr));
}

.ai-exec-kpi {
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.76));
    border: 1px solid rgba(148,163,184,0.2);
    box-shadow: 0 8px 20px rgba(15,23,42,0.05);
}

.ai-exec-kpi span {
    display: block;
    font-size: 11px;
    color: var(--text-light);
}

.ai-exec-kpi strong {
    display: block;
    margin-top: 5px;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--text);
}

.ai-exec-kpi small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-light);
}

.ai-exec-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

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

.ai-detail-tile {
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.2);
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
    padding: 12px;
    box-shadow: 0 8px 20px rgba(15,23,42,0.05);
}

.ai-detail-tile-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-detail-step {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.ai-detail-tile h5 {
    margin: 0;
    font-size: 13px;
    letter-spacing: -0.01em;
    color: var(--text);
}

.ai-detail-tile p {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-light);
}

.ai-exec-card {
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.2);
    background: rgba(255,255,255,0.82);
    padding: 12px;
}

.ai-exec-card h4 {
    margin: 0 0 8px;
    font-size: 14px;
    letter-spacing: -0.01em;
}

.ai-exec-list {
    margin: 0;
    padding: 0 0 0 18px;
    display: grid;
    gap: 7px;
    font-size: 13px;
    line-height: 1.5;
}

.ai-section-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ai-section-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    background: rgba(37,99,235,0.1);
    border: 1px solid rgba(37,99,235,0.18);
    color: var(--text);
    font-weight: 600;
}

.ai-health-list {
    display: grid;
    gap: 8px;
}

.ai-health-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    gap: 8px;
}

.ai-health-row span {
    font-size: 12px;
    color: var(--text);
    font-weight: 700;
}

.ai-health-row strong {
    font-size: 12px;
    color: var(--text-light);
}

.ai-health-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148,163,184,0.24);
}

.ai-health-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 45%, #10b981 100%);
}

.gemini-action-plan {
    margin: 0 0 12px;
    border-radius: 16px;
    padding: 14px 16px;
    background:
      radial-gradient(circle at 100% 0%, rgba(245,158,11,0.12), transparent 50%),
      linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    border: 1px solid rgba(245,158,11,0.18);
    text-align: left;
}

.gemini-action-plan-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text);
}

.gemini-action-plan-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
}

.gemini-divider {
    height: 1px;
    margin: 10px 0;
    background: linear-gradient(90deg, transparent, rgba(148,163,184,0.6), transparent);
}

.gemini-quote-line {
    margin: 6px 0;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(99,102,241,0.2);
    background: linear-gradient(180deg, rgba(99,102,241,0.10), rgba(99,102,241,0.05));
    font-weight: 700;
    font-size: 13px;
}

.gemini-subcards {
    display: grid;
    gap: 8px;
}

.gemini-subcard {
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.22);
    background: rgba(255,255,255,0.78);
    padding: 10px;
}

.gemini-subcard-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.gemini-subcard-body {
    font-size: 13px;
    line-height: 1.5;
}

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

.gemini-section-card {
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    padding: 12px 14px;
    background: rgba(255,255,255,0.05);
    box-shadow: 0 8px 20px rgba(15,23,42,0.04);
}

.gemini-section-card:nth-child(3n+1) {
    background: linear-gradient(180deg, rgba(59,130,246,0.07), rgba(255,255,255,0.04));
}

.gemini-section-card:nth-child(3n+2) {
    background: linear-gradient(180deg, rgba(16,185,129,0.07), rgba(255,255,255,0.04));
}

.gemini-section-card:nth-child(3n) {
    background: linear-gradient(180deg, rgba(245,158,11,0.06), rgba(255,255,255,0.04));
}

.gemini-section-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.gemini-section-card.is-summary {
    border-color: rgba(59,130,246,0.22);
    background: linear-gradient(180deg, rgba(59,130,246,0.10), rgba(255,255,255,0.04));
}

.gemini-section-card.is-competitors {
    border-color: rgba(245,158,11,0.24);
    background: linear-gradient(180deg, rgba(245,158,11,0.10), rgba(255,255,255,0.04));
}

.gemini-section-card.is-photos {
    border-color: rgba(16,185,129,0.22);
}

.gemini-section-card.is-reviews {
    border-color: rgba(236,72,153,0.2);
    background: linear-gradient(180deg, rgba(236,72,153,0.08), rgba(255,255,255,0.04));
}

.gemini-section-body {
    font-size: 14px;
    line-height: 1.55;
}

.result-dashboard {
    margin-top: 8px;
    text-align: left;
}

.result-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.result-tab {
    border: 1px solid rgba(255,255,255,0.2);
    background: var(--white);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

.result-tab.active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

.result-pane {
    display: none;
}

.result-pane.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

.result-section-box {
    background: rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.12);
}

.primary-hero {
    border-radius: 16px;
    padding: 16px;
    background:
      radial-gradient(circle at 0% 0%, rgba(37,99,235,0.2), transparent 38%),
      radial-gradient(circle at 100% 15%, rgba(16,185,129,0.18), transparent 42%),
      linear-gradient(135deg, rgba(15,23,42,0.92), rgba(30,41,59,0.86));
    color: #fff;
    border: 1px solid rgba(148,163,184,0.3);
    box-shadow: 0 18px 36px rgba(15,23,42,0.25);
}

.primary-hero-title {
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.primary-hero-subtitle {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,0.86);
}

.primary-mini-metrics {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.primary-mini-metrics span {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

.primary-rank-card {
    margin-top: 12px;
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(148,163,184,0.24);
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(241,245,249,0.84));
    color: #0f172a;
}

.primary-rank-card.is-top {
    border-color: rgba(16,185,129,0.4);
    background: linear-gradient(135deg, rgba(236,253,245,0.94), rgba(209,250,229,0.86));
}

.primary-rank-card.is-middle {
    border-color: rgba(59,130,246,0.36);
    background: linear-gradient(135deg, rgba(239,246,255,0.95), rgba(219,234,254,0.86));
}

.primary-rank-card.is-missing {
    border-color: rgba(245,158,11,0.4);
    background: linear-gradient(135deg, rgba(255,251,235,0.95), rgba(254,243,199,0.88));
}

.primary-rank-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.primary-rank-head span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    font-weight: 800;
}

.primary-rank-head strong {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.primary-rank-card p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
}

.primary-rank-card p b {
    font-weight: 800;
}

.primary-rank-card small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #334155;
}

.primary-rank-actions {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.primary-rank-actions .rank-check-btn {
    justify-self: start;
}

.primary-rank-check-status {
    min-height: 18px;
    font-size: 13px;
    color: #0f172a;
}

.primary-rank-check-status b {
    font-weight: 800;
}

.primary-kpi-grid {
    margin-top: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.primary-kpi-card {
    border-radius: 14px;
    padding: 12px;
    border: 1px solid rgba(148,163,184,0.22);
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.76));
    box-shadow: 0 10px 22px rgba(15,23,42,0.06);
}

.primary-kpi-card.good { border-color: rgba(16,185,129,0.35); }
.primary-kpi-card.warn { border-color: rgba(245,158,11,0.35); }
.primary-kpi-card.bad { border-color: rgba(239,68,68,0.35); }

.primary-kpi-card span {
    display: block;
    font-size: 12px;
    color: var(--text-light);
}

.primary-kpi-card strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    line-height: 1.1;
    color: var(--text);
    letter-spacing: -0.01em;
}

.primary-kpi-card small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-light);
}

.primary-two-cols {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.primary-panel {
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.2);
    background: rgba(255,255,255,0.82);
    padding: 12px;
}

.primary-panel h4 {
    margin: 0 0 8px;
    font-size: 14px;
    letter-spacing: -0.01em;
}

.primary-action-list {
    margin: 0;
    padding: 0 0 0 18px;
    display: grid;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}

.primary-health-list {
    display: grid;
    gap: 8px;
}

.primary-health-row {
    display: grid;
    grid-template-columns: 128px 1fr auto;
    gap: 8px;
    align-items: center;
}

.primary-health-row span {
    font-size: 12px;
    color: var(--text);
    font-weight: 700;
}

.primary-health-row strong {
    font-size: 12px;
    color: var(--text-light);
}

.primary-health-track {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148,163,184,0.22);
}

.primary-health-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 48%, #10b981 100%);
}

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

.primary-impact-card {
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.2);
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
    padding: 10px;
}

.primary-impact-card span {
    display: block;
    font-size: 11px;
    color: var(--text-light);
}

.primary-impact-card strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
    line-height: 1.1;
    color: var(--text);
}

.primary-compare-list {
    display: grid;
    gap: 8px;
}

.primary-compare-row {
    border-radius: 10px;
    background: rgba(248,250,252,0.9);
    border: 1px solid rgba(148,163,184,0.18);
    padding: 8px;
}

.primary-compare-row.is-better {
    border-color: rgba(16,185,129,0.35);
    box-shadow: inset 0 0 0 1px rgba(16,185,129,0.12);
}

.primary-compare-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.primary-compare-head strong {
    font-size: 12px;
}

.primary-compare-head span {
    font-size: 11px;
    color: var(--text-light);
}

.primary-compare-bars {
    display: grid;
    gap: 5px;
}

.primary-compare-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(148,163,184,0.2);
}

.primary-compare-fill {
    height: 100%;
    border-radius: 999px;
}

.primary-compare-fill.own {
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.primary-compare-fill.avg {
    background: linear-gradient(90deg, #0ea5a0, #14b8a6);
    opacity: 0.86;
}

.primary-cta-wrap {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.primary-cta-wrap.top {
    justify-content: center;
    margin-top: 6px;
    margin-bottom: 4px;
}

.primary-open-ai-btn {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #1d4ed8 100%);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.45);
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(37,99,235,0.34);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
    animation: primaryPulse 2.2s ease-in-out infinite;
    text-transform: uppercase;
    min-width: 290px;
}

.primary-open-ai-btn:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 24px 44px rgba(59,130,246,0.38);
}

.primary-open-ai-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.34) 50%, transparent 80%);
    transform: translateX(-120%);
    animation: primaryShine 2.6s linear infinite;
}

@keyframes primaryPulse {
    0%, 100% { box-shadow: 0 12px 24px rgba(37,99,235,0.22); transform: translateY(0); }
    50% { box-shadow: 0 18px 34px rgba(124,58,237,0.28); transform: translateY(-1px); }
}

@keyframes primaryShine {
    to { transform: translateX(120%); }
}

.primary-value-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.primary-value-card {
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.2);
    background:
      radial-gradient(circle at 100% 0%, rgba(37,99,235,0.12), transparent 44%),
      linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78));
    padding: 12px;
}

.primary-value-card h4 {
    margin: 0 0 6px;
    font-size: 14px;
}

.primary-value-card p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-light);
}

.primary-value-card span {
    display: inline-flex;
    margin-top: 8px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    background: rgba(37,99,235,0.12);
    border: 1px solid rgba(37,99,235,0.2);
}

.primary-benefits-panel {
    margin-top: 6px;
    margin-bottom: 4px;
}

.primary-benefits-list {
    margin: 0;
    padding: 0 0 0 18px;
    display: grid;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.primary-roadmap-panel {
    margin-top: 6px;
    margin-bottom: 4px;
}

.primary-roadmap-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.primary-roadmap-step {
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.2);
    background: rgba(248,250,252,0.9);
    padding: 10px;
    display: grid;
    gap: 6px;
}

.primary-roadmap-step span {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 700;
}

.primary-roadmap-step strong {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text);
}

.metric-group {
    margin-bottom: 16px;
}

.metric-group:last-child {
    margin-bottom: 0;
}

.metric-group h4 {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text);
}

.metric-bars {
    display: grid;
    gap: 8px;
}

.metric-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.metric-bar-row.is-own {
    padding: 6px 8px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.metric-bar-row.is-own .metric-bar-fill {
    background: linear-gradient(135deg, #f59e0b 0%, #6366f1 100%);
}

.metric-bar-row.is-own .metric-bar-label {
    font-weight: 700;
}

.metric-bar-label {
    color: var(--text);
    font-weight: 600;
}

.metric-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.12);
    border-radius: 999px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #34d399 0%, #6366f1 100%);
    border-radius: 999px;
}

.metric-bar-value {
    color: var(--text-light);
    min-width: 56px;
    text-align: right;
}

.photo-card-grid {
    display: grid;
    gap: 14px;
}

.photo-card-item {
    background:
      radial-gradient(circle at 90% 0%, rgba(37,99,235,0.08), transparent 45%),
      var(--bg);
    border-radius: 16px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 10px 24px rgba(15,23,42,0.05);
}

.photo-card-item h4 {
    margin-bottom: 8px;
    font-size: 14px;
}

.photo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    background: var(--white);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.12);
}

.reviews-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.reviews-summary-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.12);
}

.reviews-summary-card h4 {
    font-size: 13px;
    margin-bottom: 6px;
}

.reviews-summary-card p {
    margin: 0;
    font-size: 12px;
    color: var(--text-light);
}

.reviews-card {
    background:
      radial-gradient(circle at 85% 0%, rgba(16,185,129,0.06), transparent 45%),
      var(--bg);
    border-radius: 16px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.14);
    margin-bottom: 10px;
    box-shadow: 0 10px 24px rgba(15,23,42,0.05);
}

.reviews-card-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.reviews-card-title h4 {
    font-size: 14px;
    margin: 0;
}

.reviews-toggle-btn {
    border: 1px solid rgba(255,255,255,0.2);
    background: var(--white);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.reviews-list-hidden {
    display: none;
}

.reviews-empty {
    color: var(--text-light);
    font-size: 13px;
    padding: 2px 0 0;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.info-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: 32px 24px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    animation: fadeInUp 0.8s ease both;
}

.info-card:nth-child(1) { animation-delay: 0.3s; }
.info-card:nth-child(2) { animation-delay: 0.4s; }
.info-card:nth-child(3) { animation-delay: 0.5s; }

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.info-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.history-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.history-content {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.history-header-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.history-header-modal h3 {
    font-size: 20px;
    color: var(--text);
}

.close-btn {
    width: 36px;
    height: 36px;
    background: var(--border);
    color: var(--text);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.history-body {
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.history-item {
    background: var(--white);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.history-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
}

.history-icon {
    font-size: 20px;
}

.history-info {
    flex: 1;
}

.history-keyword {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.history-time {
    font-size: 12px;
    color: var(--text-light);
}

.history-url {
    font-size: 12px;
    color: var(--text-light);
    margin-left: 32px;
}

.history-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 3000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    color: var(--text);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.footer {
    text-align: center;
    padding: 32px 20px;
    margin-top: 40px;
    animation: fadeIn 1s ease 0.6s both;
}

.footer-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.footer p {
    color: white;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.footer-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-link svg {
    width: 18px;
    height: 18px;
}

.hidden {
    display: none !important;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    html, body {
        min-height: 100dvh;
        overflow-x: clip;
    }
    body {
        padding: max(4px, env(safe-area-inset-top)) 0 max(4px, env(safe-area-inset-bottom));
        -webkit-text-size-adjust: 100%;
        touch-action: pan-y;
    }
    body::before {
        animation: none;
        opacity: 0.14;
    }
    .container {
        max-width: none;
        width: 100%;
        padding: 0 2px;
    }
    .toolbar {
        position: sticky;
        top: max(8px, env(safe-area-inset-top));
        right: auto;
        justify-content: flex-end;
        width: 100%;
        padding-right: 2px;
        gap: 8px;
        margin-bottom: 8px;
    }
    .toolbar-btn { width: 42px; height: 42px; }
    .header { margin-bottom: 16px; }
    .logo {
        display: flex;
        width: 100%;
        justify-content: center;
        padding: 12px 14px;
        gap: 10px;
        border-radius: 18px;
    }
    .logo svg { width: 36px; height: 36px; }
    .logo h1 { font-size: 18px; text-align: center; line-height: 1.15; }
    .subtitle { font-size: 14px; }
    .card {
        padding: 12px 6px;
        border-radius: 14px;
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
    }
    .input-group { margin-bottom: 20px; }
    .input-group label { font-size: 14px; }
    .input-group input {
        padding: 14px 14px;
        font-size: 16px;
        transform: none !important;
    }
    .marketplace-select {
        padding: 14px 14px;
        font-size: 16px;
        transform: none !important;
    }
    .input-group input:focus {
        transform: none !important;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
    }
    .submit-btn { padding: 16px; font-size: 15px; }
    .info-cards { grid-template-columns: 1fr; gap: 16px; margin-top: 20px; }
    .info-card { padding: 24px 20px; }
    .footer { padding: 24px 12px; }
    .footer-content { padding: 20px 16px; }
    .footer-links { flex-direction: column; gap: 10px; }
    .history-content {
        width: calc(100vw - 8px);
        max-width: calc(100vw - 8px);
        margin: 4px;
        border-radius: 16px;
    }
    .loader-text h3 { font-size: 18px; }
    .new-analysis-btn { margin-right: 0; margin-bottom: 12px; display: block; }
    .success-actions { top: 6px; padding: 6px; }
    .share-btn { display: block; margin: 0 auto; }

    /* Не даём таблицам/ссылкам раздувать ширину страницы */
    .report-accordion-body { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
    .report-fields-table { table-layout: fixed; width: 100%; }
    .report-fields-table th { width: 44%; }
    .report-fields-table td { width: 56%; }
    .report-fields-table a { overflow-wrap: anywhere; word-break: break-word; }
    .reviews-summary-grid { grid-template-columns: 1fr; }
    .metric-bar-row { grid-template-columns: 1fr; }
    .metric-bar-value { text-align: left; }
    .gemini-sections { grid-template-columns: 1fr; gap: 10px; }
    .gemini-content { padding: 14px; font-size: 14px; line-height: 1.55; }
    .report-card-premium-badges { grid-template-columns: 1fr; }
    .reviews-card-title { align-items: flex-start; flex-direction: column; }
    .reviews-analyze-btn, .photos-analyze-btn { width: 100%; justify-content: center; }
    .report-card-summary-main { flex-wrap: wrap; align-items: flex-start; min-width: 0; }
}

@media (max-width: 480px) {
    body { padding-left: 0; padding-right: 0; }
    .container { padding: 0 2px; }
    .card { padding: 10px 4px; border-radius: 12px; }
    .logo h1 { font-size: 16px; }
    .submit-btn { font-size: 14px; }

    /* Toolbar иногда "вылазит" за экран на очень узких устройствах */
    .toolbar { top: max(6px, env(safe-area-inset-top)); right: auto; }
    .account-panel { padding: 12px; border-radius: 16px; }
    .account-panel-header h3 { font-size: 18px; }
    .auth-marketing-card { padding: 12px; border-radius: 12px; }
    .result-dashboard { padding: 10px; border-radius: 12px; }
    .result-section-box { padding: 12px; border-radius: 12px; }
    .parse-stats-grid { grid-template-columns: 1fr; }
}

@media (hover: none) and (pointer: coarse) {
    .toolbar-btn:hover,
    .submit-btn:hover,
    .card-analyze-btn:hover,
    .desc-analyze-btn:hover,
    .reviews-analyze-btn:hover,
    .photos-analyze-btn:hover,
    .logo:hover {
        transform: none;
    }
}

/* UI refresh overrides */
.my-checks-subtitle { margin-top: 4px; color: var(--text-light); font-size: 11px; line-height: 1.35; max-width: 560px; }
.my-check-item { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05); }
.my-check-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.my-check-btn { border: 1px solid rgba(255,255,255,0.2); background: var(--white); color: var(--text); border-radius: 10px; padding: 7px 10px; cursor: pointer; font-size: 12px; font-weight: 700; }
.my-check-btn.primary { background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); color: #fff; border-color: transparent; }
.my-check-btn.primary-open-ai-btn {
    background: linear-gradient(135deg, #0b5fff 0%, #2563eb 55%, #1e40af 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(37,99,235,0.35);
}
.my-check-btn.primary-open-ai-btn:hover {
    color: #fff;
    box-shadow: 0 18px 36px rgba(37,99,235,0.42);
}
.reviews-analyze-btn,
.photos-analyze-btn { display: inline-flex; align-items: center; background: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #0ea5e9 100%); color: #fff; border: none; box-shadow: 0 10px 20px rgba(37,99,235,0.2); }
.card-analyze-btn { display: inline-flex; align-items: center; background: linear-gradient(135deg, #0ea5a0 0%, #2563eb 50%, #7c3aed 100%); color: #fff; border: none; padding: 9px 12px; box-shadow: 0 10px 20px rgba(14,165,160,0.18); }
.card-analyze-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 24px rgba(14,165,160,0.22); }
.desc-analyze-btn { display: inline-flex; align-items: center; background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); color: #fff; border: none; padding: 9px 12px; box-shadow: 0 10px 20px rgba(239,68,68,0.16); }
.desc-analyze-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 24px rgba(239,68,68,0.22); }
.reviews-analyze-btn:hover,
.photos-analyze-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 24px rgba(37,99,235,0.24); }

.card-ai-analysis-result {
    text-align: left;
    line-height: 1.55;
    font-size: 13px;
}
.card-ai-analysis-result.compact { font-size: 13px; }
.card-ai-analysis-result h2,
.card-ai-analysis-result h3,
.card-ai-analysis-result h4 {
    margin: 8px 0 6px;
    font-size: 14px;
    line-height: 1.35;
}
.card-ai-analysis-top {
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px solid rgba(245,158,11,0.18);
    background: linear-gradient(180deg, rgba(245,158,11,0.08), rgba(255,255,255,0.04));
    padding: 10px 12px;
}
.card-ai-analysis-title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text);
}

.account-panel {
    border-radius: 24px;
    background: radial-gradient(circle at 10% 10%, rgba(99,102,241,0.14), transparent 40%), radial-gradient(circle at 90% 20%, rgba(16,185,129,0.10), transparent 45%), rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 18px 40px rgba(15,23,42,0.08);
}
.account-panel-header h3 { font-size: 22px; letter-spacing: -0.02em; }
.limit-item { background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.75)); border-radius: 14px; box-shadow: 0 8px 22px rgba(15,23,42,0.05); font-weight: 700; }
.account-tabs { display: flex; flex-wrap: wrap; }
.account-tab { background: rgba(255,255,255,0.8); border-radius: 999px; padding: 10px 16px; font-weight: 700; box-shadow: 0 4px 12px rgba(15,23,42,0.04); }
.account-tab.active { background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); }
.account-form-grid input { background: rgba(255,255,255,0.92); box-shadow: 0 6px 18px rgba(15,23,42,0.04); }
.account-action-btn { background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); box-shadow: 0 12px 28px rgba(37,99,235,0.22); }

.result-dashboard { background: rgba(255,255,255,0.04); border-radius: 18px; padding: 14px; border: 1px solid rgba(255,255,255,0.12); }
.result-tab { background: rgba(255,255,255,0.84); border-radius: 999px; font-weight: 700; box-shadow: 0 4px 12px rgba(15,23,42,0.04); }
.result-tab.active { background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%); }
.result-section-box { background: rgba(255,255,255,0.06); border-radius: 18px; padding: 16px; }

.review-row-hidden { display: none; }
.reviews-more-btn { margin-top: 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.88); color: var(--text); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 12px; font-weight: 700; }

.info-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.info-cards.is-hidden { display: none; }
.info-card h3 { letter-spacing: -0.02em; }

@media (max-width: 768px) {
    .result-tabs { gap: 6px; }
    .result-tab { font-size: 12px; padding: 9px 8px; }
    .my-checks-header { align-items: flex-start; }
    .ai-exec-kpis { grid-template-columns: 1fr; }
    .ai-detail-grid { grid-template-columns: 1fr; }
    .ai-exec-columns { grid-template-columns: 1fr; }
    .ai-health-row { grid-template-columns: 100px 1fr auto; }
    .primary-kpi-grid { grid-template-columns: 1fr 1fr; }
    .primary-value-grid { grid-template-columns: 1fr; }
    .primary-two-cols { grid-template-columns: 1fr; }
    .primary-health-row { grid-template-columns: 115px 1fr auto; }
    .primary-impact-grid { grid-template-columns: 1fr; }
    .primary-roadmap-grid { grid-template-columns: 1fr; }
    .primary-compare-head { flex-direction: column; align-items: flex-start; gap: 4px; }
    .primary-cta-wrap { justify-content: stretch; }
    .primary-open-ai-btn { width: 100%; text-align: center; }
    .input-group input:focus { transform: none; }
    input, textarea, select, .marketplace-select, .account-form-grid input, .input-group input, .description-generator-textarea {
        font-size: 16px !important;
    }
    .my-check-btn,
    .reviews-more-btn,
    .submit-btn { padding-left: 2px; padding-right: 2px; }
    .result-dashboard { padding-left: 2px; padding-right: 2px; }
    .result-section-box { padding-left: 2px; padding-right: 2px; }
}

/* extra ux styles */
.hero-copy { margin: 12px auto 0; max-width: 760px; font-size: 14px; color: rgba(255,255,255,0.9); line-height: 1.55; }
.cabinet-quick-actions { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.descriptions-panel { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.32); border: 1px solid rgba(255,255,255,0.2); }
.description-generator-textarea { width:100%; min-height:110px; margin-top:10px; padding:12px 14px; border-radius:12px; border:2px solid transparent; background:rgba(255,255,255,0.92); color:var(--text); resize:vertical; font-family:inherit; }
.description-generator-textarea:focus { outline:none; border-color:var(--primary); }
.generated-description-result { margin-top: 12px; background: var(--white); border-radius: 12px; padding: 12px; border: 1px solid rgba(255,255,255,0.2); }
.generated-description-text { white-space: pre-wrap; font-size: 14px; line-height: 1.6; color: var(--text); }
.saved-descriptions-list { display:grid; gap:8px; margin-top:12px; max-height:220px; overflow-y:auto; }
.saved-description-item { background: var(--white); border-radius: 12px; border:1px solid rgba(255,255,255,0.2); padding:10px 12px; }
.saved-description-item h5 { margin:0 0 6px; font-size:13px; }
.saved-description-meta { font-size:11px; color:var(--text-light); margin-bottom:8px; }
.saved-description-body { font-size:13px; color:var(--text); line-height:1.5; white-space:pre-wrap; }
.analysis-inline-box { margin-top:8px; padding:10px 12px; border-radius:10px; background: rgba(99,102,241,0.08); border:1px solid rgba(99,102,241,0.12); font-size:13px; line-height:1.5; }
.inline-ai-progress { display: grid; gap: 8px; }
.inline-ai-progress-head { display:flex; justify-content:space-between; gap:10px; font-size:12px; font-weight:700; color:var(--text); }
.inline-ai-progress-track { width:100%; height:10px; border-radius:999px; background: rgba(99,102,241,0.12); overflow:hidden; border:1px solid rgba(99,102,241,0.12); }
.inline-ai-progress-fill { height:100%; background: linear-gradient(90deg, #0ea5a0 0%, #2563eb 55%, #7c3aed 100%); border-radius:999px; transition: width .35s ease; }
.link-inline-title { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(99,102,241,0.4); }
.link-inline-title:hover { color: var(--primary); border-bottom-style: solid; }
.review-row-hidden { display:none; }
.collapsible-inline { display:inline; }
.collapsible-more-btn { margin-left:6px; border:none; background:transparent; color:var(--primary); cursor:pointer; font-weight:600; padding:0; }
@media (max-width: 768px) { .hero-copy { font-size: 13px; margin-top: 10px; } }

@media (max-width: 768px) {
    .toolbar-btn.toolbar-btn-wide {
        width: auto;
        min-height: 42px;
        padding: 0 12px;
        border-radius: 999px;
    }
    .toolbar-btn-wide .toolbar-btn-text { font-size: 12px; }
    .account-limits { grid-template-columns: 1fr; }
}
