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

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

.editor-label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.editor-divider {
    border-top: 1px solid #2a2a2a;
    margin: 8px 0;
}

.mode-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #2a2a2a;
}

.mode-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.editor-textarea {
    background-color: #0a0a0a;
    color: #e5e7eb;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    min-height: 180px;
    resize: vertical;
    width: 100%;
    outline: none;
    tab-size: 2;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

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

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

.drop-zone {
    background-color: #0a0a0a;
    border: 2px dashed #2a2a2a;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    outline: none;
}

.drop-zone:hover,
.drop-zone:focus-visible {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

.drop-zone.drag-active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.drop-zone-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.drop-zone-primary {
    font-size: 15px;
    font-weight: 400;
    color: #e5e7eb;
}

.drop-zone-secondary {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    margin-top: 8px;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: #e5e7eb;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 12px;
    color: #6b7280;
    flex-shrink: 0;
}

.file-remove {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 2px 6px;
    transition: color 150ms ease;
    flex-shrink: 0;
}

.file-remove:hover {
    color: #ef4444;
}

.parse-error {
    background-color: #1a0a0a;
    border: 1px solid #ef4444;
    border-radius: 4px;
    padding: 10px 12px;
    color: #ff5370;
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.4;
}

.sample-label {
    font-size: 13px;
    font-weight: 500;
    color: #888;
    margin-bottom: 6px;
    display: block;
}

.select-input {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
    padding: 10px 36px 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

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

.select-input option {
    background-color: #141414;
}

.options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.option-label {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.draft-selector {
    display: flex;
    gap: 0;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
}

.draft-btn {
    background-color: #1a1a1a;
    border: none;
    border-right: 1px solid #2a2a2a;
    color: #888;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
}

.draft-btn:last-child {
    border-right: none;
}

.draft-btn:hover:not(.active) {
    background-color: #2a2a2a;
    color: #e5e7eb;
}

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

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

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

.checkbox-custom {
    width: 16px;
    height: 16px;
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 3px;
    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: 2px;
    left: 5px;
    width: 4px;
    height: 7px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.button-primary {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    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 #2a2a2a;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

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

.validation-status {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.status-pending {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #888;
}

.status-valid {
    background-color: #0a1a0a;
    border: 1px solid #10b981;
    color: #10b981;
}

.status-invalid {
    background-color: #1a0a0a;
    border: 1px solid #ef4444;
    color: #ef4444;
}

.output-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #2a2a2a;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.output-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    flex-shrink: 0;
}

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

.output-tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

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

.output-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.output-panel.section-hidden {
    display: none;
}

.error-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.error-item {
    background-color: #141414;
    border: 1px solid #2a2a2a;
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    padding: 12px 16px;
}

.error-path {
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    color: #82aaff;
    font-weight: 600;
    font-size: 13px;
}

.error-message {
    color: #ff5370;
    margin-top: 4px;
    font-size: 13px;
}

.error-keyword {
    display: inline-block;
    background-color: #2a2a2a;
    color: #f59e0b;
    padding: 1px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-weight: 500;
    margin-top: 6px;
}

.error-detail {
    color: #888;
    font-size: 12px;
    margin-top: 4px;
}

.error-detail code {
    color: #c3e88d;
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 11px;
}

.show-more-errors {
    background: none;
    border: 1px solid #2a2a2a;
    color: #888;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    text-align: center;
}

.show-more-errors:hover {
    color: #e5e7eb;
    border-color: #3b82f6;
}

.stats-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

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

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

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

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.json-key { color: #82aaff; }

.json-string { color: #c3e88d; }

.json-number { color: #f78c6c; }

.json-boolean { color: #c792ea; }

.json-null { color: #ff5370; }

.generate-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.generate-description {
    font-size: 14px;
    color: #888;
    line-height: 1.5;
}

.generated-output-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.generated-output {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 16px;
    font-family: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre;
    color: #e5e7eb;
    margin: 0;
}

.generate-actions {
    display: flex;
    gap: 8px;
}

.batch-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.batch-description {
    font-size: 14px;
    color: #888;
    line-height: 1.5;
}

.batch-upload-zone {
    background-color: #0a0a0a;
    border: 2px dashed #2a2a2a;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 150ms ease;
    outline: none;
}

.batch-upload-zone:hover,
.batch-upload-zone:focus-visible {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

.batch-upload-zone.drag-active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.batch-results {
    display: flex;
    flex-direction: column;
    gap: 0;
}

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

.batch-item:last-child {
    border-bottom: none;
}

.batch-item.batch-pass {
    border-left: 3px solid #10b981;
}

.batch-item.batch-fail {
    border-left: 3px solid #ef4444;
}

.batch-item-name {
    font-size: 13px;
    color: #e5e7eb;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 12px;
}

.batch-item-status {
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.batch-item-status.pass {
    color: #10b981;
}

.batch-item-status.fail {
    color: #ef4444;
}

.batch-item-errors {
    font-size: 11px;
    color: #888;
    margin-left: 8px;
    flex-shrink: 0;
}

.batch-summary {
    display: flex;
    gap: 16px;
    background-color: #1a1a1a;
    padding: 10px 16px;
    border-radius: 4px;
    flex-wrap: wrap;
}

.batch-summary-item {
    font-size: 13px;
    font-weight: 500;
    color: #888;
}

.batch-summary-item.batch-pass {
    color: #10b981;
}

.batch-summary-item.batch-fail {
    color: #ef4444;
}

.batch-actions {
    display: flex;
    gap: 8px;
}

.badge-pass {
    background-color: #0a1a0a;
    color: #10b981;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-fail {
    background-color: #1a0a0a;
    color: #ef4444;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.library-categories {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #2a2a2a;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.library-cat-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 150ms ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.library-cat-btn:hover {
    color: #e5e7eb;
}

.library-cat-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.library-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.library-item {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

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

.library-name {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.library-description {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.library-load-btn {
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    flex-shrink: 0;
}

.library-load-btn:hover {
    background-color: #2563eb;
}

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

.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: 10px 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: 14px;
    color: #e5e7eb;
}

.modal-cta {
    width: 100%;
    display: block;
    text-align: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #2a2a2a;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

.processing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

.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: #1a0a0a;
    border: 1px solid #ef4444;
    color: #ff5370;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
}

.success-message {
    background-color: #0a1a0a;
    border: 1px solid #10b981;
    color: #10b981;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
}

.bug-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 24px;
}

.bug-report-content {
    background-color: #141414;
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 24px;
    max-width: 480px;
    width: 100%;
}

.bug-report-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.bug-report-content textarea {
    background-color: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #e5e7eb;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    min-height: 120px;
    resize: vertical;
    outline: none;
    margin-bottom: 16px;
}

.bug-report-content textarea:focus {
    border-color: #3b82f6;
}

.bug-report-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.bug-report-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
}

#bug-cancel {
    background-color: #1a1a1a;
    color: #e5e7eb;
    border: 1px solid #2a2a2a;
}

#bug-cancel:hover {
    background-color: #2a2a2a;
}

#bug-submit {
    background-color: #3b82f6;
    color: #ffffff;
}

#bug-submit:hover {
    background-color: #2563eb;
}

.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-section {
        padding: 16px;
    }

    .stats-display {
        grid-template-columns: repeat(2, 1fr);
    }

    .options-row {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }

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

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

    .output-tabs {
        gap: 0;
    }

    .output-tab {
        padding: 8px 10px;
        font-size: 12px;
    }

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

        padding: 0 16px;
    }

    .library-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .library-load-btn {
        width: 100%;
        text-align: center;
    }

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

    .generate-actions button {
        width: 100%;
    }

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

    .result-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-display {
        grid-template-columns: repeat(2, 1fr);
    }

    .draft-selector {
        flex-wrap: wrap;
    }

    .draft-btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .batch-item {
        flex-wrap: wrap;
        gap: 4px;
    }

    .library-categories {
        gap: 0;
    }

    .library-cat-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .mode-tab {
        padding: 8px 10px;
        font-size: 12px;
    }
}