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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #374151;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease;
}

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

.tab-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

textarea#sitemap-input {
    background-color: #0a0a0a;
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    min-height: 200px;
    width: 100%;
    resize: vertical;
    outline: none;
    transition: border-color 150ms ease;
}

textarea#sitemap-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

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

.file-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #374151;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    position: relative;
    outline: none;
}

.upload-icon {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.7;
    color: #6b7280;
    letter-spacing: 2px;
}

.upload-primary {
    font-size: 16px;
    font-weight: 400;
    color: #e5e7eb;
    margin-bottom: 4px;
}

.upload-secondary {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 6px;
    margin-top: 12px;
}

.file-info #file-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-info #file-size {
    font-size: 13px;
    color: #9ca3af;
    flex-shrink: 0;
}

.button-primary {
    background-color: #3b82f6;
    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: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

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

.button-text {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 150ms ease;
}

.button-text:hover {
    color: #60a5fa;
}

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

.validation-summary {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.validation-summary.summary-valid {
    background-color: #0a1a0a;
    border: 1px solid #10b981;
    color: #10b981;
}

.validation-summary.summary-invalid {
    background-color: #1a0a0a;
    border: 1px solid #ef4444;
    color: #ef4444;
}

.validation-summary.summary-warning {
    background-color: #1a1a0a;
    border: 1px solid #f59e0b;
    color: #f59e0b;
}

.validation-summary #summary-details {
    font-weight: 400;
    font-size: 14px;
    opacity: 0.85;
}

.output-tab {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.error-item {
    background-color: #1a0a0a;
    border-left: 3px solid #ef4444;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 0 6px 6px 0;
}

.error-line {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    color: #f78c6c;
    font-size: 12px;
    margin-bottom: 4px;
}

.error-path {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    color: #82aaff;
    font-size: 12px;
    margin-bottom: 4px;
}

.error-message {
    color: #ff5370;
    font-size: 14px;
    line-height: 1.5;
}

.warning-item {
    background-color: #1a1a0a;
    border-left: 3px solid #f59e0b;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 0 6px 6px 0;
}

.warning-line {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    color: #f78c6c;
    font-size: 12px;
    margin-bottom: 4px;
}

.warning-path {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    color: #82aaff;
    font-size: 12px;
    margin-bottom: 4px;
}

.warning-message {
    color: #f59e0b;
    font-size: 14px;
    line-height: 1.5;
}

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: #6b7280;
    font-size: 14px;
}

.pro-action-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.url-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.url-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #141414;
    font-size: 13px;
}

.url-table th {
    background-color: #1a1a1a;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #374151;
    white-space: nowrap;
}

.url-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #1a1a1a;
    color: #e5e7eb;
    vertical-align: top;
}

.url-table tbody tr:hover {
    background-color: #1a1a1a;
}

.url-cell {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
    max-width: 400px;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
}

.status-2xx {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-3xx {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-4xx {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-5xx {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-unknown {
    background-color: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.duplicate-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 0;
    font-size: 14px;
    color: #9ca3af;
}

.duplicates-summary {
    margin-top: 16px;
    padding: 16px;
    background-color: #1a1a0a;
    border: 1px solid #f59e0b;
    border-radius: 6px;
}

.duplicates-summary h4 {
    font-size: 14px;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 12px;
}

.duplicate-group {
    padding: 8px 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.duplicate-group:last-child {
    border-bottom: none;
}

.duplicate-url {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 12px;
    color: #e5e7eb;
    word-break: break-all;
}

.duplicate-variant {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 12px;
    color: #9ca3af;
    padding-left: 16px;
}

.source-view {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.source-view pre {
    margin: 0;
    padding: 16px 0;
}

.source-view code {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.source-line {
    display: block;
    padding: 0 16px 0 0;
    white-space: pre;
}

.source-line-error {
    background-color: rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
}

.line-number {
    display: inline-block;
    width: 3.5rem;
    text-align: right;
    color: #545454;
    margin-right: 16px;
    user-select: none;
    -webkit-user-select: none;
    padding-left: 8px;
}

.xml-tag {
    color: #f07178;
}

.xml-attr-name {
    color: #ffcb6b;
}

.xml-attr-value {
    color: #c3e88d;
}

.xml-comment {
    color: #546e7a;
}

.xml-text {
    color: #ffffff;
}

.xml-declaration {
    color: #c792ea;
}

.xml-bracket {
    color: #89ddff;
}

.xml-namespace {
    color: #82aaff;
}

.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-bar .stat-item {
    flex: 1 1 calc(25% - 9px);
    min-width: 100px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

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

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #e5e7eb;
}

.stat-value.stat-error {
    color: #ef4444;
}

.stat-value.stat-warning {
    color: #f59e0b;
}

.stat-value.stat-success {
    color: #10b981;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

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

.pro-badge {
    color: #0a0a0a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
}

.pro-column {
    white-space: nowrap;
}

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

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

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

.modal-feature-name {
    font-size: 15px;
    color: #9ca3af;
    margin-bottom: 20px;
}

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

.hidden {
    display: none;
}

.processing .spinner-inline {
    display: inline-block;
}

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

.spinner-inline {
    width: 16px;
    height: 16px;
    border: 2px solid #374151;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
    vertical-align: middle;
    margin-right: 8px;
}

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

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

#bug-report-modal .bug-report-content {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 24px;
    max-width: 480px;
    width: 100%;
}

#bug-report-modal h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

#bug-report-modal textarea {
    width: 100%;
    min-height: 120px;
    background-color: #0a0a0a;
    color: #e5e7eb;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
}

#bug-report-modal textarea:focus {
    border-color: #3b82f6;
}

#bug-report-modal .bug-report-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

#bug-report-modal #bug-cancel {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #374151;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

#bug-report-modal #bug-submit {
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

@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-bar {
        gap: 8px;
    }

    .stats-bar .stat-item {
        flex: 1 1 calc(50% - 4px);
    }

    .stat-item {
        padding: 10px;
    }

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

    .url-table th,
    .url-table td {
        padding: 8px 10px;
    }

    .file-upload-zone {
        padding: 32px 16px;
    }

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

    .pro-action-bar {
        flex-direction: column;
    }

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

        padding: 0 16px;
    }

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

    .validation-summary {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .stats-bar .stat-item {
        flex: 1 1 calc(50% - 4px);
    }

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

    .url-table {
        font-size: 12px;
    }
}