/* HTTP测试工具样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.header p {
    font-size: 14px;
    color: #666;
}

.http-tool {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.request-section {
    margin-bottom: 20px;
}

.request-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.method-select {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
    background-color: #fff;
}

.url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.url-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.request-options {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.proxy-checkbox {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.proxy-checkbox input {
    margin-right: 5px;
}

.send-button {
    padding: 8px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-button:hover {
    background-color: #0069d9;
}

.send-button:active {
    background-color: #0062cc;
}

.clear-button {
    padding: 8px 15px;
    background-color: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.2s;
}

.clear-button:hover {
    background-color: #5a6268;
}

.request-body {
    margin-top: 20px;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button.active {
    border-bottom-color: #007bff;
    color: #007bff;
    font-weight: 500;
}

.tab-content {
    display: none;
}

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

.headers-section {
    margin-bottom: 15px;
}

.header-row {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.header-key {
    width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
}

.header-value {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
}

.remove-header {
    padding: 8px 12px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.add-header {
    padding: 8px 15px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
}

.content-type-selector {
    margin-bottom: 10px;
}

.content-type-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

.body-input-container {
    margin-bottom: 10px;
}

.body-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', Courier, monospace;
    resize: vertical;
    min-height: 200px;
}

.form-param-row {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
}

.form-param-key,
.form-param-value {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-param-key {
    margin-right: 10px;
}

.remove-param {
    background-color: #ff4d4f;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-param:hover {
    background-color: #ff7875;
}

.add-param {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
}

.add-param:hover {
    background-color: #40a9ff;
}

.response-section {
    margin-top: 30px;
}

.response-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.response-content {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.response-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.response-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.response-tab.active {
    background-color: #fff;
    border-bottom: 2px solid #007bff;
    color: #007bff;
    font-weight: 500;
}

.response-body {
    padding: 15px;
    background-color: #f8f9fa;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    min-height: 300px;
    overflow-x: auto;
}

.response-body pre {
    margin: 0;
    padding: 0;
    background-color: transparent;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: #666;
}

.spinner {
    border: 4px solid rgba(0,0,0,0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .request-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .method-select {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }
    
    .request-options {
        margin-left: 0;
        margin-top: 10px;
        justify-content: space-between;
    }
    
    .header-key {
        width: 150px;
    }
}