/* Tool-specific styles only - base styles are in tool-layout.css */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #141414;
    border-bottom: 1px solid #374151;
    z-index: 100;
}

    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

    margin-top: 60px;
    padding: 48px 24px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    max-width: 720px;
    margin: 0 auto;
}

.tool-main {
    flex: 1;
    padding: 32px 24px 120px;
}

.tool-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.input-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-label-row label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.input-hint {
    font-size: 12px;
    color: #6b7280;
}

.text-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.text-input:focus {
    border-color: #646cff;
    box-shadow: 0 0 0 2px rgba(100, 108, 255, 0.15);
}

.text-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-input::placeholder {
    color: #6b7280;
}

.textarea-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', monospace;
    outline: none;
    resize: vertical;
    min-height: 300px;
    line-height: 1.5;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.textarea-input:focus {
    border-color: #646cff;
    box-shadow: 0 0 0 2px rgba(100, 108, 255, 0.15);
}

.textarea-input::placeholder {
    color: #6b7280;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button .text-input {
    flex: 1;
}

.input-with-button .button-secondary {
    flex-shrink: 0;
}

.sitemap-status {
    font-size: 13px;
    color: #9ca3af;
    padding: 8px 12px;
    background-color: #141414;
    border-radius: 6px;
}

.sitemap-status.success {
    color: #4ade80;
    background-color: rgba(74, 222, 128, 0.08);
}

.sitemap-status.error {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.08);
}

.bulk-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #646cff;
    border-radius: 2px;
    width: 0%;
    transition: width 200ms ease;
}

.progress-text {
    font-size: 12px;
    color: #9ca3af;
    flex-shrink: 0;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.button-primary {
    background-color: #646cff;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.pro-feature {
    position: relative;
    opacity: 0.6;
}

.pro-feature.unlocked {
    opacity: 1;
}

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.output-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(20, 20, 20, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-radius: 8px;
    z-index: 10;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #374151;
    border-top-color: #646cff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 14px;
    color: #9ca3af;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #2a2a2a;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 150ms ease, border-color 150ms ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #e5e7eb;
}

.tab-btn.active {
    color: #646cff;
    border-bottom-color: #646cff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tab-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tab-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #2a2a2a;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.results-table thead {
    background-color: #1a1a1a;
}

.results-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #2a2a2a;
    white-space: nowrap;
    user-select: none;
}

.results-table th.sortable {
    cursor: pointer;
    transition: color 150ms ease;
}

.results-table th.sortable:hover {
    color: #e5e7eb;
}

.results-table th.sorted-asc .sort-arrow::after {
    content: ' \25B2';
    font-size: 10px;
}

.results-table th.sorted-desc .sort-arrow::after {
    content: ' \25BC';
    font-size: 10px;
}

.results-table td {
    padding: 10px 12px;
    color: #e5e7eb;
    border-bottom: 1px solid #1a1a1a;
    word-break: break-word;
    max-width: 200px;
}

.results-table tbody tr {
    background-color: #141414;
    transition: background-color 150ms ease;
}

.results-table tbody tr:nth-child(even) {
    background-color: #1a1a1a;
}

.results-table tbody tr:hover {
    background-color: #1e1e2e;
}

