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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 8px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 1rem;
}

.url-input-group {
    display: flex;
    gap: 8px;
}

.protocol-select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 110px;
}

.protocol-select:focus {
    outline: none;
    border-color: #667eea;
}

.url-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}

.url-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s;
    resize: vertical;
    min-height: 150px;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

small {
    display: block;
    margin-top: 6px;
    color: #888;
    font-size: 0.85rem;
}

.error {
    color: #e74c3c;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

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

.response-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.response-header h3 {
    color: #555;
    font-size: 1.2rem;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.3s;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    background: #f5f5f5;
}

.tab-btn.active {
    color: #667eea;
    border-bottom: 2px solid #667eea;
    margin-bottom: -2px;
}

.tab-content {
    display: none;
}

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

.response-pre {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.timing-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.timing-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.timing-item .label {
    font-weight: 600;
    color: #555;
}

.history-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.history-section h3 {
    color: #555;
    margin-bottom: 16px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.empty-history {
    color: #999;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.history-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 6px;
}

.history-item:hover {
    background: #f8f9fa;
}

.history-url {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 0.9rem;
    word-break: break-all;
}

.history-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: #888;
}

.history-status {
    font-weight: 600;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .url-input-group {
        flex-direction: column;
    }
    
    .protocol-select {
        width: 100%;
    }
}
