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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: #1e293b;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

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

.btn-icon {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 16px;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: #fff;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.sidebar-tab.active {
    color: #fff;
    border-bottom: 2px solid #0f4ba5;
}

.sidebar-tab:hover {
    color: #fff;
    background: #edf5ff;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
}

.collection-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.collection-item:hover {
    background: #edf5ff;
}

.collection-item.active {
    background: #094771;
}

.method-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.method-get { background: #61affe; color: #000; }
.method-post { background: #49cc90; color: #000; }
.method-put { background: #fca130; color: #000; }
.method-delete { background: #f93e3e; color: #fff; }
.method-patch { background: #50e3c2; color: #000; }
.method-head { background: #9012fe; color: #fff; }
.method-options { background: #0d5aa7; color: #fff; }

.request-name {
    font-size: 13px;
    color: #1e293b;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.request-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
}

/* URL Bar */
.url-bar {
    padding: 15px;
    display: flex;
    gap: 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.method-select {
    padding: 8px 12px;
    background: #3c3c3c;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.method-select:focus {
    border-color: #0f4ba5;
}

.url-input {
    flex: 1;
    padding: 8px 12px;
    background: #3c3c3c;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.url-input:focus {
    border-color: #0f4ba5;
}

.send-btn {
    padding: 8px 24px;
    background: #0f4ba5;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.send-btn:hover {
    background: #005a9e;
}

.send-btn:disabled {
    background: #e2e8f0;
    cursor: not-allowed;
}

.save-btn {
    padding: 8px 16px;
    background: #3c3c3c;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #4c4c4c;
}

/* Tabs */
.request-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: #fff;
    border-bottom-color: #0f4ba5;
}

.tab:hover {
    color: #fff;
    background: #edf5ff;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.tab-panel {
    display: none;
}

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

/* Form Elements */
.section-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.key-value-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.key-input, .value-input {
    flex: 1;
    padding: 8px 12px;
    background: #3c3c3c;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    outline: none;
}

.key-input:focus, .value-input:focus {
    border-color: #0f4ba5;
}

.remove-btn {
    padding: 8px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}

.remove-btn:hover {
    color: #f93e3e;
}

.add-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px dashed #e2e8f0;
    border-radius: 4px;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    margin-top: 8px;
}

.add-btn:hover {
    border-color: #0f4ba5;
    color: #0f4ba5;
}

.body-type-select {
    padding: 6px 12px;
    background: #3c3c3c;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    margin-bottom: 15px;
}

.body-editor {
    width: 100%;
    min-height: 300px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #d4d4d4;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
}

.body-editor:focus {
    border-color: #0f4ba5;
}

/* Response Section */
.response-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

.response-header {
    padding: 10px 15px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.response-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.status-badge {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
}

.status-success { background: #49cc90; color: #000; }
.status-error { background: #f93e3e; color: #fff; }
.status-warning { background: #fca130; color: #000; }
.status-info { background: #61affe; color: #000; }

.response-time, .response-size {
    font-size: 13px;
    color: #64748b;
}

.response-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.response-tab {
    padding: 10px 20px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.response-tab.active {
    color: #fff;
    border-bottom-color: #0f4ba5;
}

.response-tab:hover {
    color: #fff;
    background: #edf5ff;
}

.response-content {
    flex: 1;
    overflow: auto;
    padding: 15px;
}

.response-panel {
    display: none;
}

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

.response-body {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #d4d4d4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* JSON Syntax Highlighting */
.json-key { color: #9cdcfe; }
.json-string { color: #ce9178; }
.json-number { color: #b5cea8; }
.json-boolean { color: #569cd6; }
.json-null { color: #569cd6; }

/* Headers Table */
.headers-table {
    width: 100%;
    border-collapse: collapse;
}

.headers-table th,
.headers-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
}

.headers-table th {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.headers-table td {
    color: #d4d4d4;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #f8fafc;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.modal-input {
    width: 100%;
    padding: 10px;
    background: #3c3c3c;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    margin-bottom: 15px;
    outline: none;
}

.modal-input:focus {
    border-color: #0f4ba5;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: #0f4ba5;
    color: #fff;
}

.modal-btn-primary:hover {
    background: #005a9e;
}

.modal-btn-secondary {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.modal-btn-secondary:hover {
    background: #e2e8f0;
    color: #fff;
}

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Environment Section */
.environments-section {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.env-select {
    width: 100%;
    padding: 8px 12px;
    background: #3c3c3c;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #0f4ba5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Resize Handle */
.resize-handle {
    height: 6px;
    background: #e2e8f0;
    cursor: row-resize;
    display: flex;
    justify-content: center;
    align-items: center;
}

.resize-handle::after {
    content: '';
    width: 30px;
    height: 2px;
    background: #5a5a5a;
    border-radius: 1px;
}

.resize-handle:hover {
    background: #0f4ba5;
}

.resize-handle:hover::after {
    background: #fff;
}

/* Clear History Button */
.clear-history-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #f93e3e;
    color: #f93e3e;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.clear-history-btn:hover {
    background: #f93e3e;
    color: #fff;
}

/* Proxy Toggle */
.proxy-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #3c3c3c;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
}

.proxy-toggle.active {
    color: #49cc90;
    border-color: #49cc90;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #ffffff;
}

::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e4e52;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: #e2e8f0;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 100;
}
