/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0A0E27;
    --bg-light: #111936;
    --card: #151b3d;
    --card-hover: #1a2148;
    --text: #ffffff;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --border: #2a3563;
    --primary: #0693E3;
    --primary-hover: #0580cc;
    --primary-glow: rgba(6, 147, 227, 0.3);
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 12px;
    --radius-lg: 16px;
    /* CTA buttons - black on yellow */
    --cta-bg: #FFD700;
    --cta-text: #000000;
    --cta-hover: #FFC107;
}

/* ===========================================
   SECTOR THEMES - Generated dynamically by JS
   =========================================== */

/* Sector indicator badge */
.sector-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.sector-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-sector 2s infinite;
}

@keyframes pulse-sector {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header-logos {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-cartouche {
    background: #ffffff;
    padding: 10px 15px;
    border-radius: var(--radius);
    border: 1px solid #e0e0e0;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 0 20px rgba(96, 165, 250, 0.3);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.logo-cartouche:hover {
    box-shadow:
        0 6px 12px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 0 30px rgba(96, 165, 250, 0.5);
    transform: translateY(-2px);
}

.logo {
    height: 60px;
    width: auto;
    display: block;
}

.lang-selector {
    display: flex;
    gap: 0.25rem;
}

.lang-buttons {
    display: flex;
    gap: 0.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.25rem;
}

.lang-dropdown {
    display: none;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--text);
    background: var(--bg-light);
}

.lang-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

/* Mobile: show dropdown, hide buttons */
@media (max-width: 600px) {
    .lang-buttons {
        display: none;
    }
    .lang-dropdown {
        display: block;
    }

    .container {
        padding: 1rem 0.75rem;
        overflow-x: hidden;
    }

    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .header-logos {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }

    .header-cta {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .result-card {
        padding: 1rem;
    }

    .form-card {
        padding: 1rem;
    }

    .main-result {
        padding: 1.5rem;
    }

    .metric .value {
        font-size: 1.75rem;
    }

    .logo-cartouche {
        padding: 6px 10px;
    }

    .logo {
        height: 40px;
    }

    .header-logos {
        gap: 0.5rem;
    }

    /* Tables responsive */
    .table-wrapper {
        margin: 0 -0.75rem;
        padding: 0 0.75rem;
    }

    table {
        font-size: 0.75rem;
    }

    th, td {
        padding: 0.5rem 0.375rem;
    }
}

h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--card) 0%, var(--bg-light) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--success);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 0 20px var(--success-glow);
}

