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

.caption-textarea {
    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;
}

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

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

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

.toolbar-title {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbar-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

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

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

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toolbar-btn-pro {
    border-style: dashed;
    color: #f59e0b;
    border-color: #f59e0b;
}

.toolbar-btn-pro:hover {
    background-color: rgba(245, 158, 11, 0.1);
}

.platform-selector {
    display: flex;
    gap: 0;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}

.platform-pill {
    background-color: transparent;
    border: none;
    color: #9ca3af;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    border-right: 1px solid #374151;
}

.platform-pill:last-child {
    border-right: none;
}

.platform-pill:hover {
    color: #e5e7eb;
    background-color: #252525;
}

.platform-pill.active {
    background-color: #3b82f6;
    color: #ffffff;
}

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

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

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

.formatted-output {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 16px;
    min-height: 120px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
}

.output-placeholder,
.preview-placeholder {
    color: #6b7280;
    font-style: italic;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.invisible-char-line {
    background-color: rgba(59, 130, 246, 0.08);
    border-radius: 2px;
}

.output-actions {
    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;
}

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

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

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

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

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

.preview-char-limit {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
}

.preview-content {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 16px;
    min-height: 80px;
    font-size: 14px;
    line-height: 1.5;
    color: #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
}

.button-copy-platform {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
    width: 100%;
}

.button-copy-platform:hover {
    background-color: #374151;
}

.button-copy-platform:disabled {
    color: #6b7280;
    cursor: not-allowed;
}

.button-copy-platform.copied {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff;
}

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

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

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

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

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

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

.template-category-btn {
    background-color: #1a1a1a;
    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;
}

.template-category-btn:hover {
    color: #e5e7eb;
    background-color: #252525;
}

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

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

.template-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    transition: border-color 150ms ease;
}

.template-item:hover {
    border-color: #374151;
}

.template-preview {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.template-use-btn {
    background-color: #374151;
    border: none;
    color: #e5e7eb;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.template-use-btn:hover {
    background-color: #4b5563;
}

.first-comment-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.first-comment-body > label {
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
}

.first-comment-textarea {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 14px;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    min-height: 100px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

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

.hashtag-count {
    font-size: 13px;
    color: #9ca3af;
}

.hashtag-count.warning {
    color: #f59e0b;
}

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

.first-comment-output {
    background-color: #0a0a0a;
    border: 1px solid #374151;
    border-radius: 6px;
    padding: 14px;
    min-height: 80px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
}

.char-count-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.char-count-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.char-count-platform {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    min-width: 80px;
    flex-shrink: 0;
}

.char-count-numbers {
    font-size: 12px;
    color: #9ca3af;
    min-width: 90px;
    flex-shrink: 0;
    text-align: right;
}

.char-count-current {
    color: #e5e7eb;
    font-weight: 500;
}

.char-count-bar {
    flex: 1;
    height: 6px;
    background-color: #374151;
    border-radius: 3px;
    overflow: hidden;
    min-width: 60px;
}

.char-count-fill {
    height: 100%;
    border-radius: 3px;
    background-color: #10b981;
    transition: width 200ms ease, background-color 200ms ease;
}

.char-count-fill.warning {
}

.char-count-fill.over {
    background-color: #ef4444;
}

.char-count-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.status-ok {
    color: #10b981;
}

.status-warning {
    color: #f59e0b;
}

.status-over {
    color: #ef4444;
}

.saved-captions-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.save-caption-form {
    display: flex;
    gap: 12px;
}

.save-caption-form .text-input {
    flex: 1;
}

.save-caption-form .button-primary {
    flex-shrink: 0;
    white-space: nowrap;
}

.text-input {
    background-color: #0a0a0a;
    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::placeholder {
    color: #6b7280;
}

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

.saved-caption-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    transition: border-color 150ms ease;
}

.saved-caption-item:hover {
    border-color: #374151;
}

.saved-caption-info {
    flex: 1;
    min-width: 0;
}

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

.saved-caption-preview {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.saved-caption-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.saved-caption-btn {
    background-color: #374151;
    border: none;
    color: #e5e7eb;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.saved-caption-btn:hover {
    background-color: #4b5563;
}

.saved-caption-btn.delete {
    color: #f87171;
}

.saved-caption-btn.delete:hover {
    background-color: #7f1d1d;
    color: #fca5a5;
}

.saved-captions-empty {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    padding: 24px;
}

.saved-captions-limit {
    font-size: 13px;
    color: #f59e0b;
    text-align: center;
    padding: 8px;
}

.font-picker-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 500px;
    overflow-y: auto;
}

.font-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    transition: border-color 150ms ease;
}

.font-picker-row:hover {
    border-color: #374151;
}

.font-picker-name {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    min-width: 100px;
    flex-shrink: 0;
}

.font-picker-preview {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #9ca3af;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
    scrollbar-color: #374151 transparent;
}

.font-picker-preview::-webkit-scrollbar {
    height: 4px;
}

.font-picker-preview::-webkit-scrollbar-track {
    background: transparent;
}

.font-picker-preview::-webkit-scrollbar-thumb {
    background-color: #374151;
    border-radius: 2px;
}

.font-picker-apply-btn {
    background-color: #374151;
    border: none;
    color: #e5e7eb;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.font-picker-apply-btn:hover {
    background-color: #4b5563;
}

.pro-cta-content {
    max-width: 720px;
    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;
}

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

.copy-feedback {
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
    opacity: 0;
    transition: opacity 200ms 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;
    }

    .toolbar-group {
        padding: 16px;
    }

    .toolbar-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    .platform-pill {
        padding: 7px 12px;
        font-size: 12px;
    }

    .output-group {
        padding: 16px;
    }

    .preview-card {
        padding: 16px;
    }

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

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

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

    .save-caption-form {
        flex-direction: column;
    }

    .char-count-row {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
    }

    .char-count-platform {
        min-width: 70px;
    }

    .char-count-numbers {
        min-width: auto;
    }

    .char-count-bar {
        order: 4;
        width: 100%;
        flex-basis: 100%;
    }

    .font-picker-row {
        flex-wrap: wrap;
    }

    .font-picker-name {
        min-width: auto;
    }

    .font-picker-preview {
        flex-basis: 100%;
        order: 3;
    }

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

        padding: 0 16px;
    }

    .template-categories {
        gap: 6px;
    }

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

@media (max-width: 480px) {
    .saved-caption-item {
        flex-wrap: wrap;
    }

    .saved-caption-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .char-count-status {
        min-width: 32px;
    }
}