/* 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;
}

.setting-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

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

.url-input-row {
    display: flex;
    gap: 8px;
}

.url-input-row .text-input {
    flex: 1;
}

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

.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: 8px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, monospace;
    outline: none;
    resize: vertical;
    min-height: 250px;
    line-height: 1.6;
    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:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.button-row {
    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-icon {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.button-icon:hover {
    background-color: #374151;
}

.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 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px;
}

.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;
}

.status-badge-container {
    display: flex;
    justify-content: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pass {
    background-color: #22c55e;
    color: #0a0a0a;
}

.status-badge.fail {
    background-color: #ef4444;
    color: #ffffff;
}

.heading-counts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.count-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    transition: opacity 150ms ease;
}

.count-cell.dimmed {
    opacity: 0.3;
}

.count-label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.count-value {
    font-size: 20px;
    font-weight: 700;
    color: #e5e7eb;
}

.tree-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

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

.tree-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-x: auto;
}

.tree-node {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 150ms ease;
    min-width: fit-content;
}

.tree-node:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.tree-node.has-issue {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
}

.tree-node .level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.level-badge.level-1 {
    background-color: rgba(100, 108, 255, 0.2);
    color: #646cff;
}

.level-badge.level-2 {
    background-color: rgba(129, 140, 248, 0.2);
    color: #818cf8;
}

.level-badge.level-3 {
    background-color: rgba(165, 180, 252, 0.2);
    color: #a5b4fc;
}

.level-badge.level-4 {
    background-color: rgba(199, 210, 254, 0.2);
    color: #c7d2fe;
}

.level-badge.level-5 {
    background-color: rgba(107, 114, 128, 0.2);
    color: #6b7280;
}

.level-badge.level-6 {
    background-color: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.tree-node .heading-text {
    font-size: 14px;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-node .issue-indicator {
    font-size: 12px;
    font-weight: 500;
    color: #ef4444;
    white-space: nowrap;
    flex-shrink: 0;
}

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

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

.issue-item {
    border-left: 3px solid #f59e0b;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background-color 150ms ease;
}

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

.issue-item .issue-type {
    font-size: 13px;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 2px;
}

.issue-item .issue-message {
    font-size: 13px;
    color: #9ca3af;
}

.pro-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #374151;
    opacity: 0.6;
}

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

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

.keyword-input-row {
    display: flex;
    gap: 8px;
}

.keyword-input-row .text-input {
    flex: 1;
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #2a2a2a;
    border: 1px solid #646cff;
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 13px;
    color: #e5e7eb;
}

.keyword-tag .remove-tag {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    transition: color 150ms ease;
}

.keyword-tag .remove-tag:hover {
    color: #ef4444;
}

.keyword-results {
    overflow-x: auto;
}

.keyword-results table {
    width: 100%;
    border-collapse: collapse;
}

.keyword-results th,
.keyword-results td {
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid #2a2a2a;
}

.keyword-results th {
    color: #9ca3af;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keyword-results td {
    color: #e5e7eb;
}

.keyword-found {
    color: #22c55e;
}

.keyword-missing {
    color: #ef4444;
}

.competitor-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comparison-diff {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.diff-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
    font-size: 13px;
}

.diff-item .diff-label {
    color: #9ca3af;
}

.diff-item .diff-value {
    font-weight: 500;
    color: #e5e7eb;
}

.diff-item .diff-value.positive {
    color: #22c55e;
}

.diff-item .diff-value.negative {
    color: #ef4444;
}

.competitor-tree {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
}

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

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: #374151;
    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: 13px;
    color: #9ca3af;
    flex-shrink: 0;
}

.bulk-results {
    overflow-x: auto;
}

.bulk-table {
    width: 100%;
    border-collapse: collapse;
}

.bulk-table th,
.bulk-table td {
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid #2a2a2a;
}

.bulk-table th {
    color: #9ca3af;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #1a1a1a;
}

.bulk-table tbody tr {
    cursor: pointer;
    transition: background-color 150ms ease;
}

.bulk-table tbody tr:nth-child(odd) {
    background-color: #141414;
}

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

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

.bulk-table td {
    color: #e5e7eb;
}

.bulk-table .url-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bulk-status-pass {
    color: #22c55e;
    font-weight: 500;
}

.bulk-status-fail {
    color: #ef4444;
    font-weight: 500;
}

.bulk-expanded-row {
    background-color: #0a0a0a;
}

.bulk-expanded-row td {
    padding: 16px;
}

.bulk-expanded-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pro-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    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;
}

@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;
    }

    .heading-counts {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .tree-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .button-row {
        flex-direction: column;
    }

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

    .url-input-row {
        flex-direction: column;
    }

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

        padding: 0 16px;
    }

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

@media (max-width: 480px) {
    .heading-counts {
        grid-template-columns: repeat(3, 1fr);
    }

    .textarea-input {
        min-height: 200px;
    }
}