.badge-nofollow {
    display: inline-block;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.badge-generic {
    display: inline-block;
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid #f59e0b;
    font-size: 11px;
    font-weight: 500;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.accordion {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.accordion-panel {
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #1a1a1a;
    cursor: pointer;
    transition: background-color 150ms ease;
    user-select: none;
}

.accordion-header:hover {
    background-color: #222222;
}

.accordion-title {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    word-break: break-all;
}

.accordion-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.accordion-count {
    font-size: 13px;
    color: #9ca3af;
}

.accordion-chevron {
    font-size: 12px;
    color: #6b7280;
    transition: transform 200ms ease;
}

.accordion-panel.expanded .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    padding: 0;
    background-color: #141414;
}

.accordion-panel.expanded .accordion-body {
    display: block;
}

.accordion-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-top: 1px solid #1a1a1a;
    font-size: 13px;
}

.accordion-link-item:hover {
    background-color: #1e1e2e;
}

.accordion-link-url {
    color: #646cff;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.accordion-link-anchor {
    color: #9ca3af;
    flex-shrink: 0;
    margin-left: 12px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.issues-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.issue-group {
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.issue-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background-color: #1a1a1a;
    cursor: pointer;
    transition: background-color 150ms ease;
    user-select: none;
}

.issue-group-header:hover {
    background-color: #222222;
}

.issue-icon {
    font-size: 14px;
    font-weight: 700;
    color: #ef4444;
    flex-shrink: 0;
}

.issue-icon.warning {
    color: #f59e0b;
}

.issue-group-title {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #646cff;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    flex-shrink: 0;
}

.issue-group-body {
    display: none;
    padding: 0;
    background-color: #141414;
}

.issue-group.expanded .issue-group-body {
    display: block;
}

.issue-detail {
    padding: 8px 16px;
    border-top: 1px solid #1a1a1a;
    font-size: 13px;
    color: #e5e7eb;
}

.issue-detail:hover {
    background-color: #1e1e2e;
}

.issue-over-linked {
    background-color: rgba(239, 68, 68, 0.05);
    border-left: 3px solid #ef4444;
}

.issue-generic-anchor {
    background-color: rgba(245, 158, 11, 0.05);
    border-left: 3px solid #f59e0b;
}

.empty-state {
    padding: 32px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    background-color: #141414;
    border: 1px dashed #2a2a2a;
    border-radius: 6px;
}

.pro-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #2a2a2a;
}

.pro-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pro-section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.graph-container {
    position: relative;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    height: 500px;
    overflow: hidden;
}

.graph-canvas {
    width: 100%;
    height: 100%;
}

.graph-canvas svg {
    width: 100%;
    height: 100%;
}

.graph-controls {
    display: flex;
    gap: 8px;
}

.graph-tooltip {
    position: absolute;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #e5e7eb;
    pointer-events: none;
    z-index: 20;
    max-width: 250px;
    word-break: break-all;
}

.graph-tooltip-url {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.graph-tooltip-stat {
    color: #9ca3af;
}

.pro-lock-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(10, 10, 10, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 5;
    border-radius: 8px;
    text-align: center;
    padding: 24px;
}

.pro-lock-overlay.section-hidden {
    display: none;
}

.lock-icon {
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 2px;
    padding: 8px 16px;
    border: 1px solid #374151;
    border-radius: 6px;
}

.pro-lock-overlay p {
    font-size: 14px;
    color: #9ca3af;
    max-width: 280px;
}

.orphan-container {
    position: relative;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    min-height: 200px;
    overflow: hidden;
}

.orphan-results {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.orphan-group h4 {
    font-size: 15px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.orphan-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.orphan-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.orphan-item {
    padding: 8px 12px;
    background-color: #1a1a1a;
    border-radius: 4px;
    font-size: 13px;
    color: #e5e7eb;
    word-break: break-all;
}

.orphan-item:hover {
    background-color: #222222;
}

.diversity-container {
    position: relative;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    min-height: 200px;
    overflow: hidden;
}

.diversity-results {
    padding: 16px;
}

.status-low {
    color: #ef4444;
    font-weight: 600;
}

.status-ok {
    color: #4ade80;
    font-weight: 600;
}

.status-review {
    color: #fbbf24;
    font-weight: 600;
}

.diversity-expanded {
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-top: 1px solid #2a2a2a;
}

.diversity-anchor-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.diversity-anchor-item {
    font-size: 12px;
    color: #9ca3af;
    padding: 4px 0;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: #d1d5db;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.modal-hidden {
    display: none;
}

.modal-overlay.modal-visible {
    display: flex;
}

.modal {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 0;
    max-width: 480px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #e5e7eb;
}

.modal-content {
    padding: 24px;
}

.pro-features-list {
    margin-bottom: 24px;
}

.pro-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.feature-check {
    width: 20px;
    height: 20px;
    background-color: #059669;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
}

.footer {
    background-color: #0a0a0a;
    border-top: 1px solid #374151;
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.success-message {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.modal-hidden {
    display: none;
}

@media (max-width: 768px) {
        padding: 32px 16px;
    }

        font-size: 28px;
        line-height: 36px;
    }

        font-size: 14px;
    }

    .tool-main {
        padding: 24px 16px 100px;
    }

    .tool-container {
        gap: 32px;
    }

    .output-section {
        padding: 16px;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 13px;
    }

    .results-table th,
    .results-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .results-table td {
        max-width: 140px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .button-primary,
    .action-buttons .button-secondary {
        width: 100%;
    }

    .input-with-button {
        flex-direction: column;
    }

    .pro-cta-content {
        flex-direction: column;
        gap: 10px;
    }

        padding: 0 16px;
    }

    .graph-container {
        height: 350px;
    }

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

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

    .stat-value {
        font-size: 18px;
    }

    .accordion-header {
        padding: 10px 12px;
    }

    .accordion-title {
        font-size: 13px;
    }

    .graph-container {
        height: 280px;
    }
}