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

.text-input-area {
    background-color: #111111;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.7;
    outline: none;
    min-height: 200px;
    resize: vertical;
    transition: border-color 150ms ease;
}

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

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

.input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.char-counter {
    font-size: 13px;
    color: #6b7280;
    transition: color 150ms ease;
}

.char-counter.char-warning {
    color: #f59e0b;
}

.char-counter.char-limit {
    color: #ef4444;
}

.button-clear {
    background: none;
    border: 1px solid #374151;
    color: #9ca3af;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.button-clear:hover {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border-color: #4b5563;
}

.html-warning {
    background-color: #78350f;
    border: 1px solid #92400e;
    color: #fde68a;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

.html-warning a {
    color: #fbbf24;
    text-decoration: underline;
}

.html-warning a:hover {
    color: #fde68a;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 14px;
}

.slider-label-left,
.slider-label-right {
    font-size: 13px;
    color: #6b7280;
    flex-shrink: 0;
    min-width: 52px;
}

.slider-label-left {
    text-align: right;
}

.slider-label-right {
    text-align: left;
}

input[type="range"].slider {
    width: 100%;
    height: 4px;
    background-color: #374151;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: block;
}

input[type="range"].slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background-color: #646cff;
    border-radius: 50%;
    cursor: pointer;
    transition: box-shadow 150ms ease;
}

input[type="range"].slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: #646cff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"].slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(100, 108, 255, 0.3);
}

.slider-value {
    font-size: 13px;
    color: #9ca3af;
    text-align: center;
}

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

.processing-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    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;
}

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

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

.summary-output {
    background-color: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 20px;
    line-height: 1.7;
    font-size: 15px;
    color: #e5e7eb;
    min-height: 60px;
}

.summary-output ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-output ul li {
    padding-left: 20px;
    position: relative;
    line-height: 1.7;
}

.summary-output ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: #646cff;
    border-radius: 50%;
}

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

.stats-bar .stat-item {
    font-size: 13px;
    color: #888888;
    background: none;
    padding: 0;
}

.stat-divider {
    font-size: 13px;
    color: #4b5563;
}

.output-actions {
    display: flex;
    gap: 12px;
}

.highlighted-source-section {
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.collapsible-toggle {
    width: 100%;
    background-color: #141414;
    border: none;
    color: #d1d5db;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 150ms ease;
}

.collapsible-toggle:hover {
    background-color: #1a1a1a;
}

.chevron {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #6b7280;
    border-bottom: 2px solid #6b7280;
    transform: rotate(45deg);
    transition: transform 200ms ease;
}

.chevron.expanded {
    transform: rotate(-135deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
}

.collapsible-content.open {
    max-height: 600px;
    overflow-y: auto;
}

.highlighted-text {
    padding: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #d1d5db;
    background-color: #0f0f0f;
    border-top: 1px solid #2a2a2a;
}

.highlighted-text mark {
    background: rgba(100, 108, 255, 0.2);
    color: #ffffff;
    padding: 2px 0;
    border-radius: 2px;
}

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

.pro-feature-block {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0.6;
    transition: opacity 150ms ease;
}

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

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

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

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

.radio-group {
    display: flex;
    gap: 24px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e5e7eb;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    background-color: #141414;
    border: 2px solid #374151;
    border-radius: 50%;
    position: relative;
    transition: all 150ms ease;
    flex-shrink: 0;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #646cff;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background-color: #646cff;
    border-radius: 50%;
}

.radio-label input[type="radio"]:disabled + .radio-custom {
    opacity: 0.5;
    cursor: not-allowed;
}

.radio-label input[type="radio"]:disabled ~ * {
    cursor: not-allowed;
}

.keyword-table-container {
    overflow-x: auto;
}

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

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

.keyword-table th:last-child {
    text-align: right;
}

.keyword-table td {
    font-size: 14px;
    color: #e5e7eb;
    padding: 10px 14px;
    border-bottom: 1px solid #1f1f1f;
}

.keyword-table td:last-child {
    text-align: right;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
    font-size: 13px;
    color: #9ca3af;
}

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

.pro-placeholder {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

.batch-description {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
}

.batch-description code {
    background-color: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #e5e7eb;
}

.batch-textarea {
    background-color: #111111;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 14px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    min-height: 120px;
    transition: border-color 150ms ease;
}

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

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

.batch-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.batch-actions {
    display: flex;
    gap: 12px;
}

.batch-upload-zone {
    flex: 1;
}

.batch-upload-zone .button-secondary {
    width: 100%;
}

.batch-actions .button-primary {
    flex: 1;
}

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

.batch-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
}

.batch-file-name {
    font-size: 13px;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}

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

.batch-file-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    margin-left: 8px;
    transition: color 150ms ease;
}

.batch-file-remove:hover {
    color: #ef4444;
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #374151;
    padding-top: 20px;
}

.batch-results-header h4 {
    font-size: 15px;
    font-weight: 500;
    color: #d1d5db;
}

.batch-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.batch-result-item {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.batch-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    transition: background-color 150ms ease;
}

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

.batch-result-name {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
}

.batch-result-stats {
    font-size: 12px;
    color: #9ca3af;
}

.batch-result-body {
    padding: 0 14px 14px;
    font-size: 13px;
    line-height: 1.7;
    color: #d1d5db;
    border-top: 1px solid #2a2a2a;
}

.batch-result-body.collapsed {
    display: none;
}

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

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    transition: opacity 200ms ease;
}

.toast.toast-hidden {
    opacity: 0;
    pointer-events: none;
}

.toast.toast-visible {
    opacity: 1;
}

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

    .summary-output {
        padding: 16px;
    }

    .output-actions {
        flex-direction: column;
    }

    .output-actions .button-secondary {
        width: 100%;
    }

    .batch-actions {
        flex-direction: column;
    }

    .pro-feature-block {
        padding: 16px;
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }

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

        padding: 0 16px;
    }

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

@media (max-width: 480px) {
    .stats-bar {
        flex-direction: column;
        gap: 4px;
    }

    .stat-divider {
        display: none;
    }

    .slider-container {
        gap: 10px;
    }
}