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

.bio-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: 120px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

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

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

.textarea-actions {
    display: flex;
    justify-content: flex-end;
}

.formatting-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

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

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

.font-btn-reset {
    border-color: #4b5563;
    color: #9ca3af;
}

.font-btn-reset:hover {
    color: #e5e7eb;
}

.symbol-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
    padding: 12px;
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 8px;
}

.symbol-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #e5e7eb;
    font-size: 16px;
    cursor: pointer;
    transition: all 150ms ease;
    font-family: inherit;
}

.symbol-btn:hover {
    background-color: #374151;
    border-color: #4b5563;
}

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

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

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.platform-counts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.platform-count-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.platform-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 180px;
    gap: 8px;
}

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

.platform-count {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
}

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

.progress-fill.warning {
}

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

.copy-btn {
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #e5e7eb;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover:not(:disabled) {
    background-color: #374151;
}

.copy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

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

.linebreak-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.linebreak-count {
    font-size: 14px;
    color: #9ca3af;
}

.linebreak-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.linebreak-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #1a1a1a;
    border-radius: 6px;
}

.linebreak-status {
    font-size: 13px;
    color: #9ca3af;
}

.preview-card {
    background-color: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.preview-card + .preview-card {
    margin-top: 12px;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #2a2a2a;
}

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

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

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

.preview-placeholder {
    color: #4b5563;
    font-style: italic;
}

.preview-truncated::after {
    content: '...';
    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-small {
    padding: 8px 16px;
    font-size: 13px;
}

.pro-badge {
    flex-shrink: 0;
}

.pro-section {
    opacity: 0.6;
}

.pro-section.unlocked {
    opacity: 1;
}

.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;
    width: 100%;
    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;
}

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

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

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

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

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

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

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

.template-text {
    font-size: 13px;
    color: #9ca3af;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-use-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;
    white-space: nowrap;
    flex-shrink: 0;
}

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

.linkinbio-editor {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.input-note {
    font-size: 13px;
    color: #6b7280;
}

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

.link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.link-row .text-input {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
}

.link-remove-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.link-remove-btn:hover {
    color: #ef4444;
}

.theme-picker {
    display: flex;
    gap: 6px;
}

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

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

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

.linkinbio-preview-container {
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    background-color: #0a0a0a;
}

.linkinbio-iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

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

.linkinbio-actions .button-secondary,
.linkinbio-actions .button-primary {
    flex: 1;
}

.emoji-analytics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emoji-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.emoji-stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

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

.emoji-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emoji-breakdown-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background-color: #1a1a1a;
    border-radius: 4px;
    font-size: 14px;
    color: #e5e7eb;
}

.emoji-breakdown-count {
    font-size: 12px;
    color: #6b7280;
}

.emoji-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emoji-suggestion-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.emoji-suggestion-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    transition: all 150ms ease;
}

.emoji-suggestion-btn:hover {
    background-color: #374151;
    border-color: #4b5563;
}

.ab-tracker {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ab-save-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ab-save-row .text-input {
    flex: 1;
}

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

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

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

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

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

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

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

.version-load-btn:hover {
    background-color: #4b5563;
}

.version-delete-btn {
    background: none;
    border: 1px solid #374151;
    color: #6b7280;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.version-delete-btn:hover {
    color: #ef4444;
    border-color: #ef4444;
}

.version-limit-msg {
    font-size: 13px;
    color: #f59e0b;
}

.pro-cta-content {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.pro-cta-text {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.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: var(--color-background-secondary);
    border: 1px solid var(--color-border);
    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: var(--color-text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--color-text-primary);
}

.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: var(--color-success);
    color: var(--color-text-primary);
    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: var(--color-text-primary);
}

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

.modal-hidden {
    display: none;
}

@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-group {
        padding: 16px;
    }

    .platform-info {
        min-width: 130px;
    }

    .platform-count-row {
        flex-wrap: wrap;
    }

    .progress-bar {
        order: 3;
        flex-basis: 100%;
    }

    .formatting-toolbar {
        gap: 4px;
    }

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

    .symbol-picker {
        max-height: 120px;
        overflow-x: auto;
    }

    .symbol-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

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

    .ab-save-row {
        flex-direction: column;
    }

    .ab-save-row .text-input,
    .ab-save-row .button-primary {
        width: 100%;
    }

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

        padding: 0 16px;
    }

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

    .template-categories {
        gap: 4px;
    }

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

    .link-row {
        flex-wrap: wrap;
    }

    .link-row .text-input {
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    .platform-info {
        min-width: 100px;
    }

    .version-item {
        flex-wrap: wrap;
    }

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