/* 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: #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: 180px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

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

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

.char-count {
    font-size: 13px;
    color: #6b7280;
}

.char-count.at-limit {
    color: #ef4444;
}

.char-limit-notice {
    font-size: 13px;
    color: #fbbf24;
}

.action-buttons {
    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;
}

.modal-hidden {
    display: none;
}

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

.analysis-card {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title-row .card-title {
    margin-bottom: 0;
}

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

.pro-feature {
    position: relative;
}

.pro-feature.unlocked .pro-locked {
    display: none;
}

.pro-feature.unlocked .pro-content {
    display: block !important;
}

.pro-locked {
    text-align: center;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lock-icon {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 2px;
    opacity: 0.6;
}

.pro-locked p {
    font-size: 14px;
    color: #9ca3af;
    max-width: 400px;
    line-height: 1.5;
}

.pro-content {
    display: none;
}

.sentiment-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sentiment-label {
    font-size: 20px;
    font-weight: 600;
    color: #e5e7eb;
}

.sentiment-label.positive {
    color: #4ade80;
}

.sentiment-label.negative {
    color: #ef4444;
}

.sentiment-label.neutral {
    color: #fbbf24;
}

.sentiment-score {
    font-size: 16px;
    font-weight: 500;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

.sentiment-bar-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sentiment-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    position: relative;
}

.sentiment-marker {
    width: 16px;
    height: 16px;
    background-color: #e5e7eb;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5);
    transition: left 300ms ease;
}

.sentiment-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
}

.formality-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.formality-label {
    font-size: 20px;
    font-weight: 600;
    color: #e5e7eb;
}

.formality-score {
    font-size: 16px;
    font-weight: 500;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

.formality-bar-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.formality-bar {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background-color: #2a2a2a;
    position: relative;
    overflow: hidden;
}

.formality-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(to right, #8b5cf6, #3b82f6);
    width: 0%;
    transition: width 300ms ease;
}

.formality-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6b7280;
}

.tone-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tone-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tone-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    width: 110px;
    flex-shrink: 0;
}

.tone-bar-track {
    flex: 1;
    height: 6px;
    background-color: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
}

.tone-bar-fill {
    height: 100%;
    background-color: #646cff;
    border-radius: 3px;
    width: 0%;
    transition: width 300ms ease;
}

.tone-score {
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    width: 32px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.summary-text {
    font-size: 16px;
    line-height: 1.6;
    color: #d1d5db;
}

.emotion-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emotion-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.emotion-name {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    width: 100px;
    flex-shrink: 0;
    text-transform: capitalize;
}

.emotion-bar-track {
    flex: 1;
    height: 8px;
    background-color: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
}

.emotion-bar-fill {
    height: 100%;
    background-color: #646cff;
    border-radius: 4px;
    width: 0%;
    transition: width 300ms ease;
}

.emotion-bar-fill.dominant {
    background-color: #4ade80;
}

.emotion-score {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    width: 32px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

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

.paragraph-item {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.paragraph-item:hover {
    background-color: #1e1e2e;
}

.paragraph-item.selected {
    border-left: 3px solid #646cff;
}

.paragraph-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.paragraph-number {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paragraph-sentiment-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
}

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

.paragraph-sentiment-badge.negative {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.paragraph-sentiment-badge.neutral {
    background-color: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.paragraph-preview {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.paragraph-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

.paragraph-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.consistency-score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.consistency-ring {
    width: 120px;
    height: 120px;
    position: relative;
}

.consistency-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.consistency-ring-bg {
    fill: none;
    stroke: #2a2a2a;
    stroke-width: 8;
}

.consistency-ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 500ms ease;
}

.consistency-ring-fill.score-high {
    stroke: #4ade80;
}

.consistency-ring-fill.score-mid {
    stroke: #fbbf24;
}

.consistency-ring-fill.score-low {
    stroke: #ef4444;
}

.consistency-ring-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: 700;
    color: #e5e7eb;
    font-variant-numeric: tabular-nums;
}

.consistency-label {
    font-size: 14px;
    color: #9ca3af;
}

.consistency-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.flagged-paragraphs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flagged-title {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

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

.flagged-item-label {
    font-size: 13px;
    color: #e5e7eb;
}

.flagged-item-deviation {
    font-size: 12px;
    font-weight: 500;
    color: #ef4444;
}

.trajectory-chart {
    width: 100%;
    height: 100px;
    margin-top: 8px;
}

.trajectory-chart svg {
    width: 100%;
    height: 100%;
}

.trajectory-line {
    fill: none;
    stroke: #646cff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trajectory-point {
    fill: #646cff;
    transition: fill 150ms ease;
}

.trajectory-point.flagged {
    fill: #ef4444;
}

.trajectory-zero-line {
    stroke: #2a2a2a;
    stroke-width: 1;
    stroke-dasharray: 4 4;
}

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

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

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

.error-message {
    background-color: #7f1d1d;
    border: 1px solid #dc2626;
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

.paragraph-list::-webkit-scrollbar {
    width: 6px;
}

.paragraph-list::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.paragraph-list::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

.paragraph-list::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

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

    .analysis-card {
        padding: 16px;
    }

    .sentiment-label,
    .formality-label {
        font-size: 18px;
    }

    .tone-name {
        width: 90px;
        font-size: 13px;
    }

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

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

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

        padding: 0 16px;
    }

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

    .paragraph-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .consistency-ring {
        width: 100px;
        height: 100px;
    }

    .consistency-ring-value {
        font-size: 24px;
    }

    .emotion-name {
        width: 80px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .sentiment-header,
    .formality-header {
        flex-direction: column;
        gap: 4px;
    }

    .tone-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tone-name {
        width: 100%;
    }

    .tone-score {
        position: absolute;
        right: 0;
        top: 0;
    }

    .tone-item {
        position: relative;
    }
}