/* 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-area {
    background-color: #141414;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    min-height: 200px;
    transition: border-color 150ms ease;
}

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

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

.text-area-compare {
    min-height: 120px;
}

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

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    padding: 16px 12px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    transition: border-color 150ms ease;
}

.stat-card:hover {
    border-color: #374151;
}

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

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

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

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

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

.keyword-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #141414;
    border-radius: 8px;
    overflow: hidden;
}

.keyword-table thead th {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
    background-color: #0f0f0f;
}

.keyword-table tbody td {
    font-size: 14px;
    color: #e5e7eb;
    padding: 10px 16px;
    border-bottom: 1px solid #1e1e1e;
    font-variant-numeric: tabular-nums;
}

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

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

.keyword-table tbody td:nth-child(2),
.keyword-table tbody td:nth-child(3) {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    text-align: right;
}

.keyword-table thead th:nth-child(2),
.keyword-table thead th:nth-child(3) {
    text-align: right;
}

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

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

.pro-section-header {
    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;
}

.ngram-tabs {
    display: flex;
    gap: 4px;
    background-color: #0f0f0f;
    border-radius: 8px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

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

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

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

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

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

.history-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background-color: #0f0f0f;
    border: 1px solid #1e1e1e;
    border-radius: 6px;
    transition: border-color 150ms ease;
}

.history-entry:hover {
    border-color: #374151;
}

.history-entry-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.history-entry-timestamp {
    font-size: 12px;
    color: #6b7280;
}

.history-entry-stats {
    font-size: 13px;
    color: #e5e7eb;
}

.history-entry-delete {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.history-entry-delete:hover {
    color: #ef4444;
}

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

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

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.settings-message {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
}

.settings-message.success {
    background-color: #064e3b;
    border: 1px solid #059669;
    color: #6ee7b7;
}

.settings-message.error {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
}

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

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

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

.comparison-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #0f0f0f;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table thead th {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

.comparison-table tbody td {
    font-size: 14px;
    color: #e5e7eb;
    padding: 10px 16px;
    border-bottom: 1px solid #1e1e1e;
    font-variant-numeric: tabular-nums;
}

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

.comparison-table tbody tr:hover {
    background-color: #141414;
}

.diff-positive {
    color: #10b981;
}

.diff-negative {
    color: #ef4444;
}

.diff-zero {
    color: #6b7280;
}

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

.button-danger {
    border-color: #7f1d1d;
    color: #fca5a5;
}

.button-danger:hover {
    background-color: #7f1d1d;
}

.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: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 300;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: opacity 300ms ease, transform 300ms ease;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

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

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

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

    .pro-section {
        padding: 16px;
    }

    .ngram-tabs {
        flex-direction: column;
    }

    .tab-btn {
        text-align: center;
    }

    .history-actions,
    .export-actions {
        flex-direction: column;
    }

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

        padding: 0 16px;
    }

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

    .keyword-table thead th,
    .keyword-table tbody td,
    .comparison-table thead th,
    .comparison-table tbody td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 12px 10px;
    }

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