/* Tool-specific styles only - base styles are in tool-layout.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --surface: #141414;
    --border: #2a2a2a;
    --text: #ffffff;
    --text-secondary: #e5e7eb;
    --text-muted: #888888;
    --accent: #3b82f6;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --method-get: #10b981;
    --method-post: #3b82f6;
    --method-put: #f59e0b;
    --method-delete: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text-secondary);
    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: var(--surface);
    border-bottom: 1px solid var(--border);
    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: 32px;
}

.input-section {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.url-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.method-select {
    width: 120px;
    background-color: var(--bg);
    color: var(--method-get);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    outline: none;
    -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='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.method-select:focus {
    border-color: var(--accent);
}

.method-select option {
    background-color: #1a1a1a;
    color: var(--text-secondary);
}

.method-get { color: var(--method-get); }

.method-post { color: var(--method-post); }

.method-put { color: var(--method-put); }

.method-delete { color: var(--method-delete); }

.url-input {
    flex: 1;
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 12px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 14px;
    outline: none;
    transition: border-color 150ms ease;
}

.url-input:focus {
    border-color: var(--accent);
}

.url-input::placeholder {
    color: #555;
}

.button-send {
    background-color: var(--accent);
    color: var(--text);
    padding: 10px 24px;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 150ms ease;
}

.button-send:hover {
    filter: brightness(0.9);
}

.button-send:disabled,
.button-send.sending {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-cancel {
    background-color: var(--error);
    color: var(--text);
    padding: 10px 24px;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 150ms ease;
}

.button-cancel:hover {
    filter: brightness(0.9);
}

.tab-bar {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-secondary);
}

.tab-btn.active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.pro-badge {
    color: var(--bg);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.kv-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.kv-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.kv-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

.kv-key,
.kv-value {
    flex: 1;
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 10px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 13px;
    outline: none;
    transition: border-color 150ms ease;
}

.kv-key:focus,
.kv-value:focus {
    border-color: var(--accent);
}

.kv-key::placeholder,
.kv-value::placeholder {
    color: #555;
}

.kv-key.disabled,
.kv-value.disabled {
    opacity: 0.4;
}

.kv-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    transition: color 150ms ease;
    flex-shrink: 0;
    line-height: 1;
}

.kv-remove:hover {
    color: var(--error);
}

.button-add-row {
    width: 100%;
    background: none;
    border: 1px dashed var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    padding: 8px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease;
}

.button-add-row:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.limit-message {
    font-size: 12px;
    color: var(--warning);
    margin-top: 4px;
}

.panel-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.4;
}

.body-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.body-type-select {
    background-color: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -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='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 26px;
}

.body-type-select:focus {
    border-color: var(--accent);
}

.body-type-select option {
    background-color: #1a1a1a;
}

.body-editor {
    width: 100%;
    min-height: 150px;
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    transition: border-color 150ms ease;
}

.body-editor:focus {
    border-color: var(--accent);
}

.body-editor::placeholder {
    color: #555;
}

.body-valid {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.body-valid.valid {
    color: var(--success);
}

.body-valid.invalid {
    color: var(--error);
}

.auth-type-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.select-input {
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    -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='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.select-input:focus {
    border-color: var(--accent);
}

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

.text-input {
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 150ms ease;
}

.text-input:focus {
    border-color: var(--accent);
}

.text-input::placeholder {
    color: #555;
}

.output-section {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    justify-content: center;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 14px;
    color: var(--text-muted);
}

.response-status {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 10px 0;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 13px;
}

.status-2xx {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.status-3xx {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--accent);
}

.status-4xx {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-5xx {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.response-time,
.response-size {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    color: var(--text-muted);
    font-size: 13px;
}

.response-body-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.response-output {
    background-color: var(--bg);
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    padding: 16px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    font-size: 13px;
    max-height: 500px;
    overflow-y: auto;
    line-height: 1.5;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    margin: 0;
}

.json-key { color: #60a5fa; }

.json-string { color: #10b981; }

.json-number { color: #f59e0b; }

.json-boolean { color: #a78bfa; }

.json-null { color: #888; }

.response-headers-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.response-header-row {
    display: flex;
    gap: 12px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    border-bottom: 1px solid #1a1a1a;
}

.response-header-row:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

.response-header-name {
    color: var(--accent);
    font-weight: 500;
    min-width: 180px;
    flex-shrink: 0;
}

.response-header-value {
    color: var(--text-secondary);
    word-break: break-all;
}

.cors-error {
    background-color: #1a0a0a;
    border: 1px solid var(--error);
    border-radius: 4px;
    padding: 16px;
}

.cors-error-title {
    font-size: 15px;
    font-weight: 600;
    color: #ff8a80;
    margin-bottom: 8px;
}

.cors-error p {
    font-size: 13px;
    color: #ff8a80;
    line-height: 1.5;
    margin-bottom: 12px;
}

.cors-suggestions {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cors-suggestions li {
    font-size: 13px;
    color: #ffab91;
    padding-left: 16px;
    position: relative;
    line-height: 1.4;
}

.cors-suggestions li::before {
    content: '-';
    position: absolute;
    left: 4px;
    color: #ff8a80;
}

.request-error {
    background-color: #1a0a0a;
    border: 1px solid var(--error);
    border-radius: 4px;
    padding: 16px;
}

.request-error p {
    font-size: 14px;
    color: #fca5a5;
    line-height: 1.5;
}

.empty-state {
    padding: 32px 16px;
    text-align: center;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
}

.large-response-notice {
    font-size: 12px;
    color: var(--warning);
    margin-bottom: 8px;
}

.pro-section {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pro-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.env-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.env-variables {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.env-var-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.env-var-key,
.env-var-value {
    flex: 1;
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 10px;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 13px;
    outline: none;
}

.env-var-key:focus,
.env-var-value:focus {
    border-color: var(--accent);
}

.history-controls {
    display: flex;
    gap: 8px;
}

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

.history-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.history-item:hover {
    background-color: #1a1a1a;
}

.history-method {
    font-weight: 700;
    font-size: 11px;
    min-width: 56px;
    text-align: center;
    padding: 3px 8px;
    border-radius: 3px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.history-method.get {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--method-get);
}

.history-method.post {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--method-post);
}

.history-method.put {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--method-put);
}

.history-method.delete {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--method-delete);
}

.history-url {
    flex: 1;
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 12px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.history-time {
    color: var(--text-muted);
    font-size: 11px;
    flex-shrink: 0;
    white-space: nowrap;
}

.history-status {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.collections-controls {
    display: flex;
    gap: 8px;
}

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

.collection-group {
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.collection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background-color: #1a1a1a;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.collection-header:hover {
    background-color: #222;
}

.collection-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.collection-count {
    font-size: 12px;
    color: var(--text-muted);
}

.collection-requests {
    display: none;
}

.collection-requests.expanded {
    display: block;
}

.collection-request-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 12px;
    border-top: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 150ms ease;
}

.collection-request-item:hover {
    background-color: #1a1a1a;
}

.snippet-output {
    background-color: var(--bg);
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    padding: 16px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 13px;
    color: #c3e88d;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.5;
    border: 1px solid var(--border);
    margin: 0;
}

.button-primary {
    background-color: var(--accent);
    color: var(--text);
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-secondary {
    background-color: #1a1a1a;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 150ms ease;
    text-align: center;
}

.button-sm {
    padding: 6px 12px;
    font-size: 12px;
}

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

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 150ms ease;
}

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

.modal-content {
    padding: 24px;
}

.modal-feature-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

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

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

.footer {
    background-color: var(--bg);
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    text-align: center;
    margin-top: auto;
}

.footer p {
    font-size: 14px;
    color: #6b7280;
}

.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: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    max-width: 480px;
    width: 100%;
}

.bug-report-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.bug-report-content textarea {
    width: 100%;
    min-height: 120px;
    background-color: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    resize: vertical;
    margin-bottom: 16px;
}

.bug-report-content textarea:focus {
    border-color: var(--accent);
}

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

@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: 24px;
    }

    .input-section,
    .output-section,
    .pro-section {
        padding: 16px;
    }

    .url-bar {
        flex-wrap: wrap;
    }

    .method-select {
        width: 100%;
    }

    .url-input {
        width: 100%;
    }

    .button-send,
    .button-cancel {
        width: 100%;
    }

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

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

    .kv-key,
    .kv-value {
        min-width: 0;
        flex: 1 1 40%;
    }

    .response-status {
        flex-wrap: wrap;
        gap: 8px;
    }

    .response-header-name {
        min-width: 120px;
    }

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

        padding: 0 16px;
    }

    .env-controls {
        flex-wrap: wrap;
    }

    .collections-controls {
        flex-wrap: wrap;
    }

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

    .history-url {
        flex-basis: 100%;
        order: 3;
    }
}

@media (max-width: 480px) {
    .url-bar {
        gap: 6px;
    }

    .kv-key,
    .kv-value {
        flex: 1 1 100%;
    }

    .response-header-row {
        flex-direction: column;
        gap: 2px;
    }

    .response-header-name {
        min-width: auto;
    }
}