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

.text-input-area.show-whitespace {
    white-space: pre-wrap;
    word-break: break-word;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

label.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

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

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

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

.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.stats-bar .stat-item {
    flex: 1 1 calc(25% - 12px);
    min-width: 100px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

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

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.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-small {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
}

.button-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 150ms ease;
}

.button-close:hover {
    color: #e5e7eb;
}

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

.pro-badge-inline {
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.pro-feature-btn {
    opacity: 0.6;
    transition: opacity 150ms ease;
}

.pro-feature-btn:hover {
    opacity: 0.8;
}

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

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

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

.output-header h3 {
    font-size: 22px;
    font-weight: 600;
    line-height: 28px;
    color: #d1d5db;
}

.output-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-card {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 16px;
    transition: border-color 150ms ease, background-color 150ms ease;
    cursor: pointer;
}

.platform-card:hover {
    border-color: #4b5563;
    background-color: #1f1f1f;
}

.platform-card.over-limit {
    border-color: #dc2626;
}

.platform-card.over-limit:hover {
    border-color: #ef4444;
}

.platform-card.selected {
    border-color: #3b82f6;
}

.platform-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #e5e7eb;
}

.platform-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.platform-count {
    font-size: 14px;
    font-weight: 600;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

.platform-count .count-current {
    color: #e5e7eb;
}

.platform-count .count-over {
    color: #ef4444;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #374151;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 200ms ease, background-color 200ms ease;
}

.progress-bar-fill.progress-green {
    background-color: #22c55e;
}

.progress-bar-fill.progress-amber {
}

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

.platform-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-card-actions .button-secondary {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 5px;
}

.platform-status {
    font-size: 12px;
    font-weight: 500;
    margin-left: auto;
}

.platform-status.status-ok {
    color: #22c55e;
}

.platform-status.status-warn {
    color: #f59e0b;
}

.platform-status.status-over {
    color: #ef4444;
}

.truncation-preview {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
}

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

.truncation-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #d1d5db;
}

.truncation-content {
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}

.truncation-fits {
    color: #e5e7eb;
}

.truncation-marker {
    color: #ef4444;
    font-weight: 700;
    margin: 0 2px;
}

.truncation-overflow {
    color: #6b7280;
    text-decoration: line-through;
}

.platform-preview {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.preview-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #d1d5db;
    flex: 1;
}

.preview-content {
    background-color: #111111;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #e5e7eb;
}

.preview-mock {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-mock-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #374151;
    flex-shrink: 0;
}

.preview-mock-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-mock-name {
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

.preview-mock-handle {
    font-size: 13px;
    color: #6b7280;
}

.preview-mock-body {
    font-size: 14px;
    line-height: 1.5;
    color: #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
}

.pro-analysis-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
}

.analysis-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.analysis-stats {
    display: flex;
    gap: 16px;
}

.analysis-stats .stat-item {
    flex: 1;
}

.keyword-density {
    border-top: 1px solid #374151;
    padding-top: 16px;
}

.keyword-title {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.keyword-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.keyword-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background-color: #1a1a1a;
    border-radius: 4px;
    font-size: 13px;
}

.keyword-word {
    font-weight: 500;
    color: #e5e7eb;
}

.keyword-stats {
    display: flex;
    gap: 12px;
    color: #6b7280;
    font-size: 12px;
}

.keyword-count {
    color: #9ca3af;
}

.keyword-density-value {
    color: #3b82f6;
    font-weight: 500;
}

.settings-title {
    font-size: 18px;
    font-weight: 500;
    color: #d1d5db;
}

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

.drafts-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drafts-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.drafts-toolbar .text-input {
    flex: 1;
}

.drafts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.draft-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.draft-item:hover {
    background-color: #252525;
}

.draft-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.draft-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.draft-item-time {
    font-size: 12px;
    color: #6b7280;
}

.draft-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.draft-delete {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 150ms ease;
}

.draft-delete:hover {
    color: #ef4444;
}

.custom-platform-section {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.custom-platform-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.custom-platform-form .text-input {
    flex: 1;
}

.custom-platform-form .text-input[type="number"] {
    max-width: 140px;
    flex: 0 0 auto;
}

.custom-platform-tag {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.5px;
}

.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;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms ease, transform 200ms ease;
}

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

.toast.toast-hidden {
    display: none;
}

.performance-warning {
    background-color: #78350f;
    border: 1px solid #f59e0b;
    color: #fde68a;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}

.whitespace-space {
    color: #374151;
}

.whitespace-newline {
    color: #374151;
}

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

    .output-section {
        padding: 16px;
    }

    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .stats-bar {
        gap: 8px;
    }

    .stats-bar .stat-item {
        flex: 1 1 calc(50% - 4px);
    }

    .stat-item {
        padding: 10px;
    }

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

    .platform-card {
        padding: 14px;
    }

    .platform-card-actions {
        flex-wrap: wrap;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .toolbar-right {
        width: 100%;
    }

    .toolbar-right .button-secondary {
        width: 100%;
    }

    .drafts-toolbar {
        flex-direction: column;
    }

    .custom-platform-form {
        flex-direction: column;
    }

    .custom-platform-form .text-input[type="number"] {
        max-width: none;
    }

    .analysis-stats {
        flex-direction: column;
    }

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

        padding: 0 16px;
    }

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

@media (max-width: 480px) {
    .stats-bar .stat-item {
        flex: 1 1 calc(50% - 4px);
    }

    .platform-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .platform-count {
        align-self: flex-end;
    }
}