/* 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 {
    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: 120px;
    line-height: 1.5;
    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;
}

.template-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.template-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.template-btn:hover {
    background-color: #374151;
}

.template-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.pro-templates-row {
    margin-top: 4px;
}

.pro-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pro-badge-inline {
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.pro-templates-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    margin-top: 8px;
}

.pro-templates-category {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pro-templates-category-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pro-templates-category .template-btn {
    font-size: 12px;
    padding: 6px 12px;
}

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

.char-count-text {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    flex-shrink: 0;
}

.char-status {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
    text-align: right;
}

.char-status.status-empty {
    color: #9ca3af;
}

.char-status.status-short {
    color: #ef4444;
}

.char-status.status-acceptable {
    color: #eab308;
}

.char-status.status-optimal {
    color: #22c55e;
}

.char-status.status-long {
    color: #eab308;
}

.char-status.status-too-long {
    color: #ef4444;
}

.char-count-text.status-short {
    color: #ef4444;
}

.char-count-text.status-acceptable {
    color: #eab308;
}

.char-count-text.status-optimal {
    color: #22c55e;
}

.char-count-text.status-long {
    color: #eab308;
}

.char-count-text.status-too-long {
    color: #ef4444;
}

.char-bar-container {
    width: 100%;
    height: 4px;
    background-color: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
}

.char-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background-color: #9ca3af;
    transition: width 150ms ease, background-color 150ms ease;
}

.char-bar.bar-short {
    background-color: #ef4444;
}

.char-bar.bar-acceptable {
    background-color: #eab308;
}

.char-bar.bar-optimal {
    background-color: #22c55e;
}

.char-bar.bar-long {
    background-color: #eab308;
}

.char-bar.bar-too-long {
    background-color: #ef4444;
}

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

.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 {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

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

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

.serp-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.serp-title {
    font-size: 20px;
    font-weight: 400;
    color: #8ab4f8;
    line-height: 1.3;
    margin-bottom: 4px;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.serp-url {
    font-size: 14px;
    color: #bdc1c6;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.serp-description {
    font-size: 14px;
    color: #9aa0a6;
    line-height: 1.58;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.serp-description em {
    font-style: italic;
    color: #6b7280;
}

.serp-description strong {
    font-weight: 700;
    color: #bdc1c6;
}

.code-output {
    background-color: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
}

.code-output code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    color: #a5b4fc;
    line-height: 1.6;
    word-break: break-all;
}

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

.pro-feature-block {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    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;
    gap: 12px;
}

.pro-feature-title {
    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;
}

.pro-feature-hint {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.ab-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ab-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

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

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

.bulk-result-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
}

.bulk-result-title {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bulk-result-textarea {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 60px;
    line-height: 1.4;
    transition: border-color 150ms ease;
}

.bulk-result-textarea:focus {
    border-color: #3b82f6;
}

.bulk-result-char {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-align: right;
}

.bulk-result-char.status-optimal {
    color: #22c55e;
}

.bulk-result-char.status-acceptable {
    color: #eab308;
}

.bulk-result-char.status-short,
.bulk-result-char.status-too-long {
    color: #ef4444;
}

.bulk-result-char.status-long {
    color: #eab308;
}

.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;
    transition: color 150ms ease;
}

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

.copy-feedback {
    font-size: 13px;
    font-weight: 500;
    color: #22c55e;
    opacity: 0;
    transition: opacity 150ms ease;
}

.copy-feedback.visible {
    opacity: 1;
}

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

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

    .template-selector {
        gap: 6px;
    }

    .template-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .serp-preview {
        padding: 16px;
    }

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

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

        padding: 0 16px;
    }

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

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

    .char-count-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .char-status {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .template-selector {
        flex-direction: column;
    }

    .template-btn {
        width: 100%;
        text-align: center;
    }
}