/* 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-group-grow {
    flex: 1;
    min-width: 0;
}

.input-group-shrink {
    flex: 0 0 120px;
}

.input-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.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: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 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: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 100px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

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

.select-input {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

.select-input option {
    background-color: #1a1a1a;
}

.input-meters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

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

.meter-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #9ca3af;
}

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

.progress-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.progress-bar-fill.neutral {
    background: #374151;
}

.progress-bar-fill.good {
    background: #4ade80;
}

.progress-bar-fill.warning {
}

.progress-bar-fill.danger {
    background: #ef4444;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.neutral {
    background: rgba(55, 65, 81, 0.4);
    color: #6b7280;
}

.status-badge.good {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.status-badge.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

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

.button-row {
    display: flex;
    gap: 12px;
}

.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: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.output-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

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

.output-title {
    font-size: 18px;
    font-weight: 600;
    color: #d1d5db;
}

.output-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.serp-preview {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.serp-preview + .serp-preview {
    margin-top: 16px;
}

.serp-preview-label {
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
}

.serp-title {
    color: #8ab4f8;
    font-size: 20px;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.serp-title:hover {
    text-decoration: underline;
}

.serp-url {
    color: #bdc1c6;
    font-size: 14px;
    margin: 4px 0;
}

.serp-url .breadcrumb {
    color: #bdc1c6;
}

.serp-description {
    color: #9aa0a6;
    font-size: 14px;
    line-height: 1.5;
}

.serp-preview.mobile {
    max-width: 400px;
}

.serp-preview.mobile .serp-title {
    font-size: 18px;
}

.analysis-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.analysis-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #1e1e1e;
}

.analysis-row:last-child {
    border-bottom: none;
}

.analysis-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    width: 140px;
    flex-shrink: 0;
}

.analysis-value {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
}

.tips-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tip-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: #9ca3af;
    transition: color 150ms ease;
}

.tip-item.highlighted {
    color: #fbbf24;
}

.tip-bullet {
    width: 6px;
    height: 6px;
    background: #374151;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 7px;
    transition: background-color 150ms ease;
}

.tip-item.highlighted .tip-bullet {
}

.pro-section {
    position: relative;
    overflow: hidden;
}

.pro-section-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pro-section.locked .pro-section-content {
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}

.pro-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.75);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    z-index: 10;
    border-radius: 8px;
}

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

.lock-icon {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 2px;
}

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

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

.data-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #2a2a2a;
    white-space: nowrap;
}

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

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:nth-child(even) {
    background: #141414;
}

.data-table tbody tr:nth-child(odd) {
    background: #1a1a1a;
}

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

.data-table tbody tr.best-row {
    background: rgba(74, 222, 128, 0.05);
}

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

.keyword-results {
    margin-top: 8px;
}

.competitor-results {
    margin-top: 8px;
}

.bulk-status {
    font-size: 14px;
    color: #9ca3af;
    padding: 8px 0;
}

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

.bulk-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #9ca3af;
}

.bulk-results-header .button-secondary {
    padding: 8px 16px;
    font-size: 13px;
}

.bulk-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
}

.bulk-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.bulk-table-wrapper::-webkit-scrollbar-track {
    background: #141414;
}

.bulk-table-wrapper::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

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

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

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

.upload-primary {
    font-size: 15px;
    font-weight: 400;
    color: #e5e7eb;
}

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

.template-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.template-pattern {
    font-size: 14px;
    color: #6b7280;
    padding: 12px 16px;
    background: #0a0a0a;
    border-radius: 6px;
    font-family: 'Inter', monospace;
}

.template-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.template-field label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
}

.template-field input {
    background: transparent;
    border: none;
    border-bottom: 1px solid #374151;
    color: #e5e7eb;
    padding: 8px 0;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease;
}

.template-field input:focus {
    border-bottom-color: #3b82f6;
}

.template-field input::placeholder {
    color: #4b5563;
}

.template-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1a1a1a;
    border-radius: 6px;
}

.template-preview-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    flex-shrink: 0;
}

.template-preview-text {
    font-size: 14px;
    color: #8ab4f8;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.modal-hidden {
    display: none;
}

.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-group {
        padding: 16px;
    }

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

    .input-group-shrink {
        flex: 1;
    }

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

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

    .serp-preview {
        padding: 16px;
    }

    .serp-preview.mobile {
        max-width: 100%;
    }

    .analysis-label {
        width: 110px;
    }

        padding: 0 16px;
    }

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

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

    .data-table thead th,
    .data-table tbody td {
        padding: 8px;
    }

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

@media (max-width: 480px) {
    .analysis-row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .analysis-label {
        width: 100%;
    }

    .serp-title {
        font-size: 18px;
    }

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