/* Quand le badge est seul (sans wrapper), garder la marge */
.hero-section > .hero-badge {
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.hero-title span {
    color: var(--primary);
}

.hero-description {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hero-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(6, 147, 227, 0.1);
    border: 1px solid rgba(6, 147, 227, 0.2);
    border-radius: var(--radius);
}

.benefit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.benefit-text {
    font-size: 0.938rem;
    color: var(--text-light);
}

.benefit-text strong {
    color: var(--text);
    display: block;
    margin-bottom: 0.25rem;
}

/* Form */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Sector Display */
.sector-display {
    margin-bottom: 1.25rem;
    padding: 0.875rem 1rem;
    background: var(--primary-glow, rgba(99, 102, 241, 0.1));
    border: 1px solid var(--primary, #6366f1);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.sector-detected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.sector-vertical {
    color: var(--text-muted);
}

.sector-separator {
    color: var(--primary, #6366f1);
    font-weight: bold;
}

.sector-name {
    color: var(--primary, #6366f1);
    font-weight: 600;
}

.sector-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.sector-select {
    width: auto;
    max-width: fit-content;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 4px);
    background: var(--bg);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sector-select:hover,
.sector-select:focus {
    border-color: var(--primary, #6366f1);
    outline: none;
}

.sector-auto-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-group-half {
    flex: 1;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .sector-select {
        max-width: 100%;
        width: 100%;
    }

    .form-group-small {
        width: 100%;
    }
}

.form-group-small {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.form-group-small select {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

input, select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-light);
    color: var(--text);
    transition: all 0.2s;
}

input::placeholder {
    color: var(--text-muted);
}

/* URL Input Group */
.url-input-group {
    display: flex;
    gap: 0;
}

.url-protocol-select {
    width: auto;
    min-width: 95px;
    border-radius: var(--radius) 0 0 var(--radius);
    border-right: none;
    background: var(--card);
    font-size: 0.9rem;
    padding: 0.875rem 0.5rem;
}

.url-input-group input {
    flex: 1;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Checkbox Group */
.checkbox-group {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label span {
    font-size: 0.9rem;
    color: var(--text);
}

.checkbox-warning {
    font-size: 0.8rem;
    color: var(--warning);
    margin: 0.5rem 0 0 2rem;
    font-style: italic;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

select option {
    background: var(--bg-light);
    color: var(--text);
}

button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: var(--cta-bg);
    color: var(--cta-text);
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 20px var(--primary-glow);
}

button[type="submit"]:hover {
    background: var(--cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 215, 0, 0.4);
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-buttons button[type="submit"] {
    flex: 1;
    margin-top: 0;
}

.btn-stop {
    padding: 1rem 1.5rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-stop:hover {
    background: #b91c1c;
}

.btn-loader {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-message {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-message.stopped-message {
    color: #64748b;
    animation: none;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Result Cards */
/* Results Summary Header */
.results-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.summary-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.summary-keyword,
.summary-url {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.summary-keyword .summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.summary-url .summary-value {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
}

.summary-url .summary-value:hover {
    text-decoration: underline;
}

.sector-badge-container {
    flex-shrink: 0;
}

.sector-badge-container .sector-badge {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
}

@media (max-width: 600px) {
    .results-summary-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sector-badge-container {
        align-self: flex-start;
    }
}

.result-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: all 0.2s;
}

.result-card:hover {
    border-color: var(--primary);
}

.result-card h3 {
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Main Result */
.main-result {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
    border: none;
    box-shadow: 0 8px 40px var(--primary-glow);
}

.main-result h2 {
    font-size: 0.938rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.result-explanation {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-bottom: 1rem;
    font-style: italic;
}

.pages-range {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.75rem;
}

.pages-range span {
    font-size: 1.25rem;
}

#pagesMin, #pagesMax {
    font-size: 4rem;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.pages-range .separator {
    opacity: 0.7;
}

.pages-range .unit {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* Pages Gauge */
.pages-gauge {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.gauge-track {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: visible;
}

.gauge-fill {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, #86efac 0%, #22c55e 100%);
    border-radius: 6px;
    transition: all 0.5s ease;
}

.gauge-marker {
    position: absolute;
    top: -4px;
    width: 4px;
    height: 20px;
    background: white;
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: white;
    opacity: 0.9;
    font-weight: 500;
}

/* Opportunity Score Card */
.opportunity-card {
    text-align: center;
    background: linear-gradient(135deg, #059669 0%, #34d399 100%);
    color: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 40px rgba(5, 150, 105, 0.25);
}

.opportunity-card h2 {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.opportunity-score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-circle {
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

#opportunityScoreValue {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 90px;
}

.score-max {
    font-size: 1rem;
    opacity: 1;
    color: #fff;
    margin-left: 2px;
}

.score-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0.5rem 0 0 0;
}

/* Score label color variants - badge style */
.score-label.score-excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.35));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.score-label.score-good {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.35));
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.score-label.score-moderate {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.85), rgba(217, 119, 6, 0.95));
    color: #1a1a2e;
    border: 1px solid rgba(245, 158, 11, 0.6);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.score-label.score-poor {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.35));
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

/* Ensure /10 text is visible in score labels */
.score-label .score-max {
    opacity: 1 !important;
}
.score-label.score-excellent .score-max { color: #34d399; }
.score-label.score-good .score-max { color: #60a5fa; }
.score-label.score-moderate .score-max { color: #1a1a2e; }
.score-label.score-poor .score-max { color: #f87171; }

.opportunity-factors {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.opportunity-factor {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    color: #1e293b;
}

.factor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.factor-label {
    font-weight: 600;
    color: #1e293b;
}

.factor-desc {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.2;
}

.factor-value {
    font-weight: 700;
    color: #1e293b;
}

.factor-good { color: #16a34a !important; }
.factor-moderate { color: #ca8a04 !important; }
.factor-poor { color: #dc2626 !important; }

/* Opportunity Card - score-based colors */
.opportunity-card.opp-excellent {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 40px rgba(5, 150, 105, 0.25);
}

.opportunity-card.opp-good {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 40px rgba(5, 150, 105, 0.25);
}

.opportunity-card.opp-moderate {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 40px rgba(217, 119, 6, 0.25);
}

.opportunity-card.opp-moderate .opportunity-factor {
    background: #fef3c7;
    border-color: #fde68a;
}

.opportunity-card.opp-poor {
    background: linear-gradient(135deg, #dc2626 0%, #f87171 100%);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 8px 40px rgba(220, 38, 38, 0.25);
}

.opportunity-card.opp-poor .opportunity-factor {
    background: #fee2e2;
    border-color: #fecaca;
}

@media (max-width: 480px) {
    .opportunity-factors {
        grid-template-columns: 1fr;
    }
}

/* Share Button */
.btn-share {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%) !important;
    color: white !important;
    border: none !important;
}

.btn-share:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%) !important;
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
}

/* Feedback Widget */
.feedback-widget {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.feedback-widget h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.feedback-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.rating-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.rating-stars {
    display: flex;
    gap: 0.15rem;
}

.star-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #d1d5db;
    cursor: pointer;
    padding: 0.1rem;
    transition: color 0.15s, transform 0.15s;
}

.star-btn:hover {
    transform: scale(1.2);
}

.star-btn.active {
    color: #f59e0b;
}

.star-btn.hover {
    color: #fbbf24;
}

.rating-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    min-width: 40px;
}

.feedback-suggestion {
    margin-bottom: 1rem;
}

.feedback-suggestion label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.feedback-suggestion textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    resize: vertical;
    background: var(--bg-light);
    color: var(--text);
}

.feedback-suggestion textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-feedback-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-feedback-submit:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
}

.btn-feedback-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.feedback-thanks {
    color: #059669;
    font-weight: 600;
    margin-top: 1rem;
}

/* Intent Card */
.intent-card {
    background: linear-gradient(135deg, var(--card) 0%, var(--bg-light) 100%);
}

.intent-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.intent-badge {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
}

.intent-badge.informational { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.intent-badge.navigational { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.intent-badge.transactional { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.intent-badge.commercial { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.intent-confidence {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.intent-evidence {
    font-size: 0.813rem;
    color: var(--text-muted);
    font-style: italic;
}

/* SERP Features */
.serp-features-card {
    background: linear-gradient(135deg, var(--card) 0%, var(--bg-light) 100%);
}

.serp-features-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 600px) {
    .serp-features-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }
}

.serp-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius);
    font-size: 0.813rem;
    font-weight: 500;
    transition: all 0.2s;
}

.serp-feature.active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.serp-feature.inactive {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border: 1px solid var(--border);
    opacity: 0.6;
}

.serp-feature .icon {
    font-size: 1rem;
}

.paa-questions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.paa-questions h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.paa-questions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.paa-questions li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.paa-questions li:last-child {
    border-bottom: none;
}

.paa-questions li::before {
    content: '?';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.serp-recommendations {
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    background: rgba(6, 147, 227, 0.1);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.serp-recommendations p {
    font-size: 0.813rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

/* Semantic Breakdown */
.semantic-breakdown {
    font-size: 0.813rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    line-height: 1.5;
}

/* Semantic Warning */
.semantic-warning {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: #fbbf24;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Position details compact */
.position-details-compact {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.position-details-compact .positioned-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.position-details-compact .positioned-url a {
    font-size: 0.7rem;
    color: var(--primary);
    word-break: break-all;
}

.metric {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.metric .value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text);
}

.metric .unit {
    font-size: 1rem;
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.low { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge.medium { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.badge.high { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.note {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Site Position Section */
.site-position-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.position-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.position-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.position-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.position-details .positioned-title {
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.position-details .positioned-url {
    max-width: 100%;
}

.position-details .positioned-url a {
    font-size: 0.875rem;
    color: var(--primary);
    word-break: break-all;
    display: block;
    max-width: 100%;
}

.position-note {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.813rem;
    color: #fbbf24;
}

/* Site Power */
.site-power {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.site-score-right {
    margin-left: auto;
}

.power-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.power-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.power-item .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.power-item.highlight {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(6, 147, 227, 0.15) 0%, rgba(6, 147, 227, 0.05) 100%);
    border: 1px solid rgba(6, 147, 227, 0.3);
    border-radius: var(--radius);
    min-width: 140px;
}

.power-item.highlight .note-row {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.power-item.highlight .value {
    color: var(--primary);
    font-size: 2.25rem;
}

.power-item.highlight .unit {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.warning {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: #fbbf24;
}

.dvi-explanation {
    margin-top: 1.25rem;
    padding: 1rem;
    background: rgba(6, 147, 227, 0.08);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
}

.kgr-explanation {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-style: italic;
}

/* Knowledge Graph Card */
.kg-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(6, 147, 227, 0.05) 100%);
    border-left: 4px solid #8b5cf6;
}

.kg-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}

.kg-entity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kg-icon {
    font-size: 2rem;
    background: rgba(139, 92, 246, 0.15);
    padding: 0.75rem;
    border-radius: var(--radius);
}

.kg-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kg-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.kg-type {
    font-size: 0.8rem;
    color: #8b5cf6;
    text-transform: uppercase;
    font-weight: 500;
}

.kg-score-badge {
    background: rgba(139, 92, 246, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    text-align: center;
}

.kg-score-value {
    font-weight: 700;
    color: #8b5cf6;
    font-size: 0.9rem;
}

.kg-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.kg-wiki-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b5cf6;
    font-size: 0.875rem;
    text-decoration: none;
    padding: 0.5rem 0;
}

.kg-wiki-link:hover {
    text-decoration: underline;
}

/* KG Insights Section */
.kg-insights h4 {
    font-size: 1rem;
    color: var(--text);
    margin: 0 0 1rem 0;
}

.kg-insight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 700px) {
    .kg-insight-grid {
        grid-template-columns: 1fr;
    }
}

.kg-insight-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: var(--radius);
}

.kg-insight-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kg-insight-text strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.kg-insight-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.kg-recommendation {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius);
    border-left: 3px solid #10b981;
}

.kg-recommendation:empty {
    display: none;
}

/* History Card */
.history-card {
    margin-top: 2rem;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-header h3 {
    margin: 0;
}

.btn-text-danger {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    transition: opacity 0.2s;
}

.btn-text-danger:hover {
    opacity: 0.7;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.history-item:hover {
    border-color: var(--primary);
}

.history-item.selected {
    border-color: var(--primary);
    background: rgba(6, 147, 227, 0.05);
}

.history-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.history-info {
    flex: 1;
    min-width: 0;
}

.history-keyword {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.15rem;
}

.history-url {
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    word-break: break-all;
    opacity: 0.8;
}

.history-country {
    background: var(--primary);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.7rem;
}

.history-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.history-pages {
    font-weight: 600;
    color: var(--primary);
}

.history-date {
    color: var(--text-muted);
}

.history-sector {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: var(--primary-glow);
    border: 1px solid var(--primary);
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Sector-specific colors for history badges */
.history-sector[data-sector="realestate"] {
    background: rgba(46, 125, 50, 0.2);
    border-color: #2E7D32;
    color: #4CAF50;
}

.history-sector[data-sector="cyber"] {
    background: rgba(0, 230, 118, 0.15);
    border-color: #00E676;
    color: #00E676;
}

.history-sector[data-sector="finance"] {
    background: rgba(255, 215, 0, 0.15);
    border-color: #FFD700;
    color: #FFD700;
}

.history-sector[data-sector="health"] {
    background: rgba(0, 188, 212, 0.15);
    border-color: #00BCD4;
    color: #00BCD4;
}

.history-sector[data-sector="ecommerce"] {
    background: rgba(255, 87, 34, 0.15);
    border-color: #FF5722;
    color: #FF7043;
}

.history-sector[data-sector="legal"] {
    background: rgba(124, 77, 255, 0.15);
    border-color: #7C4DFF;
    color: #B388FF;
}

.history-sector[data-sector="travel"] {
    background: rgba(3, 169, 244, 0.15);
    border-color: #03A9F4;
    color: #29B6F6;
}

.history-sector[data-sector="education"] {
    background: rgba(156, 39, 176, 0.15);
    border-color: #9C27B0;
    color: #BA68C8;
}

.history-sector[data-sector="jewelry"] {
    background: rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
    color: #E5C158;
}

.history-sector[data-sector="fashion"] {
    background: rgba(233, 30, 99, 0.15);
    border-color: #E91E63;
    color: #F06292;
}

.history-actions {
    display: flex;
    gap: 0.5rem;
}

.history-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.75rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.history-btn-view {
    background: var(--primary);
    color: white;
}

.history-btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.history-btn:hover {
    opacity: 0.8;
}

.history-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

.history-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.history-nav-btn {
    padding: 0.5rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.history-nav-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.history-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.history-nav-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-btn-reload {
    background: transparent;
    border: none;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
}

.history-info:hover {
    background: rgba(6, 147, 227, 0.05);
    border-radius: var(--radius);
}

/* Comparison Section */
.comparison-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.comparison-section h4 {
    margin: 0 0 1rem 0;
    color: var(--primary);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.comparison-column {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    min-width: 0;
}

.comparison-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.comparison-column h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text);
}

.comparison-url {
    font-size: 0.7rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    word-break: break-all;
    opacity: 0.8;
}

.comparison-country {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.65rem;
}

.comparison-row {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    font-size: 0.875rem;
}

.comparison-label {
    color: var(--text-muted);
}

.comparison-value {
    font-weight: 600;
    color: var(--text);
}

.comparison-value.better {
    color: #10b981;
}

.comparison-value.worse {
    color: #ef4444;
}

.comparison-divider {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0 0.25rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.comparison-row.highlight {
    background: rgba(6, 147, 227, 0.1);
    padding: 0.5rem;
    border-radius: 6px;
    margin: 0 -0.5rem 0.5rem -0.5rem;
}

.comparison-row.muted .comparison-value {
    color: var(--text-muted);
    font-weight: 400;
}

.comparison-dual-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-row-dual {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.875rem;
}

.comparison-row-dual .comparison-label {
    color: var(--text-muted);
}

.comparison-row-dual .comparison-value {
    font-weight: 600;
    text-align: center;
}

.comparison-row-dual .comparison-value.muted {
    color: var(--text-muted);
    font-weight: 400;
}

/* History Filters */
.history-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.history-filter {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem 0.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
}

.history-filter:focus {
    outline: none;
    border-color: var(--primary);
}

.history-filter::placeholder {
    color: var(--text-muted);
}

.history-filter-clear {
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 0 0 auto;
}

.history-filter-clear:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.compare-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary), #0070b3);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.compare-btn:hover {
    opacity: 0.9;
}

.compare-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

    .history-item {
        flex-wrap: wrap;
    }

    .history-actions {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Table */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th, td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Competitor table cells */
td.pos-cell {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary) !important;
    background: rgba(6, 147, 227, 0.1);
    min-width: 60px;
    width: 60px;
}

.comp-cell {
    max-width: 400px;
}

.comp-url {
    display: block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.813rem;
    word-break: break-all;
    line-height: 1.5;
}

.comp-url:hover {
    text-decoration: underline;
}

.comp-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
    line-height: 1.4;
    font-style: italic;
}

/* RD columns */
.rd-column {
    background: rgba(6, 147, 227, 0.05);
}

.rd-cell {
    text-align: center;
    color: var(--primary);
    font-weight: 500;
}

/* Mini score blocks for competitors */
.score-cell {
    text-align: center;
}

.mini-score {
    display: inline-flex;
    align-items: baseline;
    gap: 0.125rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius);
    background: rgba(6, 147, 227, 0.1);
    border: 1px solid rgba(6, 147, 227, 0.2);
}

.mini-score-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.mini-score-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mini-score.note-high {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.mini-score.note-high .mini-score-value {
    color: #10b981;
}

.mini-score.note-medium {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

.mini-score.note-medium .mini-score-value {
    color: #f59e0b;
}

.mini-score.note-low {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

.mini-score.note-low .mini-score-value {
    color: #ef4444;
}

/* Average row in competitor table */
.avg-row {
    background: var(--bg-light);
    font-weight: 600;
}

.avg-row td {
    border-top: 2px solid var(--border);
    padding-top: 1rem;
    color: var(--text);
}

/* Outliers note row */
.outliers-note-row td {
    padding-top: 0.5rem;
    text-align: left;
    color: var(--text-muted);
    font-style: italic;
}

/* Explanation */
.explanation {
    background: var(--bg-light);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-secondary, .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 1.75rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-secondary {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 20px var(--success-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--success-glow);
}

.btn-secondary svg, .btn-primary svg {
    flex-shrink: 0;
}

/* Business opportunity button - always on one line */
#businessBtn {
    white-space: nowrap;
    flex-shrink: 0;
}

#explanationText {
    font-size: 0.938rem;
    line-height: 1.8;
    color: var(--text-light);
}

#explanationText p {
    margin-bottom: 0.75rem;
}

#explanationText strong {
    color: var(--primary);
}

/* Error */
.error-card {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.25rem;
}

.error-card h3 {
    color: #f87171;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.error-card p {
    color: #fca5a5;
    font-size: 0.938rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-logos {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-logo {
    display: inline-block;
}

.footer-logo .logo-cartouche {
    padding: 8px 12px;
}

.footer-logo .logo-cartouche img {
    height: 45px;
    width: auto;
    display: block;
}

.footer-logo:hover .logo-cartouche {
    border-color: var(--primary);
}

.footer-bio {
    max-width: 700px;
    margin: 2rem auto 0;
    text-align: left;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.bio-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.bio-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--primary);
}

.bio-intro {
    flex: 1;
}

.bio-intro h3 {
    margin: 0 0 0.75rem 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.bio-intro p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}

.bio-intro p:last-of-type {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .bio-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-bio > .linkedin-link {
        margin-left: 0;
    }
}

.footer-bio h3 {
    margin: 0 0 1rem 0;
    color: var(--primary);
    font-size: 1.25rem;
}

.footer-bio > p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: #0077b5;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: rgba(0, 119, 181, 0.1);
    border-radius: var(--radius);
    transition: all 0.2s;
}

/* Alignement LinkedIn quand il est hors de bio-intro (business.html) */
.footer-bio > .linkedin-link {
    margin-left: calc(100px + 1.5rem);
}

.linkedin-link:hover {
    background: #0077b5;
    color: white;
}

.bio-details {
    margin-top: 1rem;
}

.bio-details summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 500;
    padding: 0.5rem 0;
    user-select: none;
}

.bio-details summary:hover {
    text-decoration: underline;
}

.bio-expanded {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.bio-expanded p {
    margin-bottom: 0.75rem;
}

.bio-expanded ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.bio-expanded li {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.bio-expanded li strong {
    color: var(--text);
}

/* Footer Content Layout */
.footer-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 2rem auto 0;
}

.footer-content .footer-bio {
    flex: 1;
    min-width: 300px;
    margin: 0;
}

.footer-cta-cartouche {
    flex: 0 0 340px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.footer-cta-cartouche::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.footer-cta-cartouche h4 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.footer-cta-cartouche h4::before {
    content: '🚀';
    margin-right: 0.5rem;
}

.footer-cta-cartouche p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.footer-cta-cartouche .btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.1rem 1.5rem;
    background: linear-gradient(135deg, #ffea00 0%, #ffdd00 100%);
    color: #000;
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255, 221, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-cta-cartouche .btn-cta::before {
    content: '🎥';
    font-size: 1.3rem;
}

.footer-cta-cartouche .btn-cta:hover {
    background: linear-gradient(135deg, #fff176 0%, #ffea00 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 221, 0, 0.6);
}

/* References Section */
.references-section {
    padding: 2rem 2rem 4rem 2rem;
    margin-top: 3rem;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-light) 100%);
    border-top: 1px solid var(--border);
}

.references-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.references-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.clients-logos {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 1.5rem 2rem;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.client-logo {
    max-height: 40px;
    max-width: 100px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.8);
    transition: all 0.3s;
    flex-shrink: 0;
}

.client-logo-lg {
    max-height: 55px;
    max-width: 140px;
}

.client-logo-md {
    max-height: 45px;
    max-width: 110px;
}

.client-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.testimonials {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    transition: opacity 0.3s ease;
}

.testimonials-updated {
    animation: testimonials-flash 0.5s ease-out;
}

@keyframes testimonials-flash {
    0% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.testimonial {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.testimonial blockquote {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    margin: 0 0 1rem 0;
    font-style: italic;
}

.testimonial cite {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: normal;
}

.testimonial cite a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.testimonial cite a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Case Studies */
.case-studies {
    margin-top: 3rem;
}

.case-studies h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text);
}

.case-studies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.case-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(6, 147, 227, 0.2);
}

.case-card-client {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.case-card-keyword {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

.case-card-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.case-card-before,
.case-card-after {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
}

.case-card-before {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    font-size: 0.9rem;
}

.case-card-after {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    font-size: 1.1rem;
}

.case-card-arrow {
    color: var(--primary);
    font-size: 1.2rem;
}

.case-card-gain {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
}

.case-card-duration {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .case-studies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .testimonials {
        grid-template-columns: 1fr;
    }

    .case-studies-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
    }

    .footer-cta-cartouche {
        flex: 1;
        width: 100%;
    }
}

/* Info Box */
.info-box {
    background: rgba(6, 147, 227, 0.1);
    border: 1px solid rgba(6, 147, 227, 0.2);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.info-box p {
    font-size: 0.938rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* GEO vs SEO Section */
.geo-seo-section {
    background: linear-gradient(135deg, var(--card) 0%, var(--bg-light) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-top: 2rem;
}

.geo-seo-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.geo-seo-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.geo-seo-content {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
}

.geo-seo-content p {
    margin-bottom: 1.25rem;
}

.geo-seo-content strong {
    color: var(--text);
}

.geo-seo-highlight {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
    font-weight: 500;
    color: #34d399;
}

/* Backlinks Recommendation */
.backlinks-reco {
    background: linear-gradient(135deg, var(--card) 0%, rgba(6, 147, 227, 0.08) 100%);
    border: 1px solid rgba(6, 147, 227, 0.3);
}

.backlinks-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.backlinks-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.backlinks-stat .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.backlinks-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.backlinks-stat.highlight {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.backlinks-stat.highlight .value {
    color: var(--warning);
}

.backlinks-stat.highlight-green {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.backlinks-stat.highlight-green .value {
    color: var(--success);
}

.backlinks-stat .gap-label {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.8;
    display: block;
    margin-bottom: 0.125rem;
}

.backlinks-explanation {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: var(--radius);
    font-size: 0.938rem;
    line-height: 1.7;
}

.backlinks-explanation strong {
    color: var(--primary);
}

.backlinks-explanation .timeline {
    display: inline-block;
    background: rgba(6, 147, 227, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0.25rem;
}

@media (max-width: 768px) {
    .backlinks-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Related Keywords Card */
.related-keywords-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}

#relatedKeywordsTable {
    display: block;
    max-height: none;
}

#relatedKeywordsTable thead,
#relatedKeywordsTable tbody,
#relatedKeywordsTable tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

#relatedKeywordsTable thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--card, #fff);
}

.related-keywords-card .table-wrapper {
    max-height: 420px;
    overflow-y: auto;
}

.related-kw-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.related-kw-stat .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-kw-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.related-kw-stat .unit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.related-kw-stat.highlight-green {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.related-kw-stat.highlight-green .value {
    color: var(--success);
}

.related-kw-explanation {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

#relatedKeywordsTable .volume-bar {
    display: inline-block;
    height: 6px;
    border-radius: 3px;
    background: var(--primary, #0693e3);
    margin-left: 0.5rem;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .related-keywords-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hidden utility */
[hidden] {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    .hero-section {
        padding: 1.75rem;
    }

    .hero-title {
        font-size: 1.35rem;
    }

    #pagesMin, #pagesMax {
        font-size: 3rem;
    }

    .form-card {
        padding: 1.5rem;
    }
}

/* ============ Core Web Vitals (PageSpeed) ============ */
.pagespeed-card {
    margin-top: 1.5rem;
}

.pagespeed-score-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.pagespeed-score-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(var(--success) 0deg, var(--bg-light) 0deg);
    position: relative;
}

.pagespeed-score-circle::before {
    content: '';
    position: absolute;
    width: 64px;
    height: 64px;
    background: var(--card);
    border-radius: 50%;
}

.pagespeed-score-circle.score-good {
    background: conic-gradient(var(--success) calc(var(--score) * 3.6deg), var(--bg-light) 0deg);
}

.pagespeed-score-circle.score-moderate {
    background: conic-gradient(var(--warning) calc(var(--score) * 3.6deg), var(--bg-light) 0deg);
}

.pagespeed-score-circle.score-poor {
    background: conic-gradient(var(--danger) calc(var(--score) * 3.6deg), var(--bg-light) 0deg);
}

.pagespeed-score-value {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: 700;
}

.pagespeed-score-circle.score-good .pagespeed-score-value {
    color: var(--success);
}

.pagespeed-score-circle.score-moderate .pagespeed-score-value {
    color: var(--warning);
}

.pagespeed-score-circle.score-poor .pagespeed-score-value {
    color: var(--danger);
}

.pagespeed-score-label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pagespeed-score-label span:first-child {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* CWV Metrics Grid */
.cwv-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cwv-metric {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cwv-metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cwv-metric-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cwv-metric-score {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.cwv-metric-score.score-good {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.cwv-metric-score.score-moderate {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.cwv-metric-score.score-poor {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.cwv-metric-values {
    display: flex;
    gap: 1rem;
    margin: 0.25rem 0;
}

.cwv-metric-device {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cwv-device-icon {
    font-size: 0.85rem;
    opacity: 0.7;
}

.cwv-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.cwv-metric-value.score-good {
    color: var(--success);
}

.cwv-metric-value.score-moderate {
    color: var(--warning);
}

.cwv-metric-value.score-poor {
    color: var(--danger);
}

.cwv-metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cwv-metric-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.8;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* CWV Insights */
.cwv-insights {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1rem;
}

.cwv-insights h4 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.cwv-insight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.cwv-insight-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.cwv-insight-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.cwv-insight-text strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.cwv-insight-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.cwv-recommendation {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(6, 147, 227, 0.1);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
    font-size: 0.85rem;
    color: var(--text-light);
}

.cwv-recommendation:empty {
    display: none;
}

/* PageSpeed Device Tabs */
.pagespeed-device-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
}

.device-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius) - 2px);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.device-tab:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.05);
}

.device-tab.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.device-tab svg {
    flex-shrink: 0;
}

.device-score {
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.2);
}

.device-tab.active .device-score {
    background: var(--primary);
    color: white;
}

.device-score.score-good {
    background: var(--success);
    color: white;
}

.device-score.score-moderate {
    background: var(--warning);
    color: #000;
}

.device-score.score-poor {
    background: var(--danger);
    color: white;
}

/* PageSpeed Not Run State */
.pagespeed-not-run {
    text-align: center;
    padding: 2rem 1rem;
}

.pagespeed-not-run p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pagespeed-warning {
    font-size: 0.8rem;
    color: var(--warning);
    font-style: italic;
    margin-top: 0.75rem;
}

.btn-pagespeed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0580cc 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-pagespeed:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-pagespeed:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-pagespeed .btn-loader {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* PageSpeed Loading State */
.pagespeed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    gap: 1rem;
}

.pagespeed-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.pagespeed-loading p {
    color: var(--text-muted);
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Responsive CWV */
@media (max-width: 768px) {
    .cwv-metrics-grid {
        display: flex;
        overflow-x: auto;
        gap: 0.75rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .cwv-metrics-grid::-webkit-scrollbar {
        height: 4px;
    }

    .cwv-metrics-grid::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 2px;
    }

    .cwv-metric {
        min-width: 140px;
        flex-shrink: 0;
        padding: 0.75rem;
    }

    .cwv-metric-value {
        font-size: 1rem;
    }

    .cwv-metric-desc {
        display: none;
    }

    .cwv-insight-grid {
        grid-template-columns: 1fr;
    }

    .pagespeed-score-container {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   CTA Section Full Width
======================================== */
.cta-section-full {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 2rem 0;
    margin: 2rem 0;
}

.cta-section-full .cta-content {
    text-align: center;
}

.cta-section-full h3 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.cta-section-full p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.btn-cta-large {
    display: inline-block;
    background: #FFD700;
    color: #1a1a1a;
    padding: 0.7rem 2rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-cta-large:hover {
    background: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Header CTA */
.header-cta {
    display: inline-block;
    background: #FFD700;
    color: #1a1a1a;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-cta:hover {
    background: #e6c200;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .cta-section-full {
        padding: 1.5rem 0;
    }

    .cta-section-full h3 {
        font-size: 1.2rem;
    }

    .btn-cta-large {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .header-cta {
        display: none;
    }
}

/* ========================================
   Timeline Section
======================================== */
.timeline-section {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.timeline-section h3 {
    color: var(--text);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.timeline-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary-glow), var(--success-glow));
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--primary);
}

.timeline-icon {
    font-size: 2.5rem;
}

.timeline-text {
    display: flex;
    flex-direction: column;
}

.timeline-range {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success);
}

.timeline-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.timeline-steps {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.step-duration {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.step-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   Process Section
======================================== */
.process-section {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.process-section h3 {
    color: var(--text);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.process-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.process-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.process-content h4 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.process-content p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.process-arrow {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.process-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-radius: var(--radius);
    border: 1px solid var(--success);
}

.guarantee-icon {
    color: var(--success);
    font-size: 1.2rem;
    font-weight: 700;
}

.process-guarantee span:last-child {
    color: var(--text);
    font-size: 0.95rem;
}

/* ========================================
   FAQ Section
======================================== */
.faq-section {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.faq-section h3 {
    color: var(--text);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.faq-item {
    background: var(--bg-light);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Responsive Timeline/Process/FAQ */
@media (max-width: 768px) {
    .timeline-highlight {
        flex-direction: column;
        text-align: center;
    }

    .timeline-range {
        font-size: 1.6rem;
    }

    .timeline-steps {
        flex-direction: column;
        gap: 1.5rem;
    }

    .process-steps {
        flex-direction: column;
    }

    .process-arrow {
        transform: rotate(90deg);
    }

    .process-step {
        max-width: 100%;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* Cross-link Section */
.cross-link-section {
    margin: 3rem 0;
}

.cross-link-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(6, 147, 227, 0.08) 0%, rgba(6, 147, 227, 0.03) 100%);
    border: 1px solid rgba(6, 147, 227, 0.2);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.cross-link-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(6, 147, 227, 0.15);
}

.cross-link-card.client-link {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-color: rgba(16, 185, 129, 0.2);
}

.cross-link-card.client-link:hover {
    border-color: var(--success);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.cross-link-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.cross-link-content {
    flex: 1;
}

.cross-link-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.cross-link-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.cross-link-btn {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cross-link-btn:hover {
    background: var(--primary-hover);
    transform: translateX(3px);
}

.cross-link-card.client-link .cross-link-btn {
    background: var(--success);
}

.cross-link-card.client-link .cross-link-btn:hover {
    background: #0ea572;
}

@media (max-width: 768px) {
    .cross-link-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .cross-link-btn {
        width: 100%;
        text-align: center;
    }
}

/* =====================================================
   AUTHENTICATION STYLES
   ===================================================== */

.auth-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.auth-btn-login {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.auth-btn-login:hover {
    background: var(--primary);
    color: white;
}

.auth-btn-logout {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.auth-btn-logout:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.auth-btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.auth-btn-primary:hover {
    background: var(--primary-dark);
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-badge {
    background: var(--warning);
    color: #000;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    margin-right: 0.4rem;
    text-transform: uppercase;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: background 0.2s;
}

.admin-link:hover {
    background: #bfdbfe;
    text-decoration: none;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.auth-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    margin: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.2);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.auth-modal-close:hover {
    color: #fff;
}

.auth-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #fff;
}

.auth-form-group {
    margin-bottom: 1rem;
}

.auth-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: rgba(255, 255, 255, 0.8);
}

.auth-form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-tertiary);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.auth-form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.auth-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.auth-forgot-link {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: #60a5fa;
    margin-top: 0.75rem;
    text-decoration: none;
    font-weight: 500;
}

.auth-forgot-link:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

/* Admin BO button */
.auth-btn-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.4);
    border-radius: 50%;
    color: #60a5fa;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.auth-btn-admin:hover {
    background: #60a5fa;
    border-color: #60a5fa;
    color: white;
    transform: scale(1.05);
}

.auth-btn-admin svg {
    width: 16px;
    height: 16px;
}

/* Account button */
.auth-btn-account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-btn-account:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.auth-btn-account svg {
    width: 16px;
    height: 16px;
}

/* Account modal styles */
.auth-account-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.auth-account-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.auth-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-switch a {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
    color: #fff;
}

.auth-sync-info {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .auth-container {
        order: -1;
    }

    .auth-user {
        flex-direction: column;
        gap: 0.3rem;
    }

    .auth-email {
        max-width: 120px;
        font-size: 0.7rem;
    }

    .auth-modal-content {
        padding: 1.5rem;
        margin: 0.5rem;
    }
}

/* ========== Tool Navigation ========== */
.tool-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 0.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.tool-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tool-nav-btn:hover {
    background: var(--card);
    color: var(--text);
}

.tool-nav-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.tool-nav-btn .nav-icon {
    font-size: 1.1rem;
}

.tool-nav-btn .nav-label {
    display: inline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tool-nav {
        flex-wrap: wrap;
        gap: 0.25rem;
        padding: 0.35rem;
    }

    .tool-nav-btn {
        flex: 1;
        min-width: 100px;
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
        justify-content: center;
    }

    .tool-nav-btn .nav-label {
        display: none;
    }

    .tool-nav-btn .nav-label-short {
        display: inline;
    }
}

@media (min-width: 769px) {
    .tool-nav-btn .nav-label-short {
        display: none;
    }
}

/* ========== Base Pages Override Section ========== */
.base-override-section {
    margin-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
}

.base-override-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px dashed rgba(255, 255, 255, 0.4);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}

.base-override-toggle:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.25);
}

.base-override-toggle.active {
    border-color: white;
    border-style: solid;
    background: rgba(255, 255, 255, 0.2);
}

.toggle-icon {
    font-size: 1.1rem;
}

.toggle-arrow {
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.base-override-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

.base-override-content {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.base-override-info {
    color: #475569;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.base-override-info strong {
    color: #1e40af;
}

.base-override-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.base-override-input-group label {
    color: #334155;
    font-size: 0.85rem;
    white-space: nowrap;
}

.base-override-input-group input[type="number"] {
    width: 100px;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    color: #1e293b;
    font-size: 1rem;
    text-align: center;
}

.base-override-input-group input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.base-override-input-group input[type="number"].error {
    border-color: var(--danger);
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.btn-apply, .btn-reset {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-apply {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-apply:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-reset {
    background: white;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.btn-reset:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.base-override-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #eff6ff;
    border-radius: var(--radius);
    border-left: 3px solid #3b82f6;
    color: #1e40af;
    font-size: 0.85rem;
}

.note-icon {
    flex-shrink: 0;
}

/* Override active indicator */
.pages-range.override-active {
    position: relative;
}

.pages-range.override-active::after {
    content: "✏️ Modified";
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 0.75rem;
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .base-override-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .base-override-input-group label {
        margin-bottom: 0.25rem;
    }

    .base-override-input-group input[type="number"] {
        width: 100%;
    }

    .btn-apply, .btn-reset {
        flex: 1;
    }
}

/* Agency Calculator */
.agency-calculator {
    padding: 2rem;
}

.agency-calculator h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.calc-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calc-input-group label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.calc-input-group input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
}

.calc-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.calc-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calc-result-item {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border);
}

.calc-result-item.highlight {
    background: linear-gradient(135deg, rgba(6, 147, 227, 0.1), rgba(16, 185, 129, 0.1));
    border-color: var(--primary);
}

.calc-result-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.calc-result-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--success);
}

.calc-result-item.highlight .calc-result-value {
    font-size: 2rem;
    color: var(--primary);
}

.calc-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.disclaimer-icon {
    background: var(--success);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.calc-disclaimer p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.calc-disclaimer strong {
    color: var(--success);
}

.agency-calculator .btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .calc-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .calc-results {
        grid-template-columns: 1fr;
    }

    .calc-result-value {
        font-size: 1.5rem;
    }

    .calc-result-item.highlight .calc-result-value {
        font-size: 1.75rem;
    }

    .calc-disclaimer {
        flex-direction: column;
        text-align: center;
    }

    .disclaimer-icon {
        align-self: center;
    }
}

/* ===========================
   BULK ANALYSIS STYLES
   =========================== */

/* Form counter */
.form-counter {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-counter .over-limit {
    color: var(--danger);
    font-weight: 600;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

#keywords {
    width: 100%;
    min-height: 200px;
    font-family: inherit;
    line-height: 1.8;
    resize: vertical;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    color: var(--text);
    font-size: 1rem;
}

#keywords:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 147, 227, 0.15);
}

#keywords::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Progress container */
.progress-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--radius);
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-status {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* Bulk Summary Cards */
.bulk-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.summary-icon {
    font-size: 1.5rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.summary-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.summary-card.summary-good {
    border-left: 3px solid var(--success);
}

.summary-card.summary-good .summary-value {
    color: var(--success);
}

.summary-card.summary-quick {
    border-left: 3px solid var(--primary);
}

.summary-card.summary-quick .summary-value {
    color: var(--primary);
}

.summary-card.summary-volume {
    border-left: 3px solid var(--secondary);
}

.summary-card.summary-volume .summary-value {
    color: var(--secondary);
}

/* Country Warning */
.country-warning {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 2px solid var(--warning);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(245, 158, 11, 0.2);
    }
}

.country-warning .warning-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.country-warning .warning-content {
    flex: 1;
}

.country-warning .warning-content strong {
    display: block;
    font-size: 1.2rem;
    color: var(--warning);
    margin-bottom: 0.5rem;
}

.country-warning .warning-content p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.95rem;
}

/* Bulk Results Card */
.bulk-results-card {
    overflow: visible;
}

.bulk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.bulk-header h2 {
    margin: 0;
}

.bulk-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Bulk Table */
.bulk-table-wrapper {
    overflow-x: auto;
    margin: 0 -1.5rem;
    padding: 0 1.5rem;
}

.bulk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.bulk-table th,
.bulk-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.bulk-table th {
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.bulk-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.bulk-table th.sortable:hover {
    background: rgba(0, 0, 0, 0.3);
}

.bulk-table th.sortable::after {
    content: '↕';
    margin-left: 0.5rem;
    opacity: 0.3;
    font-size: 0.75rem;
}

.bulk-table th.sort-asc::after {
    content: '↑';
    opacity: 1;
    color: var(--primary);
}

.bulk-table th.sort-desc::after {
    content: '↓';
    opacity: 1;
    color: var(--primary);
}

.bulk-table tbody tr {
    transition: background 0.2s ease;
}

.bulk-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.keyword-cell {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Opportunity Badge */
.opp-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.opp-badge.opp-good {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.opp-badge.opp-moderate {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.opp-badge.opp-poor {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Row colors based on opportunity */
.result-row.opp-good {
    background: rgba(16, 185, 129, 0.05);
}

.result-row.opp-moderate {
    background: rgba(245, 158, 11, 0.03);
}

.result-row.opp-poor {
    background: rgba(239, 68, 68, 0.03);
}

/* KGR colors */
.kgr-good {
    color: var(--success);
    font-weight: 600;
}

.kgr-moderate {
    color: var(--warning);
}

.kgr-poor {
    color: var(--danger);
}

/* Intent Badge */
.intent-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
}

.intent-badge.intent-informational {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.intent-badge.intent-transactional {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.intent-badge.intent-navigational {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.intent-badge.intent-commercial {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* View Button */
.btn-view {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.btn-view:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Legend */
.bulk-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.good {
    background: var(--success);
}

.legend-dot.moderate {
    background: var(--warning);
}

.legend-dot.poor {
    background: var(--danger);
}

/* Errors Card */
.bulk-errors-card {
    border-left: 3px solid var(--danger);
}

.bulk-errors-card h3 {
    color: var(--danger);
}

.bulk-errors-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bulk-errors-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.bulk-errors-card li:last-child {
    border-bottom: none;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: var(--text);
}

.modal-content h2 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    padding-right: 2rem;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.modal-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    border-radius: var(--radius);
    text-align: center;
}

.modal-section h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.modal-score {
    font-size: 2rem;
    font-weight: 700;
}

.modal-score.opp-good {
    color: var(--success);
}

.modal-score.opp-moderate {
    color: var(--warning);
}

.modal-score.opp-poor {
    color: var(--danger);
}

.modal-pages {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.modal-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-metric {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
}

.modal-metric .metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.modal-metric .metric-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.modal-competitors {
    margin-bottom: 1.5rem;
}

.modal-competitors h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.modal-competitors table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.modal-competitors th,
.modal-competitors td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.modal-competitors th {
    color: var(--text-muted);
    font-weight: 500;
}

.modal-actions {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.modal-actions .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
}

/* Bulk Page Responsive */
@media (max-width: 1024px) {
    .bulk-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bulk-summary {
        grid-template-columns: 1fr;
    }

    .summary-value {
        font-size: 1.5rem;
    }

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

    .bulk-actions {
        width: 100%;
    }

    .bulk-actions .btn-sm {
        flex: 1;
        text-align: center;
    }

    .bulk-legend {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .modal-grid,
    .modal-metrics {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 1.5rem;
    }
}

/* ========================================
   GEO Audit Promo Card (Agency Page)
======================================== */
.geo-promo-card {
    position: relative;
    margin-top: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 2px solid rgba(99, 102, 241, 0.3);
}

.geo-promo-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.geo-promo-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text);
}

.geo-promo-desc {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.geo-promo-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 500px) {
    .geo-promo-features {
        grid-template-columns: 1fr;
    }
}

.geo-promo-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
}

.geo-promo-feature .feature-icon {
    font-size: 1.1rem;
}

.btn-geo-audit {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-geo-audit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-geo-audit .btn-icon {
    font-size: 1.2rem;
}

.btn-geo-audit .btn-arrow {
    transition: transform 0.2s;
}

.btn-geo-audit:hover .btn-arrow {
    transform: translateX(4px);
}

/* =====================================
   Keyword Suggestion Button & Modal
   ===================================== */

/* Help me choose keyword button */
.btn-help-keyword {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-help-keyword:hover {
    background: var(--bg-light);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-help-keyword:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-help-keyword .btn-icon {
    font-size: 1rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-intro {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
}

.modal-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
    text-align: center;
}

/* Keyword Suggestions List */
.keyword-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.keyword-suggestion-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.keyword-suggestion-item:hover {
    border-color: var(--primary);
    background: rgba(6, 147, 227, 0.1);
}

.keyword-suggestion-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.keyword-suggestion-item.top-10 .keyword-suggestion-rank {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.keyword-suggestion-item.top-20 .keyword-suggestion-rank {
    background: rgba(6, 147, 227, 0.2);
    color: var(--primary);
}

.keyword-suggestion-item.top-50 .keyword-suggestion-rank {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.keyword-suggestion-info {
    flex: 1;
    min-width: 0;
}

.keyword-suggestion-keyword {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.keyword-suggestion-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.keyword-suggestion-volume {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.keyword-suggestion-volume strong {
    color: var(--success);
}

.keyword-suggestion-pos {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.keyword-suggestion-select {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.keyword-suggestion-select:hover {
    background: var(--primary-hover);
}

/* Modal Loading State */
.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.modal-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.modal-loading p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modal Error State */
.modal-error {
    text-align: center;
    padding: 2rem;
}

.modal-error p {
    color: var(--danger);
    font-size: 0.9rem;
}

/* Responsive adjustments for modal */
@media (max-width: 640px) {
    .modal-content {
        max-height: 90vh;
    }

    .keyword-suggestion-item {
        flex-wrap: wrap;
    }

    .keyword-suggestion-select {
        width: 100%;
        margin-top: 0.75rem;
    }

    .keyword-suggestion-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ===========================================
   AUDIO HELP BUTTONS - Explications audio
   =========================================== */

.audio-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.audio-help-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
}

.audio-help-btn:active {
    transform: scale(0.95);
}

.audio-help-btn.playing {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    animation: audio-pulse 1.5s ease-in-out infinite;
}

@keyframes audio-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--primary-glow);
    }
    50% {
        box-shadow: 0 0 0 8px transparent;
    }
}

.audio-help-btn svg {
    width: 16px;
    height: 16px;
}

/* Section headers with audio button */
.section-header-with-audio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header-with-audio h2,
.section-header-with-audio h3 {
    margin: 0;
}

/* Card headers with audio */
.card-header-audio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.card-header-audio .card-title {
    flex: 1;
}

/* Toast notification for audio errors */
.audio-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card);
    color: var(--text);
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--warning);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.audio-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .audio-help-btn {
        width: 40px;
        height: 40px;
        /* Plus grand pour faciliter le touch */
    }

    .audio-help-btn svg {
        width: 18px;
        height: 18px;
    }

    .section-header-with-audio {
        gap: 0.5rem;
    }
}

/* Hero badge with audio button */
.hero-badge-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hero-badge-wrapper .hero-badge {
    margin: 0;
}

.hero-badge-wrapper .audio-help-btn {
    margin: 0;
    vertical-align: middle;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-badge-wrapper .audio-help-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Audio hint text */
.audio-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: -0.5rem 0 1.5rem 0;
    opacity: 0.8;
}

.audio-hint svg {
    color: var(--primary);
}

/* =============================================
   PREMIUM BACKLINKS ANALYSIS STYLES
   ============================================= */

/* Premium CTA Button in Site Power Section */
.premium-backlinks-cta {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-backlinks-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.premium-backlinks-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.premium-backlinks-btn svg {
    flex-shrink: 0;
}

.premium-backlinks-btn .price-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.premium-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Premium Backlinks Modal */
.backlinks-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.backlinks-modal-content {
    background: var(--card);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.backlinks-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.backlinks-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.backlinks-section {
    padding: 2rem;
}

.backlinks-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.backlinks-header svg {
    color: var(--primary);
    margin-bottom: 1rem;
}

.backlinks-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.backlinks-description {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.backlinks-domain-box {
    background: rgba(6, 147, 227, 0.1);
    border: 1px solid rgba(6, 147, 227, 0.3);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.backlinks-domain-box .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.backlinks-domain-box .backlinks-domain {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.backlinks-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.backlinks-features .feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.backlinks-features .feature svg {
    color: var(--success);
    flex-shrink: 0;
}

.backlinks-price-box {
    text-align: center;
    margin-bottom: 1.5rem;
}

.backlinks-price-box .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.backlinks-price-box .price-note {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.backlinks-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.backlinks-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Processing state */
#backlinks-processing {
    text-align: center;
    padding: 3rem 2rem;
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.processing-message {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Results state */
#backlinks-results h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

#backlinks-results .result-domain {
    text-align: center;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.backlinks-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.backlinks-metrics .metric-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.backlinks-metrics .metric-card.highlight {
    background: linear-gradient(135deg, rgba(6, 147, 227, 0.15) 0%, rgba(6, 147, 227, 0.05) 100%);
    border-color: rgba(6, 147, 227, 0.3);
}

.backlinks-metrics .metric-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.backlinks-metrics .metric-card.highlight .metric-value {
    color: var(--primary);
}

.backlinks-metrics .metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.backlinks-details {
    margin-bottom: 1.5rem;
}

.backlinks-details h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* DA Distribution Chart */
.da-chart {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 1rem;
}

.da-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 120px;
    gap: 4px;
}

.da-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.da-bar {
    width: 100%;
    background: linear-gradient(to top, var(--primary), rgba(6, 147, 227, 0.5));
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
}

.da-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Top Domains Table */
.top-domains-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.top-domains-table th,
.top-domains-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-domains-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.top-domains-table .domain-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-domains-table .rank-cell,
.top-domains-table .links-cell {
    text-align: center;
}

.da-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.da-badge.da-high {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.da-badge.da-medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.da-badge.da-low {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Error state */
#backlinks-error {
    text-align: center;
    padding: 3rem 2rem;
}

.error-icon {
    color: var(--danger);
    margin-bottom: 1rem;
}

#backlinks-error h2 {
    margin-bottom: 0.5rem;
}

#backlinks-error .error-message {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.backlinks-modal-close-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.backlinks-modal-close-btn:hover {
    background: var(--primary-dark);
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 1rem;
}

/* Extended Metrics */
.backlinks-metrics-extended {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.metric-card-small {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.metric-card-small .metric-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.metric-card-small .metric-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Dofollow/Nofollow Breakdown */
#dofollow-breakdown {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.breakdown-bar {
    height: 12px;
    background: rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.dofollow-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #22c55e);
    border-radius: 6px;
}

.breakdown-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.breakdown-labels .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.breakdown-labels .dot.dofollow {
    background: var(--success);
}

.breakdown-labels .dot.nofollow {
    background: rgba(239, 68, 68, 0.6);
}

.special-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.edu-badge, .gov-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.edu-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.gov-badge {
    background: rgba(168, 85, 247, 0.2);
    color: #a78bfa;
}

/* Profile Analysis */
#profile-analysis {
    margin-bottom: 1rem;
}

.profile-score-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.profile-score-box.excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.profile-score-box.good {
    background: linear-gradient(135deg, rgba(6, 147, 227, 0.15) 0%, rgba(6, 147, 227, 0.05) 100%);
    border: 1px solid rgba(6, 147, 227, 0.3);
}

.profile-score-box.average {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.profile-score-box.weak {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.score-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: 3px solid currentColor;
    flex-shrink: 0;
}

.score-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.score-max {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 1px;
}

.profile-score-box.excellent .score-value { color: var(--success); }
.profile-score-box.excellent .score-circle { border-color: var(--success); }
.profile-score-box.good .score-value { color: var(--primary); }
.profile-score-box.good .score-circle { border-color: var(--primary); }
.profile-score-box.average .score-value { color: var(--warning); }
.profile-score-box.average .score-circle { border-color: var(--warning); }
.profile-score-box.weak .score-value { color: var(--danger); }
.profile-score-box.weak .score-circle { border-color: var(--danger); }

.score-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.score-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.score-quality {
    font-size: 1.25rem;
}

.profile-strengths, .profile-weaknesses, .profile-recommendations {
    margin-bottom: 1rem;
}

.profile-strengths h4, .profile-weaknesses h4, .profile-recommendations h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-check { color: var(--success); }
.icon-warn { color: var(--warning); }
.icon-bulb { color: #fbbf24; }

.profile-strengths ul, .profile-weaknesses ul, .profile-recommendations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-strengths li, .profile-weaknesses li, .profile-recommendations li {
    font-size: 0.85rem;
    padding: 0.375rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-muted);
}

.profile-strengths li::before {
    content: "+";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.profile-weaknesses li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: var(--danger);
    font-weight: bold;
}

.profile-recommendations li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* DA Distribution enhancements */
.da-bar.low { background: linear-gradient(to top, #ef4444, rgba(239, 68, 68, 0.5)); }
.da-bar.mid { background: linear-gradient(to top, #f59e0b, rgba(245, 158, 11, 0.5)); }
.da-bar.high { background: linear-gradient(to top, #10b981, rgba(16, 185, 129, 0.5)); }

.bar-count {
    font-size: 0.65rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
}

.da-bar-wrapper {
    position: relative;
}

.da-distribution-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.da-summary-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.da-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.da-dot.low { background: #ef4444; }
.da-dot.mid { background: #f59e0b; }
.da-dot.high { background: #10b981; }

.da-summary-label {
    color: var(--text-muted);
}

.da-summary-value {
    font-weight: 600;
}

.da-explanation {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

/* Link type badges */
.link-type {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.link-type.dofollow {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.link-type.nofollow {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Top Domains Scroll Container */
.top-domains-scroll {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.top-domains-scroll::-webkit-scrollbar {
    width: 8px;
}

.top-domains-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.top-domains-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.top-domains-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Top domains table enhancements */
.top-domains-table {
    width: 100%;
}

.top-domains-table thead {
    position: sticky;
    top: 0;
    background: var(--card);
    z-index: 1;
}

.top-domains-table a {
    color: var(--primary);
    text-decoration: none;
}

.top-domains-table a:hover {
    text-decoration: underline;
}

.traffic-cell {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Anchors */
.anchors-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Export CSV Button */
.export-csv-wrapper {
    text-align: center;
    margin-top: 1rem;
}

.export-csv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-csv-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.anchors-explanation {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    border-left: 3px solid var(--warning);
}

/* Anchor Distribution Pie Chart */
.anchor-distribution {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
}

.anchor-distribution h4 {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: var(--text);
}

.anchor-pie-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.anchor-pie-chart {
    flex-shrink: 0;
}

.anchor-pie-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-label {
    color: var(--text);
    min-width: 100px;
}

.legend-value {
    color: var(--text-muted);
    font-weight: 500;
}

/* Anchor category badges */
.anchor-category {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 500;
    flex-shrink: 0;
}

.anchor-category.brand {
    background: rgba(74, 144, 217, 0.2);
    color: #4a90d9;
}

.anchor-category.keyword {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.anchor-category.generic {
    background: rgba(230, 126, 34, 0.2);
    color: #e67e22;
}

.anchor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    gap: 0.75rem;
}

.anchor-text {
    font-size: 0.9rem;
    color: var(--text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anchor-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .backlinks-modal-content {
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }

    .backlinks-section {
        padding: 1.5rem;
    }

    .backlinks-features {
        grid-template-columns: 1fr;
    }

    .backlinks-metrics {
        grid-template-columns: 1fr;
    }

    .backlinks-metrics-extended {
        flex-direction: column;
    }

    .backlinks-price-box .price {
        font-size: 2rem;
    }

    .profile-score-box {
        flex-direction: column;
        text-align: center;
    }

    .da-distribution-summary {
        flex-direction: column;
        gap: 0.5rem;
    }

    .top-domains-table {
        font-size: 0.75rem;
    }

    .top-domains-table th:nth-child(4),
    .top-domains-table td:nth-child(4),
    .top-domains-table th:nth-child(5),
    .top-domains-table td:nth-child(5) {
        display: none;
    }
}

/* ─── Credit badge ─── */
.auth-credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--accent-light, #e8f4f8);
    color: var(--accent, #0891b2);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: default;
}
.auth-credits-badge.credits-zero {
    background: #fef2f2;
    color: #dc2626;
}

/* ─── Auth overlay on form ─── */
.auth-form-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
    backdrop-filter: blur(2px);
}
.auth-overlay-content {
    text-align: center;
}
.auth-overlay-content p {
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: #334155;
}
.auth-overlay-content .btn-primary {
    background: var(--accent, #0891b2);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 8px;
}
.auth-overlay-content .btn-secondary {
    background: transparent;
    color: var(--accent, #0891b2);
    border: 1px solid var(--accent, #0891b2);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

/* ─── Credit info under analyze button ─── */
.credit-info-text {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    margin-top: 6px;
}
.credit-info-text a {
    color: var(--accent, #0891b2);
    font-weight: 600;
}

/* ─── Buy credits modal ─── */
.credits-modal-content {
    max-width: 440px;
}
.credits-subtitle {
    color: #64748b;
    margin-bottom: 8px;
}
.credits-balance {
    margin-bottom: 16px;
    font-size: 1rem;
}
.credits-packs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.credits-pack-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.credits-pack-btn:hover {
    border-color: var(--accent, #0891b2);
    box-shadow: 0 2px 8px rgba(8,145,178,0.12);
}
.credits-pack-btn .pack-credits {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent, #0891b2);
    min-width: 40px;
}
.credits-pack-btn .pack-label {
    flex: 1;
    text-align: left;
    color: #334155;
}
.credits-pack-btn .pack-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}
.credits-status {
    margin-top: 12px;
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
}
